Skip to content

Set pinned Files items

PUT
/api/v1/files/pins
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.

Media typeapplication/json
object
pins
required
Array<object>
object
dir
required

True when the item is a folder.

boolean
id
required

Stable Files item identity. It does not change when the item moves or is renamed.

string
name
required

Cached name shown until the Files Index refreshes it.

string
path
required

Last known Home-relative path. It is display metadata, not authority.

string
revision
required

Revision returned by the last GET or successful PUT.

integer format: int64
Examplegenerated
{
"pins": [
{
"dir": true,
"id": "example",
"name": "example",
"path": "example"
}
],
"revision": 1
}
Media typeapplication/json
object
pins
required
Array<object>
object
dir
required

True when the item is a folder.

boolean
id
required

Stable Files item identity. It does not change when the item moves or is renamed.

string
name
required

Cached name shown until the Files Index refreshes it.

string
path
required

Last known Home-relative path. It is display metadata, not authority.

string
revision
required

Revision used for compare-and-swap updates.

integer format: int64
Examplegenerated
{
"pins": [
{
"dir": true,
"id": "example",
"name": "example",
"path": "example"
}
],
"revision": 1
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}