Skip to main content
POST

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>.

Path Parameters

id
number
required

Numeric scope id.

Example:

42

Body

application/json
message
string
required

User message or intent used to compose relevant context (RAG query).

Minimum string length: 1
Example:

"What tables describe customer churn?"

limit
number

Optional cap on context items when the API falls back to structured JSON (no fragment markdown). Ignored when composed markdown is returned.

Required range: 1 <= x <= 200
Example:

25

Response

context
string
required

Composed context for the scope and intent (markdown from the context composer, or structured JSON fallback).

Example:

"## Retrieved Context\n\n### customers\n\n..."

contextItems
object[]
required
deprecated

Deprecated. Always an empty array. Use context for composed text (markdown or JSON fallback).

Example:
originalCount
number
required

Total context items in the scope's configured context selection (before composition strategies).

Example:

42

selectedCount
number
required

Context items the composer kept for this intent.

Example:

12

sessionId
string
required

Session id used for this composition (for correlation).

Example:

"api-skill-42-550e8400-e29b-41d4-a716-446655440000"