Replace a module’s field annotations
const url = 'https://api.sloose.com/orgs/org_9f3c/config/fields/accounts/annotations';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[{"apiName":"example","description":"example","format":"example","examples":["example"],"aliases":["example"],"pii":true,"derived":true,"defaultMapping":{"mode":"column","source":"example","staticValue":"example","transform":"example","skip":true,"searchField":"example","searchMethod":"example","searchExpression":"example","patch":{"when":["pending"],"overwrite":"always"}},"excluded":true}]'};
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://api.sloose.com/orgs/org_9f3c/config/fields/accounts/annotations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ { "apiName": "example", "description": "example", "format": "example", "examples": [ "example" ], "aliases": [ "example" ], "pii": true, "derived": true, "defaultMapping": { "mode": "column", "source": "example", "staticValue": "example", "transform": "example", "skip": true, "searchField": "example", "searchMethod": "example", "searchExpression": "example", "patch": { "when": [ "pending" ], "overwrite": "always" } }, "excluded": true } ]'Sets the whole annotation set for the module. An annotation is how an org teaches Sloose its own vocabulary: a friendlier label, a hint, whether the field holds personal data (which decides whether a sample can ever reach the model).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The org id the session was issued for. A token for one org can never read another.
Example
org_9f3cThe org id the session was issued for. A token for one org can never read another.
The module’s key or CRM API name — either is accepted.
Example
accountsThe module’s key or CRM API name — either is accepted.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
Responses
Section titled “Responses”Applied. Counts of what changed are included.
object
Example
{ "ok": true}The request body did not match the schema. issues carries the Zod issue list.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No bearer, or one that is expired, revoked or no longer resolves to a member.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}The bearer’s role is too low, or it was issued for a different org.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such module, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}