Skip to main content
POST
Create a custom context item

Authorizations

Authorization
string
header
required

A Modus personal access token (modus_<orgUuid>_<prefix>_<secret>) or an OAuth 2.1 access token, sent as Authorization: Bearer <token>.

Body

application/json
kind
enum<string>
required

Shape of custom context item to create.

Available options:
source,
collection,
entity,
field,
entity_samples
Example:

"entity"

sourceId
string
required

Stable identifier for the customer-defined source.

Example:

"billing-db"

sourceName
string

Display name for the customer-defined source.

Example:

"Billing database"

collectionId
string

Stable identifier for the collection inside the source.

Example:

"contracts"

collectionName
string

Display name for the collection.

Example:

"Contracts"

externalId
string

Stable identifier for the entity inside the collection.

Example:

"contract-123"

fieldName
string

Field name for field-level custom context.

Example:

"renewalDate"

name
string

Display name for the item.

Example:

"Acme renewal contract"

entityType
string

Customer-defined entity or field type.

Example:

"contract"

description
string

Human-readable description.

Example:

"Enterprise contract renewal metadata from the internal billing system."

content
object

Main textual or structured content for the custom item.

url
string

Customer-facing URL for the source object, when available.

Example:

"https://internal.example.com/contracts/contract-123"

attributes
object[]

Structured attributes for entity-level custom context.

dataType
string

Field data type for field-level custom context.

Example:

"timestamp"

value
object

Representative value for field-level custom context.

samples
object[]

Representative samples for entity sample context.

raw
object

Customer-specific fields that should be retained but are not part of the normalized contract.

topics
string[]

Topic tags for filtering.

Example:
idempotencyKey
string

Optional stable key used to make single-item creates idempotent.

Example:

"billing-db/contracts/contract-123"

access
object

Response

contextItemId
string
required

Stable uid of the created or updated custom context item.

Example:

"7a3f9d2c-1111-4000-a000-000000000abc"

contextType
string
required

Stored custom context type.

Example:

"custom_entity_metadata"

dataPath
string[]
required

Hierarchical path used to group custom context.

Example:
title
string | null
required

Display title resolved for the item.

Example:

"Acme renewal contract"