Sample - Box Platform API
PUT/web_links/{web_link_id}

Update a web link

Updates an existing web link and its associated URL, name, description, parent folder, or shared-link settings. Supply only the properties you want to change; url must use HTTP or HTTPS, and shared_link controls access and expiration settings. A 200 response returns the updated web link object.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 5 body fields
web_link_idstringrequired
The unique identifier of the web link to update.

Optional web link properties to update, including its destination, parent folder, descriptive fields, and shared-link settings.

urlstringoptional
The new URL that the web link links to. Must start with `"http://"` or `"https://"`.
parentobjectoptional
The parent folder to contain the web link; use this field to move the web link to another folder.
namestringoptional
A new name for the web link. Defaults to the URL if not set.
descriptionstringoptional
A new description of the web link.
shared_linkobjectoptional
The settings for the shared link to update.

2 status codes
200Returns the updated web link object, including its destination, parent, descriptive properties, and shared-link settings.
idstringrequired
The unique identifier for this web link.
typestringrequired
The value will always be `web_link`.
Allowed:web_link
etagstringoptional
The entity tag of this web link. Used with `If-Match` headers.
urlstringoptional
The URL this web link points to.
sequence_idobjectoptional
namestringoptional
The name of the web link.
parentobjectoptional
descriptionstringoptional
The description accompanying the web link. This is visible within the Box web application.
path_collectionobjectoptional
created_atstringoptional
When this file was created on Box’s servers.
modified_atstringoptional
When this file was last updated on the Box servers.
trashed_atstringoptional
When this file was moved to the trash.
purged_atstringoptional
When this file will be permanently deleted.
created_byobjectoptional
modified_byobjectoptional
owned_byobjectoptional
shared_linkobjectoptional
item_statusstringoptional
Whether this item is deleted or not. Values include `active`, `trashed` if the file has been moved to the trash, and `deleted` if the file has been permanently deleted.
Allowed:activetrasheddeleted
collectionsarray<Collection>optional
The collections that this web link belongs to. For more information, see the [collections guide](https://developer.box.com/guides/collections).
allowed_shared_link_access_levelsarray<SharedLinkAccessLevel>optional
The shared link access levels the authenticated user is allowed to use when creating or updating a shared link for this web link. The list depends on item policy and user authorization, so it may be narrower than the levels available to the owner. An empty array means no access level is available to this user.
defaultReturned when an unexpected client error occurs.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

web_link_id must identify an existing web link. If provided, url must start with http:// or https://, access must be open, company, or collaborators, vanity_name must contain at least 12 characters, and unshared_at must be an ISO 8601 date-time; a shared-link password must be at least eight characters and include a number, uppercase letter, or special character.