Curate one module
const url = 'https://api.sloose.com/orgs/org_9f3c/config/modules/accounts';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"key":"example","singular":"example","label":"example","enabled":true,"position":1,"color":"example","defaultEnabled":true,"uniqueFields":["example"],"defaultDuplicateCheck":{"searchField":"example","searchMethod":"example","expression":"example"},"excludedFields":["example"],"seedMappings":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.sloose.com/orgs/org_9f3c/config/modules/accounts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "key": "example", "singular": "example", "label": "example", "enabled": true, "position": 1, "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "seedMappings": "example" }'Enable it, rename it, set its singular, choose its unique fields and match defaults, exclude fields, or seed the mappings a new import starts from. Every field is optional; only what you send changes.
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
The name this module goes by in expressions and mappings.
The rec.<Singular> name used in expressions.
object
Examplegenerated
{ "key": "example", "singular": "example", "label": "example", "enabled": true, "position": 1, "color": "example", "defaultEnabled": true, "uniqueFields": [ "example" ], "defaultDuplicateCheck": { "searchField": "example", "searchMethod": "example", "expression": "example" }, "excludedFields": [ "example" ], "seedMappings": "example"}Responses
Section titled “Responses”The module as it now stands.
object
A discovered CRM module with the org’s curation applied.
object
False once discovery stops seeing the module in the CRM.
Examplegenerated
{ "module": { "id": "example", "key": "example", "apiName": "example", "singular": "example", "enabled": true, "present": true, "position": 1 }, "registryVersion": 1}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 plan’s module limit would be exceeded (code: LIMIT_MODULES), or the org is suspended.
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"}Another module already uses that key or singular.
object
Example
{ "code": "KEY_CLASH"}