Set pinned Files items
const url = 'https://example.com/api/v1/files/pins';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"pins":[{"dir":true,"id":"example","name":"example","path":"example"}],"revision":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/files/pins \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "pins": [ { "dir": true, "id": "example", "name": "example", "path": "example" } ], "revision": 1 }'Requires a signed-in User with the data scope. It returns 400 for invalid pins, 403 when access is denied, 409 when the revision is stale, or 413 when the request is too large. Route: /api/v1/files/pins. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
True when the item is a folder.
Stable Files item identity. It does not change when the item moves or is renamed.
Cached name shown until the Files Index refreshes it.
Last known Home-relative path. It is display metadata, not authority.
Revision returned by the last GET or successful PUT.
Examplegenerated
{ "pins": [ { "dir": true, "id": "example", "name": "example", "path": "example" } ], "revision": 1}Responses
Section titled “Responses”object
object
True when the item is a folder.
Stable Files item identity. It does not change when the item moves or is renamed.
Cached name shown until the Files Index refreshes it.
Last known Home-relative path. It is display metadata, not authority.
Revision used for compare-and-swap updates.
Examplegenerated
{ "pins": [ { "dir": true, "id": "example", "name": "example", "path": "example" } ], "revision": 1}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}