Skip to content

Move a client field's links to Resources

POST
/clients/field-definitions/{id}/resource-conversion
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/clients/field-definitions/example/resource-conversion \
--header 'Authorization: Bearer <token>'

Adds each company’s link from a client custom field to that company’s own (General) resources, visible to the team only and titled with the field’s name, skipping a link the company already has. Field values are kept, never deleted. The field is turned off only when every value became or already was a link; a value that is not a link keeps the field active. Running it again creates nothing new. Preview first with GET on the same path. Requires the settings.manage, clients.edit and clients.view_all permissions together.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

How many links were created, already there or left as text.

Media typeapplication/json
object
data
required

How many links a client custom field’s move created, found already there, or left as text.

object
created
required
integer
>= -9007199254740991 <= 9007199254740991
deactivated
required

True when this call turned the field off, which happens only when no value was left behind. Values are kept either way.

boolean
duplicates
required
integer
>= -9007199254740991 <= 9007199254740991
notLinks
required
integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"data": {
"created": 1,
"deactivated": true,
"duplicates": 1,
"notLinks": 1
}
}

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"
}
}

Company values changed while the links were moving; try again.

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"
}
}

A secret field, or a kind that never holds a link.

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.