Skip to content

Curate one module

PATCH
/orgs/{org}/config/modules/{module}
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.

org
required

The org id the session was issued for. A token for one org can never read another.

string
Example
org_9f3c

The org id the session was issued for. A token for one org can never read another.

module
required

The module’s key or CRM API name — either is accepted.

string
Example
accounts

The module’s key or CRM API name — either is accepted.

Media typeapplication/json
object
key

The name this module goes by in expressions and mappings.

string
/^[a-z][a-z0-9_]*$/
singular

The rec.<Singular> name used in expressions.

string
/^[A-Za-z_$][\w$]*$/
label
string
>= 1 characters
enabled
boolean
position
integer
color
string | null
defaultEnabled
boolean
uniqueFields
Array<string> | null
defaultDuplicateCheck
object
searchField
string
searchMethod
string
expression
string
excludedFields
Array<string> | null
seedMappings
object | null
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"
}

The module as it now stands.

Media typeapplication/json
object
module
required

A discovered CRM module with the org’s curation applied.

object
id
required
string
key
required
string
apiName
required
string
singular
required
string | null
enabled
required
boolean
present
required

False once discovery stops seeing the module in the CRM.

boolean
position
required
number | null
key
additional properties
registryVersion
required
number
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.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The plan’s module limit would be exceeded (code: LIMIT_MODULES), or the org is suspended.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such module, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Another module already uses that key or singular.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: KEY_CLASH
key
additional properties
Example
{
"code": "KEY_CLASH"
}