Skip to content

Edit or move a company's resource

PATCH
/clients/{id}/resources/{resourceId}
Code sample: Shell / cURL
curl --request PATCH \
--url https://example.com/api/v1/clients/example/resources/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "description": "example", "isClientVisible": true, "projectId": "example", "title": "example", "url": "example" }'

Edits a link or file of the company’s Resources, its own or one under a project of the company: title, description and whether the company’s users see it, and for a link its address. projectId moves a link between the company’s own (General, null) and one of its projects; fields and move are saved together and the link always has exactly one owner. A file cannot be moved and its address cannot be changed (422). Requires the clients.edit permission and a client company inside the caller’s assignments (or clients.view_all). A link under a project also needs the Boards module, projects.view, projects.manage and that project inside the caller’s reach (or projects.view_all); without them a project’s link reads like a missing one and a project cannot be named as the owner. A resource of another company answers 404, and a projectId of another company’s project 422.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

resourceId
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
description
Any of:
string
<= 2000 characters
isClientVisible

Whether the company’s own users see it in their portal; false keeps it internal to the team.

boolean
projectId

Moves a link: The project of this company the link belongs to, one the caller reaches and may manage (projects.manage). Null moves it to the company’s own (General). Omitted, it stays where it is. A file cannot be moved.

Any of:
string
>= 1 characters
title
string
>= 1 characters <= 200 characters
url

The link’s address, http or https. A file’s address cannot be changed.

string
<= 2048 characters

Example generated

{
"description": "example",
"isClientVisible": true,
"projectId": "example",
"title": "example",
"url": "example"
}

The resource as saved.

Media typeapplication/json
object
data
required

A link or file the team added to a company (General) or to one of its projects.

object
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
description
required
string | null
id
required
string
isClientVisible
required

Whether the company’s own users see it in their portal; false keeps it to the team.

boolean
owner
required

The company itself (General) or the project of the company a resource is under.

object
kind
required

general for the company’s own, project for one of its projects.

string
Allowed values: general project
projectId
required

The project; null for General.

string | null
projectName
required

Its name; null for General.

string | null
title
required
string
type
required

link or file.

string
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
url
required

The link’s address. Null for a file, which opens from the company’s Resources tab.

string | null

Example

{
"data": {
"owner": {
"kind": "general"
}
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.