Create Web Link
Create Web Link
To create a web link in Box, you will need to provide our API with a folder
id and the url you want the web link to be linked to. The url must start
with http:// or https://.
cURL
curl -i -X POST "https://api.box.com/2.0/web_links" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"name": "Cloud Content Management",
"url": "https://box.com",
"parent": {
"id": "0"
}
}'Node/TypeScript v10
await client.webLinks.createWebLink({
url: 'https://www.box.com',
parent: { id: parent.id } satisfies CreateWebLinkRequestBodyParentField,
name: getUuid(),
description: 'Weblink description',
} satisfies CreateWebLinkRequestBody);Python v10
client.web_links.create_web_link(
"https://www.box.com",
CreateWebLinkParent(id=parent.id),
name=get_uuid(),
description="Weblink description",
).NET v10
await client.WebLinks.CreateWebLinkAsync(requestBody: new CreateWebLinkRequestBody(url: "https://www.box.com", parent: new CreateWebLinkRequestBodyParentField(id: parent.Id)) { Name = Utils.GetUUID(), Description = "Weblink description" });Swift v10
try await client.webLinks.createWebLink(requestBody: CreateWebLinkRequestBody(url: "https://www.box.com", parent: CreateWebLinkRequestBodyParentField(id: parent.id), name: Utils.getUUID(), description: "Weblink description"))Java v10
client.getWebLinks().createWebLink(new CreateWebLinkRequestBody.Builder(url, new CreateWebLinkRequestBodyParentField(parent.getId())).name(name).description(description).build()).NET v6
await client.WebLinks.CreateWebLinkAsync(requestBody: new CreateWebLinkRequestBody(url: "https://www.box.com", parent: new CreateWebLinkRequestBodyParentField(id: parent.Id)) { Name = Utils.GetUUID(), Description = "Weblink description" });Node v4
await client.webLinks.createWebLink({
url: 'https://www.box.com',
parent: { id: parent.id } satisfies CreateWebLinkRequestBodyParentField,
name: getUuid(),
description: 'Weblink description',
} satisfies CreateWebLinkRequestBody);