Skip to main content

Devs.ai API (1.0)

Download OpenAPI specification:Download

Public HTTP contract for external clients (mobile, desktop, and other frontends). Canonical file: public/openapi-spec.json, also served at GET /api/v1/openapi and /openapi-spec.json. The Responses API is the Responses API v2 tag, mounted at /api/v2/responses and, as an OpenAI-compatible alias, at /api/v1/responses.

AI Management

Create, retrieve, and manage AI assistants

Authorize an assistant message delivery

Used by the messaging gateway before delivery. Requires a linked Slack member with chats.write.self and assistant_slack enabled. The organization, user, account link and Slack subject must match the bearer token. Returns deliver only for the current primary assistant, selected active workspace, and a visible check-in from the same local day, within the delivery window and under 12 hours old. Returns skip when delivery is no longer eligible. This endpoint does not send a Slack message.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
schemaVersion
required
integer
Value: 1
kind
required
string
Value: "check_in"
channel
required
string
Value: "slack"
orgId
required
string [ 1 .. 128 ] characters
userId
required
string [ 1 .. 128 ] characters
messageId
required
string [ 1 .. 128 ] characters
linkId
required
string [ 1 .. 128 ] characters
workspaceId
required
string [ 1 .. 128 ] characters
subject
required
string [ 1 .. 128 ] characters

Responses

Request samples

Content type
application/json
{
  • "schemaVersion": 1,
  • "kind": "check_in",
  • "channel": "slack",
  • "orgId": "string",
  • "userId": "string",
  • "messageId": "string",
  • "linkId": "string",
  • "workspaceId": "string",
  • "subject": "string"
}

Response samples

Content type
application/json
{
  • "kind": "deliver",
  • "text": "string",
  • "name": "string",
  • "avatarUrl": "string",
  • "webUrl": "http://example.com",
  • "expiresAt": 0,
  • "openAssistantLabel": "string"
}

Get a token for a Slack file upload

Requires a linked Slack member with chats.write.self and the assistant_slack feature flag. Returns a Vercel Blob client token. Use the returned access value for the upload. The maximum file size is 25 MiB. No completion callback is required.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
type
required
string
Value: "blob.generate-client-token"
required
object

Responses

Request samples

Content type
application/json
{
  • "type": "blob.generate-client-token",
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "type": "blob.generate-client-token",
  • "clientToken": "string",
  • "access": "public",
  • "sessionCompleteRequired": false
}

Start a Slack assistant turn

Requires a linked Slack member with chats.write.self and the assistant_slack feature flag. A repeat request for the same Slack message returns the existing turn. Files must be staged before a text request. A card action replaces text and cannot carry files or skipped attachments. AI Companion validates the stored response, member ownership, cards flag, 24-hour age limit, and current assistant conversation or side thread. An invalid or stale card returns 409 with kind not_eligible and reason stale_card without starting a turn. The member message contains only the stored button label and records the card action in message metadata.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
One of
Any of
text
required
string <= 40000 characters \S
teamId
required
string <= 128 characters ^[A-Za-z0-9]+$
channelId
required
string <= 128 characters ^[A-Za-z0-9]+$
ts
required
string <= 64 characters ^\d+\.\d+$
object
required
Array of objects <= 10 items
Array of objects
object

A reference to a button in the stored assistant card. AI Companion validates the card and sends only its visible label as the member message.

Array of objects <= 3 items

Source text kept separate from the member words. AI Companion stores each source inside an escaped untrusted-content marker.

notices
Array of strings <= 8 items [ items <= 2000 characters ]

Responses

Request samples

Content type
application/json
{
  • "files": [
    ],
  • "teamId": "string",
  • "channelId": "string",
  • "ts": "string",
  • "anchor": {
    },
  • "text": "string",
  • "skipped": [
    ],
  • "cardAction": {
    },
  • "quoted": [
    ],
  • "notices": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "kind": "started",
  • "responseId": "string",
  • "chatId": "string",
  • "messageId": "string",
  • "assistant": {
    },
  • "webUrl": "http://example.com"
}

Answer a paused Slack assistant turn

Requires a linked Slack member with chats.write.self and the assistant_slack feature flag. The call ids must match the current approval step. The response identifies the continued or restarted turn.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string^[A-Za-z0-9_-]{1,128}$
Request Body schema: application/json
required
callIds
required
Array of strings non-empty unique [ items [ 1 .. 255 ] characters ]
decision
required
string
Enum: "allow_once" "always_allow" "deny"

Responses

Request samples

Content type
application/json
{
  • "callIds": [
    ],
  • "decision": "allow_once"
}

Response samples

Content type
application/json
{
  • "kind": "continued",
  • "responseId": "string"
}

Read every argument of a waiting Slack approval step

Requires a linked Slack member with chats.read.self and the assistant_slack feature flag. The call ids must match the current approval step of the member's own paused turn. Secret values are masked.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string^[A-Za-z0-9_-]{1,128}$
query Parameters
callIds
required
string [ 1 .. 4000 ] characters

Comma-separated call ids of the waiting step.

Responses

Response samples

Content type
application/json
{
  • "calls": [
    ]
}

Get integration identity status

Requires chats.write.self. Returns the organization feature flags with Cache-Control: no-store.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "assistantSlack": true,
  • "assistantSlackCards": true
}

Create New AI

Creates a new AI specified by the given identifier.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
src
required
string
name
required
string
introduction
string or null
description
required
string
instructions
required
string
seed
string
modelId
string
visibility
string (AIVisibility)
Enum: "PRIVATE" "GROUP" "ORGANIZATION" "ANYONE_WITH_LINK"

Visibility level controlling who can access the AI. PRIVATE: Only the owner can access. GROUP: Only specified groups can access. ORGANIZATION: Anyone in the organization can access. ANYONE_WITH_LINK: Anyone with the link can access.

listInOrgCatalog
boolean
listInPublicCatalog
boolean
listInTenantCatalog
boolean
generateCitations
boolean
chatLogsVisible
boolean
intermediateStepsVisible
boolean
object (AIModelOptions)

Configuration options for the AI model's behavior

groups
Array of strings
object (AIProfile)
Array of objects (AIEditorUser)
publicCategories
Array of strings (PublicCategoryType)
Items Enum: "ACCOUNTING_FINANCE" "AI_MODELS" "ENGINEERING" "HUMAN_RESOURCES" "INFORMATION_TECHNOLOGY" "LEARNING_DEVELOPMENT" "MARKETING" "PRODUCTIVITY" "SALES" "ADVISOR" "FEATURED"
orgCategoryIds
Array of strings
voiceModelId
string or null

Realtime voice model the agent's voice calls start with. Send together with speakerVoiceId: both set to choose a voice, or both null to clear it. Setting a new voice requires the realtime_voice_call and agent_voice_preset features; the stored pair can always be resent.

speakerVoiceId
string or null

Speaker voice of voiceModelId that the agent's voice calls start with. Send together with voiceModelId: both set to choose a voice, or both null to clear it.

object or null

Personality traits the agent answers with. Omit the key to keep the stored value. Send null to clear it. Send a complete object to replace it.

Responses

Request samples

Content type
application/json
{
  • "src": "string",
  • "name": "string",
  • "introduction": "string",
  • "description": "string",
  • "instructions": "string",
  • "seed": "string",
  • "modelId": "string",
  • "visibility": "PRIVATE",
  • "listInOrgCatalog": true,
  • "listInPublicCatalog": true,
  • "listInTenantCatalog": true,
  • "generateCitations": true,
  • "chatLogsVisible": true,
  • "intermediateStepsVisible": true,
  • "options": {
    },
  • "groups": [
    ],
  • "profile": {
    },
  • "editors": [
    ],
  • "publicCategories": [
    ],
  • "orgCategoryIds": [
    ],
  • "voiceModelId": "string",
  • "speakerVoiceId": "string",
  • "personality": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "introduction": "string",
  • "description": "string",
  • "instructions": "string",
  • "src": "string",
  • "orgId": "string",
  • "userId": "string",
  • "profile": {
    },
  • "userName": "string",
  • "orgName": "string",
  • "visibility": "PRIVATE",
  • "listInOrgCatalog": true,
  • "listInPublicCatalog": true,
  • "listInTenantCatalog": true,
  • "chatLogsVisible": true,
  • "generateCitations": true,
  • "intermediateStepsVisible": true,
  • "modelId": "string",
  • "options": {
    },
  • "groups": [
    ],
  • "editors": [
    ],
  • "publicCategories": [
    ],
  • "orgCategoryIds": [
    ],
  • "messageCount": 0,
  • "rating": 0,
  • "ratingCount": 0,
  • "isShared": true,
  • "hasUserChats": true,
  • "isApprovedByOrg": true,
  • "isPremiumModel": true,
  • "isDeleted": true,
  • "voiceModelId": "string",
  • "speakerVoiceId": "string"
}

Import Agent

Creates a new agent from a portable AgentBundle. Tool secrets can be supplied via the secrets map. Skills are imported only when the caller has SKILLS WRITE permission; otherwise they are skipped with a warning. If the bundle model is unavailable, the first available model is substituted and a warning is returned.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
object (AgentBundle)

Portable agent definition for export and import. Secrets are stripped from tool data and listed in requiredSecrets.

name
string

Optional override for the imported agent name.

object

Credential values keyed by requiredSecrets entries.

Responses

Request samples

Content type
application/json
{
  • "bundle": {
    },
  • "name": "string",
  • "secrets": {
    }
}

Response samples

Content type
application/json
{
  • "aiId": "string",
  • "warnings": [
    ]
}

Get AI Details

Retrieves details of the AI specified by the given identifier.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI whose details are to be retrieved.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "introduction": "string",
  • "description": "string",
  • "instructions": "string",
  • "src": "string",
  • "orgId": "string",
  • "userId": "string",
  • "profile": {
    },
  • "userName": "string",
  • "orgName": "string",
  • "visibility": "PRIVATE",
  • "listInOrgCatalog": true,
  • "listInPublicCatalog": true,
  • "listInTenantCatalog": true,
  • "chatLogsVisible": true,
  • "generateCitations": true,
  • "intermediateStepsVisible": true,
  • "modelId": "string",
  • "options": {
    },
  • "groups": [
    ],
  • "editors": [
    ],
  • "publicCategories": [
    ],
  • "orgCategoryIds": [
    ],
  • "messageCount": 0,
  • "rating": 0,
  • "ratingCount": 0,
  • "isShared": true,
  • "hasUserChats": true,
  • "isApprovedByOrg": true,
  • "isPremiumModel": true,
  • "isDeleted": true,
  • "voiceModelId": "string",
  • "speakerVoiceId": "string",
  • "personality": {
    }
}

Update AI

Updates an agent. Not a sparse patch: name, description and instructions are required on every call, and omitting other fields does not preserve them. Changing modelId revalidates the model against the agents surface. Listing an agent in the Network Catalog requires instance-level write; listing it in the Tenant Catalog requires tenant owner organization admin. Requires AI WRITE, and the caller must own the agent, hold organization, tenant or instance write over it, or have been granted edit access.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the agent.

Request Body schema: application/json
required
src
string
name
required
string
introduction
string or null
description
required
string
instructions
required
string
modelId
string
visibility
string (AIVisibility)
Enum: "PRIVATE" "GROUP" "ORGANIZATION" "ANYONE_WITH_LINK"

Visibility level controlling who can access the AI. PRIVATE: Only the owner can access. GROUP: Only specified groups can access. ORGANIZATION: Anyone in the organization can access. ANYONE_WITH_LINK: Anyone with the link can access.

listInOrgCatalog
boolean
listInPublicCatalog
boolean
listInTenantCatalog
boolean
generateCitations
boolean
chatLogsVisible
boolean
intermediateStepsVisible
boolean
object (AIModelOptions)

Configuration options for the AI model's behavior

groups
Array of strings
object (AIProfile)
Array of objects (AIEditorUser)
publicCategories
Array of strings (PublicCategoryType)
Items Enum: "ACCOUNTING_FINANCE" "AI_MODELS" "ENGINEERING" "HUMAN_RESOURCES" "INFORMATION_TECHNOLOGY" "LEARNING_DEVELOPMENT" "MARKETING" "PRODUCTIVITY" "SALES" "ADVISOR" "FEATURED"
orgCategoryIds
Array of strings
voiceModelId
string or null

Realtime voice model the agent's voice calls start with. Send together with speakerVoiceId: both set to choose a voice, or both null to clear it. Setting a new voice requires the realtime_voice_call and agent_voice_preset features; the stored pair can always be resent.

speakerVoiceId
string or null

Speaker voice of voiceModelId that the agent's voice calls start with. Send together with voiceModelId: both set to choose a voice, or both null to clear it.

object or null

Personality traits the agent answers with. Omit the key to keep the stored value. Send null to clear it. Send a complete object to replace it.

Responses

Request samples

Content type
application/json
{
  • "src": "string",
  • "name": "string",
  • "introduction": "string",
  • "description": "string",
  • "instructions": "string",
  • "modelId": "string",
  • "visibility": "PRIVATE",
  • "listInOrgCatalog": true,
  • "listInPublicCatalog": true,
  • "listInTenantCatalog": true,
  • "generateCitations": true,
  • "chatLogsVisible": true,
  • "intermediateStepsVisible": true,
  • "options": {
    },
  • "groups": [
    ],
  • "profile": {
    },
  • "editors": [
    ],
  • "publicCategories": [
    ],
  • "orgCategoryIds": [
    ],
  • "voiceModelId": "string",
  • "speakerVoiceId": "string",
  • "personality": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "introduction": "string",
  • "description": "string",
  • "instructions": "string",
  • "src": "string",
  • "orgId": "string",
  • "userId": "string",
  • "profile": {
    },
  • "userName": "string",
  • "orgName": "string",
  • "visibility": "PRIVATE",
  • "listInOrgCatalog": true,
  • "listInPublicCatalog": true,
  • "listInTenantCatalog": true,
  • "chatLogsVisible": true,
  • "generateCitations": true,
  • "intermediateStepsVisible": true,
  • "modelId": "string",
  • "options": {
    },
  • "groups": [
    ],
  • "editors": [
    ],
  • "publicCategories": [
    ],
  • "orgCategoryIds": [
    ],
  • "messageCount": 0,
  • "rating": 0,
  • "ratingCount": 0,
  • "isShared": true,
  • "hasUserChats": true,
  • "isApprovedByOrg": true,
  • "isPremiumModel": true,
  • "isDeleted": true,
  • "voiceModelId": "string",
  • "speakerVoiceId": "string"
}

Delete AI

Soft-deletes an agent and removes its data source links, permissions, tools and group links. Requires AI WRITE with the same ownership or edit-access rules as update.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the agent.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Export Agent

Exports an agent and its configuration as a portable AgentBundle JSON document. Secrets are stripped from tool configurations and listed in requiredSecrets. Skills are included only when the caller has SKILLS READ permission. Organization-scoped callers can export agents in their org; instance-level callers can export across orgs.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the agent to export.

query Parameters
includeDataSources
string
Default: "true"
Enum: "true" "false"

Whether to include data sources in the export. Defaults to true.

dataSourceIds
string

Comma-separated list of specific data source IDs to include. When provided, only the listed data sources are exported.

Responses

Response samples

Content type
application/json
{
  • "version": "1.0",
  • "exportedAt": "2019-08-24T14:15:22Z",
  • "source": {
    },
  • "agent": {
    },
  • "tools": [
    ],
  • "userInputs": [
    ],
  • "flows": [
    ],
  • "dataSources": [
    ],
  • "skills": [
    ],
  • "requiredSecrets": [
    ]
}

Approve an AI

Marks an AI as approved by the organization.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI to be approved.

Responses

Revoke AI approval

Revokes the organization approval for an AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI whose approval is to be revoked.

Responses

Generate AI profile

Generates an AI profile based on existing AI data.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
{
  • "headline": "string",
  • "description": "string",
  • "features": [
    ],
  • "initialSuggestedActions": [
    ],
  • "showCharacter": true,
  • "showTraining": true,
  • "showPersonality": true,
  • "trainingDescription": "string",
  • "conversations": [
    ],
  • "socialImage": "string",
  • "idleVideo": "string",
  • "idleVideoError": "string",
  • "showSpeaker": true,
  • "showVideo": true,
  • "voice": "string",
  • "voiceEngine": "string",
  • "videoModel": "string"
}

Share an AI

Shares the AI with the provided emails.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
emails
required
string

Responses

Request samples

Content type
application/json
{
  • "emails": "string"
}

List AIs

query Parameters
scope
string (ListAIsRequestScope)
Enum: "PRIVATE" "OWNED" "GROUP" "SHARED" "ORGANIZATION" "PUBLIC" "ALL"

The scope to filter results by

groupId
string

The id of a group to filter results by

categoryId
string

The id of a category to filter results by

orgCategoryId
string

The id of a tenant category or category folder to filter results by

approvedByOrg
boolean

Filter results by whether the AI has been approved by the organization.

search
string

Search term

userName
string

Exact agent author name

childOrgId
string

Child organization id used with the CHILD_ORG scope

sort
string
Enum: "newest" "popularity" "rating" "alphabetically"

Stable ordering applied to this page and its continuation cursor

pageNumber
integer

Zero-based page number. When omitted, all matching AIs are returned.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List AIs with cursor pagination

query Parameters
scope
string (ListAIsRequestScope)
Enum: "PRIVATE" "OWNED" "GROUP" "SHARED" "ORGANIZATION" "PUBLIC" "ALL"

The scope to filter results by

groupId
string

The id of a group to filter results by

categoryId
string

The id of a category to filter results by

orgCategoryId
string

The id of a tenant category or category folder to filter results by

approvedByOrg
boolean

Filter results by whether the AI has been approved by the organization.

search
string

Search term

userName
string

Exact agent author name

childOrgId
string

Child organization id used with the CHILD_ORG scope

sort
string
Enum: "newest" "popularity" "rating" "alphabetically"

Stable ordering applied to this page and its continuation cursor

cursor
string <= 4096 characters

Opaque continuation cursor returned by the previous page

limit
integer [ 1 .. 100 ]
Default: 24

Maximum number of agents to return

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get the settings of the primary assistant of the current user

Returns the stored name, avatar, personality, model, and voice preset of the caller's own primary assistant in the caller's organization. Only a member can call it, and only when the organization has assistants turned on.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "aiId": "string",
  • "name": "string",
  • "avatar": "string",
  • "personality": {
    },
  • "modelId": "string",
  • "voicePreset": {
    },
  • "platformActionsEnabled": true,
  • "faceEnabled": true,
  • "autoSummonEnabled": true,
  • "outfit": {
    },
  • "characterLook": {
    },
  • "characterOptions": [
    ]
}

Change one setting of the primary assistant of the current user

Changes exactly one of the name, avatar, personality, model, voice preset, platform actions switch, face switch, orb outfit, Slack account for assistant notices, notice email switch, check-in switch, meeting notes switch, answer to the meeting notes offer, check-in time zone, check-in times, or check-in sources of the caller's own primary assistant, and returns the stored settings after the change. A body with more than one setting, or with an unknown field, is refused. It never completes onboarding. Only a member can call it, and only when the organization has assistants turned on.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
One of
name
required
string [ 1 .. 200 ] characters

New name, trimmed and not blank.

Responses

Request samples

Content type
application/json
{
  • "checkInExcludedSources": [
    ]
}

Response samples

Content type
application/json
{
  • "aiId": "string",
  • "name": "string",
  • "avatar": "string",
  • "personality": {
    },
  • "modelId": "string",
  • "voicePreset": {
    },
  • "platformActionsEnabled": true,
  • "faceEnabled": true,
  • "autoSummonEnabled": true,
  • "outfit": {
    },
  • "characterLook": {
    },
  • "characterOptions": [
    ]
}

Get the email address of the primary assistant of the current user

Returns the caller's own assistant mailbox: the newest address that is provisioning or active, the mail domain, and a suggested address name. The read writes nothing and creates no assistant. When the assistant_mailbox feature flag is off for the caller, or the agent mailbox environment is not configured, available is false and mailbox, domain and suggestedLocalPart are null. Only a member can call it.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "available": true,
  • "mailbox": {
    },
  • "domain": "agents.devs.ai",
  • "suggestedLocalPart": "ari"
}

Create or replace the email address of the primary assistant of the current user

With no replaceAddress, creates the caller's assistant address, or returns the existing one with 200 and creates nothing. With replaceAddress, provisions a new address first and then revokes every other address of the caller; email to the old address is dropped from that moment. A repeated request that names an address that was already replaced returns the current address with 200. With localPart, the new address is exactly @, with no number added; a name that is a role name or is not free for the caller gets 409 and saves nothing. With no localPart, the name is made from the assistant name. A member can create at most 10 addresses in one organization in 24 hours. Error bodies carry a stable code.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
optional
localPart
string [ 3 .. 40 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The chosen address name, the text before the @. Trimmed and made lower case before the test. Leave it out to make the name from the assistant name, with a number when that name is taken.

replaceAddress
string <= 320 characters

The current address to replace. Compared without case. Leave it out to create the address.

Responses

Request samples

Content type
application/json
{
  • "localPart": "string",
  • "replaceAddress": "string"
}

Response samples

Content type
application/json
{
  • "available": true,
  • "mailbox": {
    }
}

Remove the email address of the primary assistant of the current user

Revokes every address of the caller's assistant mailbox. Email to it is dropped with no reply. A revoked address never becomes active again. Returns 204 also when the caller has no address.

Authorizations:
ApiKeyAuth

Responses

List the agents the primary assistant of the current user has called

Returns the agents the caller's own primary assistant has called at least once, in name order then agent id, with each agent's avatar, name, owner name, description, call count, last call time and Hide from search state. An agent the caller can no longer view, and a deleted agent, is absent. Only a member can call it, and only when the organization has assistants turned on.

Authorizations:
ApiKeyAuth
query Parameters
cursor
string

Opaque cursor from the previous page.

limit
integer [ 1 .. 50 ]
Default: 24

Page size.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Hide or show a called agent for the primary assistant of the current user

Sets the caller's Hide from search setting for one agent their own primary assistant has called. It keeps the agent out of the assistant's specialist search and agent listing, and never stops a call: a tagged call still runs. A value that already matches writes nothing. Only a member can call it, and only when the organization has assistants turned on.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The agent id.

Request Body schema: application/json
required
hiddenFromSearch
required
boolean

True hides the agent from the assistant's specialist search and agent listing. False shows it again.

Responses

Request samples

Content type
application/json
{
  • "hiddenFromSearch": true
}

Response samples

Content type
application/json
{
  • "aiId": "string",
  • "hiddenFromSearch": true
}

Suggest specialists for a draft of the current user

Returns up to 3 agents that the caller can view now and that strongly match the draft, before it is sent to the caller's own primary assistant. It reads only the agent name and description, and never returns a Network agent. A draft with too few meaningful terms, flags that are off, a caller with no primary assistant, or the Auto-summon agents setting turned off give an empty list. A failed read of the flags, the primary assistant, the caller's groups, the hidden agents, the index, or the agents gives an empty list with unavailable true, never a server error. Only a member can call it, at most 60 times a minute.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
text
required
string [ 1 .. 1000 ] characters

The draft. It is trimmed before the length check.

purpose
string
Default: "draft"
Enum: "draft" "refine"

draft for a typed message, which returns only strong matches. refine for the refine text of the specialist choice card, which returns each hit with one matched term.

Responses

Request samples

Content type
application/json
{
  • "text": "string",
  • "purpose": "draft"
}

Response samples

Content type
application/json
{
  • "query": "string",
  • "agents": [
    ],
  • "unavailable": true
}

Chat Sessions

Manage chat sessions and send messages to AI assistants

Get all chats for the AI

Retrieves a list of all chat sessions associated with the given AI identifier.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI whose chats are to be retrieved.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new chat session for the AI

Creates a new chat session associated with the given AI identifier and returns the created chat session data.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI with which the chat session is to be associated.

Request Body schema: application/json
optional
name
string

Optional name for the chat session.

source
string

Chat source, for example UI or API. An API key's own source wins over this field.

modelId
string

Optional model override for the chat.

ephemeral
boolean

A temporary chat that is not kept in the chat list.

parentChatId
string [ 1 .. 191 ] characters

The conversation this chat is opened from. Honoured only when the caller owns it.

workingAgentId
string [ 1 .. 200 ] characters
defaultAssistant
boolean

Open a new, non-temporary chat with the caller's primary assistant.

clientCapabilities
Array of strings <= 16 items [ items [ 1 .. 64 ] characters ]

What a native client or the Devs.ai desktop app can show, for example canvas or tool_cards. Recorded only for those clients. Unknown values are ignored.

integration_context
object

Integration context for chats created by an integration.

object <= 16 properties

A string map that describes where a key-bound client (an API key bound to a chat source) opened the chat. Keys match ^[a-zA-Z][a-zA-Z0-9_]{0,63}$. Accepted only from a key-bound key, which must send it and no other field; any other caller gets a 400. The bound source's adapter checks its own keys: the Office add-in key must send exactly host (excel or powerpoint) and documentName. The host sets the chat's source (EXCEL or POWERPOINT), and the document name is returned as documentName. Recorded once on the chat.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "source": "string",
  • "modelId": "string",
  • "ephemeral": true,
  • "parentChatId": "string",
  • "workingAgentId": "string",
  • "defaultAssistant": true,
  • "clientCapabilities": [
    ],
  • "integration_context": { },
  • "clientContext": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    }
}

Get a chat session

Retrieves the chat session with the specified ID.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to retrieve.

query Parameters
messageLimit
integer [ 1 .. 200 ]

Returns only the newest N messages of the chat. Read older messages with GET /api/v1/chats/{chatId}/messages?before=. Without this parameter, the chat comes with its full history.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Message a chat session

Send a message to a chat session with an AI.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Request Body schema: application/json
required
date
string <date-time>

The date and time of the chat from the perspective of the user. This may be different from the server time for the AI. Defaults to server time if not provided.

required
string or (Array of ComplexMessageContent (TextMessageContent (object) or IdMessageContent (object) or UrlMessageContent (object)))

Message to send to the AI. Can be a string for simple text messages, or a ComplexMessageContent array that includes text and file references (images, documents, audio, video).

modelId
string

Optional model ID to override the AI's default model for this request.

object (ChatOptions)
Array of any (PostToChatRequestTool)

Array of tools to enable for this chat request. Each tool can be a built-in tool type (e.g. web_search, python), an image generation tool with model configuration, an MCP server tool reference, or an OpenAI-compatible function tool definition.

object

Optional key-value map of user-provided secrets that may be required by tools (e.g. API keys for authenticated tool calls).

Responses

Request samples

Content type
application/json
Example
{
  • "date": "2024-01-15T10:30:00Z",
  • "prompt": "Hello, how are you?",
  • "tools": [ ]
}

Delete a chat session

Deletes the chat session with the specified ID.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to delete.

Responses

Archive a chat session

Archives the chat session with the specified ID. An archived chat is absent from every list that shows a person their own chats, and stays in the audit lists and in search. Archiving clears the chat's pin. Archiving a chat that is already archived changes nothing, so a retried request is safe.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to archive.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Move a chat session to a project

Links the chat session and every chat whose parent is this chat to the project, in one transaction. Only the chat owner can move a chat, as a browser user or with the desktop app. The project must be active, and the caller must be its owner or an accepted member. The chat must be a top-level chat with no agent, not archived and not ephemeral, from the web app, a project or the desktop app, and no routine can post into it. The refusals are checked in this order: the chat (404), the chat rules (400), the project (404, then 403), then the conflicts (409).

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Request Body schema: application/json
required
projectId
required
string [ 1 .. 32 ] characters

The public id of the target project.

Responses

Request samples

Content type
application/json
{
  • "projectId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "messagedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "summary": "string",
  • "orgId": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "source": "UI",
  • "ai": {
    },
  • "aiId": "string",
  • "modelId": "string",
  • "ephemeral": true,
  • "isDeleted": true,
  • "isArchived": true,
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "autoArchiveBehaviour": "INHERIT",
  • "projectId": "string",
  • "sandboxId": "string",
  • "browserSandboxId": "string",
  • "documentName": "string",
  • "defaultAssistant": true,
  • "desktopClient": true,
  • "parentChatId": "string",
  • "parentMessageId": "string",
  • "project": {
    }
}

Remove a chat session from its project

Deletes the project link of the chat session and of every chat whose parent is this chat, in one transaction. The chat stays with its owner. The chat owner can always remove the chat, whatever the project status and also after they leave the project. The project owner can remove any chat of the project.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "messagedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "summary": "string",
  • "orgId": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "source": "UI",
  • "ai": {
    },
  • "aiId": "string",
  • "modelId": "string",
  • "ephemeral": true,
  • "isDeleted": true,
  • "isArchived": true,
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "autoArchiveBehaviour": "INHERIT",
  • "projectId": "string",
  • "sandboxId": "string",
  • "browserSandboxId": "string",
  • "documentName": "string",
  • "defaultAssistant": true,
  • "desktopClient": true,
  • "parentChatId": "string",
  • "parentMessageId": "string",
  • "project": {
    }
}

Unarchive a chat session

Clears the archive state of the chat session with the specified ID, so it returns to every list that shows a person their own chats, and sets its auto-archive behaviour to DISABLED in the same write, so auto-archive never archives it again until the caller sets the behaviour back. Unarchiving a chat that is already active changes nothing, so a retried request is safe and writes no behaviour.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to unarchive.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Set a chat session's auto-archive behaviour

Sets the chat session's own auto-archive instruction and answers the updated chat. INHERIT follows the owner's setting, ENABLED auto-archives the chat even while the owner has auto-archive off, and DISABLED never auto-archives it. Only a chat that Archive accepts can carry the instruction.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to set.

Request Body schema: application/json
required
behaviour
required
string
Enum: "INHERIT" "ENABLED" "DISABLED"

The chat's own auto-archive instruction. INHERIT follows the owner's setting, ENABLED auto-archives the chat even while the owner has auto-archive off, and DISABLED never auto-archives it.

Responses

Request samples

Content type
application/json
{
  • "behaviour": "INHERIT"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Duplicate a chat session

Creates a duplicate of the chat session with the specified ID.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to duplicate.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Reset a chat session

Resets the chat session with the specified ID, clearing its current state or content.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session to reset.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "isArchived": true,
  • "autoArchiveBehaviour": "INHERIT",
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "source": "string",
  • "documentName": "string",
  • "preview": "string",
  • "ai": {
    },
  • "messages": [
    ]
}

Open the side thread of a message

Gets or creates the side thread of one message of a chat. A side thread is a child chat that hangs off one message (the anchor message) of a default-assistant chat. It has the parent's agent, model and source, and it is not in the chat list. One message has at most one side thread, so a second call returns the same chat. Send replies with POST /api/v2/responses and conversation set to the returned chat id. The request has no body. The organization feature flag superagents_chat_threads gates this route: when it is off, the route answers 404.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The parent chat: a top-level default-assistant chat of the caller.

messageId
required
string

The anchor message: a visible user or assistant message of the chat.

Responses

Response samples

Content type
application/json
{
  • "chat": {
    }
}

Remove a chat reference from a sent message

Sets the removed mark on the chat reference parts of a sent user message that point to one referenced chat. The reference stays in the message and shows as removed, and the server does not load that chat into later model calls. Only the owner of the chat can remove a reference. The route refuses a removal while a response runs in the chat. A repeated call gives the same result, and it also updates a chat history cache that an earlier call could not update. The request has no body.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The chat that holds the message. The caller must own it.

messageId
required
string

A user message of the chat.

referencedChatId
required
string

The chatId of the chat reference part to remove.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

List the side threads of a chat

Returns the live side threads of a chat, each with its anchor message and its reply count. A reply is a visible message of the side thread that no retry replaced. A chat with no side threads returns an empty list. The organization feature flag superagents_chat_threads gates this route: when it is off, the route answers 404.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The parent chat: a top-level default-assistant chat of the caller.

Responses

Response samples

Content type
application/json
{
  • "sideThreads": [
    ]
}

Submit tool outputs (e.g., input field responses)

When the AI requests user input through tool calls (e.g., asking the user to fill in form fields), use this endpoint to submit the user's responses. The AI will receive these outputs and continue the conversation. Listen for 'tool.call' events in the chat stream to know when input is needed.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Request Body schema: application/json
required
systemMessageId
required
string

The ID of the system message that requested the tool outputs (the message containing the tool calls).

required
Array of objects (ToolOutput)

Array of tool outputs, one for each tool call that needs a response.

object (ChatOptions)

Responses

Request samples

Content type
application/json
Example

Example of submitting a user's name when the AI requests it.

{
  • "systemMessageId": "msg_abc123",
  • "outputs": [
    ]
}

Get all chats for the User

Retrieves a list of all chat sessions associated with the current user, newest message first, 30 per page. An API key bound to chat sources (the Office add-in key) lists only its own sources.

Authorizations:
ApiKeyAuth
query Parameters
page
integer >= 0
Default: 0

The page number, from 0.

pinned
string
Enum: "true" "false"

Only pinned (true) or only unpinned (false) chats.

a
string

Comma-separated agent ids.

m
string

Comma-separated model ids, for chats without an agent.

source
string

Only chats with one of these sources, for example EXCEL or EXCEL,POWERPOINT. Repeated or comma separated. An unknown source is a 400. A key-bound API key may name only its own sources (400 otherwise); without this parameter it gets all of them.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Search the chats of the User

Searches the caller's own chats of the sources that a person can archive (UI and API). A deleted chat is never a result. An archived chat is a result. A side thread is a result only when the organization has chat threads on. Results follow relevance, then the newest update. Without include_messages, recent and exclude_chat_id, the response holds each chat with its indexed messages.

Authorizations:
ApiKeyAuth
query Parameters
q
required
string

The text to search for. It may be empty, which finds nothing unless recent is true.

cursor
string

Opaque cursor from pagination.nextCursor of the previous page. A cursor of a recent search works only with a recent search. A malformed cursor is a 400.

limit
integer [ 1 .. 100 ]

The page size. Without cursor and limit, the server reads every page and returns all results.

include_messages
string
Default: "true"
Enum: "true" "false" "1" "0"

With false, the response holds the light result (ChatSearchHitsResponse): each hit has no messages, and the server does not read them from the index. With true or no value, each chat holds its messages.

recent
string
Default: "false"
Enum: "true" "false" "1" "0"

With true and an empty q, the response holds the most recently updated chats, newest first, with the same filters as a text search and no relevance step. The page holds at most 20 chats, whatever limit says. With a q that has text, recent has no effect.

exclude_chat_id
string non-empty

The id of a chat that is never a result. The composer sends the chat that the person is in.

Responses

Response samples

Content type
application/json
Example
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get the caller's chat auto-archive setting

Returns the caller's own auto-archive setting. A person who never saved one reads auto-archive off with 30 days, so a client renders the page without a separate unset case.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "retentionDays": 1
}

Save the caller's chat auto-archive setting

Saves the caller's own auto-archive setting and answers the saved value. A save of the value the caller already has writes nothing. The setting is per person and applies to the chats the caller owns.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
enabled
required
boolean

Whether auto-archive is on for the caller's own chats.

retentionDays
required
integer [ 1 .. 365 ]

How many days a chat may stay untouched before auto-archive archives it. A value outside 1 to 365, or a value that is not an integer, is a 400.

Responses

Request samples

Content type
application/json
{
  • "enabled": true,
  • "retentionDays": 1
}

Response samples

Content type
application/json
{
  • "enabled": true,
  • "retentionDays": 1
}

Create a chat

Creates one chat for the caller. The body is optional: an empty body creates an ordinary UI chat. source names where the chat was opened and modelId names its model; projectId puts the chat in a project and requires owner or accepted membership, proved before the chat exists. The created answer carries projectId when the chat belongs to a project. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
optional
name
string
parentChatId
string [ 1 .. 191 ] characters

The conversation this chat is opened from. Honoured only when the caller owns that conversation.

source
string (ChatSourceDto)
Enum: "UI" "SLACK" "EMBED" "API" "WORKFLOW_SANDBOX" "TEST" "ANDROID" "IOS" "APPBUILDER" "PROJECT" "CLI" "ROUTINE" "TRANSCRIPT" "PHONE" "SUBAGENT" "TEAMS" "OFFICE" "SMS" "WHATSAPP" "EXCEL" "POWERPOINT" "ROUTER"

Where a chat was opened. PROJECT marks a chat started in a project; OFFICE is a legacy value no new chat has. ROUTER marks a turn started with a router key; the server sets it and a client cannot ask for it.

modelId
string

Model of the new chat. An unknown or unselectable model is a 400. Absent leaves the server's ordinary default.

ephemeral
boolean

A temporary chat that is not kept in the chat list.

appId
string

App Builder app to link. A verified appId forces the chat source to APPBUILDER.

projectId
string

Public id of the project the chat belongs to. The caller must own the project or hold an accepted membership; a missing project is a 400 and a project the caller may not join is a 403, both before any chat row is written.

workingAgentId
string [ 1 .. 200 ] characters
defaultAssistant
boolean

Open a new, non-temporary chat with the caller's primary assistant. An ineligible caller gets an agentless chat.

clientCapabilities
Array of strings <= 16 items [ items [ 1 .. 64 ] characters ]

What a native client or the Devs.ai desktop app can show, for example canvas or tool_cards. Recorded only for those clients. Unknown values are ignored.

object (IntegrationContext)

[devs.ai extension] External ids a chat integration relays with a turn. Every field is optional. Each value is trimmed and limited to 191 characters.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "parentChatId": "string",
  • "source": "UI",
  • "modelId": "string",
  • "ephemeral": true,
  • "appId": "string",
  • "projectId": "string",
  • "workingAgentId": "string",
  • "defaultAssistant": true,
  • "clientCapabilities": [
    ],
  • "integration_context": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "messagedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "summary": "string",
  • "orgId": "string",
  • "userId": "string",
  • "pinPosition": 0,
  • "source": "UI",
  • "ai": {
    },
  • "aiId": "string",
  • "modelId": "string",
  • "ephemeral": true,
  • "isDeleted": true,
  • "isArchived": true,
  • "archivedAt": "2019-08-24T14:15:22Z",
  • "autoArchiveBehaviour": "INHERIT",
  • "projectId": "string",
  • "sandboxId": "string",
  • "browserSandboxId": "string",
  • "documentName": "string",
  • "defaultAssistant": true,
  • "desktopClient": true,
  • "parentChatId": "string",
  • "parentMessageId": "string"
}

Data Sources

Manage knowledge bases and data sources for AI assistants

List data sources for the AI

Retrieves a list of data sources associated with the given AI identifier.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI whose data sources are to be retrieved.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add an existing data source to the specified AI

Associates an existing data source with the specified AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI to which the data source is to be added.

Request Body schema: application/json
required
dataSourceId
required
string

The unique identifier of the existing data source to be added.

Responses

Request samples

Content type
application/json
{
  • "dataSourceId": "string"
}

Response samples

Content type
application/json
{
  • "aiId": "string",
  • "dataSourceId": "string"
}

Delete all data sources from the AI

Requests deletion of all data sources associated with the specified AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI whose data sources are to be deleted.

Responses

Create a new API data source for the specified AI

Adds a new API data source with a specified name and JSON payload for the given AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
name
required
string

Name of the data source.

data
required
object

The JSON payload to be used as the data source's knowledge.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "data": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastIndexedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "type": "API",
  • "refreshPeriod": "NEVER",
  • "indexStatus": "INITIALIZED",
  • "indexPercentage": "string",
  • "data": { },
  • "cite": true,
  • "orgVisible": true
}

Adds a file upload data source for the specified AI. Max file size: 4.5Mb.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: multipart/form-data
file
string <binary>

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastIndexedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "type": "API",
  • "refreshPeriod": "NEVER",
  • "indexStatus": "INITIALIZED",
  • "indexPercentage": "string",
  • "data": { },
  • "cite": true,
  • "orgVisible": true
}

Initialize a file-blob upload for the AI

Mints a Vercel Blob client token for an agent knowledge file. The JSON includes clientToken and access. PUT the file bytes to https://vercel.com/api/blob with Authorization: Bearer {clientToken} and x-vercel-blob-access set to the returned access value (public or private). Do not hardcode public. Do not send the Devs.ai API key to Vercel.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "type": "blob.generate-client-token",
  • "clientToken": "string",
  • "access": "public"
}

Create a web URL data source for the AI

Creates a web URL knowledge source and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
url
required
string
dataRefreshPeriod
required
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

includeFiles
required
boolean
includedFileTypes
required
Array of strings (WebUrlFileType)
Items Enum: "TEXT" "CSV" "PDF" "MARKDOWN" "DOC" "XLS"
includeUrlGlobs
Array of strings
excludeUrlGlobs
Array of strings
maxPages
integer
maxMemory
integer
timeout
integer

Responses

Request samples

Content type
application/json
{
  • "url": "string",
  • "dataRefreshPeriod": "NEVER",
  • "includeFiles": true,
  • "includedFileTypes": [
    ],
  • "includeUrlGlobs": [
    ],
  • "excludeUrlGlobs": [
    ],
  • "maxPages": 0,
  • "maxMemory": 0,
  • "timeout": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastIndexedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "type": "API",
  • "refreshPeriod": "NEVER",
  • "indexStatus": "INITIALIZED",
  • "indexPercentage": "string",
  • "data": { },
  • "cite": true,
  • "orgVisible": true
}

Create Google Drive data sources for the AI

Creates Google Drive knowledge sources and associates them with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
oauthTokenId
string
required
Array of objects (GoogleDriveFile)
dataRefreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

Responses

Request samples

Content type
application/json
{
  • "oauthTokenId": "string",
  • "files": [
    ],
  • "dataRefreshPeriod": "NEVER"
}

Create a OneDrive data source for the AI

Creates a OneDrive knowledge source and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
oauthTokenId
required
string
fileId
required
string
filename
required
string
dataRefreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

Responses

Request samples

Content type
application/json
{
  • "oauthTokenId": "string",
  • "fileId": "string",
  • "filename": "string",
  • "dataRefreshPeriod": "NEVER"
}

Create a Confluence data source for the AI

Creates a Confluence knowledge source and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
oauthTokenId
required
string
pageId
string
pageName
required
string
contentType
string
spaceId
string
dataRefreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

indexChildPages
boolean
indexDriveFiles
boolean
indexAttachments
boolean
selectedDriveAccount
string
archive
boolean
allSpaces
boolean

Responses

Request samples

Content type
application/json
{
  • "oauthTokenId": "string",
  • "pageId": "string",
  • "pageName": "string",
  • "contentType": "string",
  • "spaceId": "string",
  • "dataRefreshPeriod": "NEVER",
  • "indexChildPages": true,
  • "indexDriveFiles": true,
  • "indexAttachments": true,
  • "selectedDriveAccount": "string",
  • "archive": true,
  • "allSpaces": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastIndexedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "type": "API",
  • "refreshPeriod": "NEVER",
  • "indexStatus": "INITIALIZED",
  • "indexPercentage": "string",
  • "data": { },
  • "cite": true,
  • "orgVisible": true
}

Create a Jira data source for the AI

Creates a Jira knowledge source and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
oauthTokenId
required
string
projectName
required
string
projectKey
required
string
dataRefreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

Responses

Request samples

Content type
application/json
{
  • "oauthTokenId": "string",
  • "projectName": "string",
  • "projectKey": "string",
  • "dataRefreshPeriod": "NEVER"
}

Create a GitHub data source for the AI

Creates a GitHub knowledge source and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The unique identifier for the AI.

Request Body schema: application/json
required
mode
required
string
Enum: "repos" "all"
gitHubAppInstallationId
required
integer
repos
Array of strings
dataRefreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

Responses

Request samples

Content type
application/json
{
  • "mode": "repos",
  • "gitHubAppInstallationId": 0,
  • "repos": [
    ],
  • "dataRefreshPeriod": "NEVER"
}

Remove a data source from the AI

Removes the specified data source from the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

dataSourceId
required
string

The identifier of the data source to remove.

Responses

Delete multiple data sources from the AI

Bulk delete data sources by ID for the specified AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
dataSourceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "dataSourceIds": [
    ]
}

List all data sources

Retrieves a list of data sources associated which the user has access to.

Authorizations:
ApiKeyAuth
query Parameters
search
string

Search term for data sources.

type
string (DataSourceType)
Enum: "API" "FILE_UPLOAD" "GOOGLE_DRIVE" "ONEDRIVE" "WEB_URL" "CONFLUENCE" "JIRA" "GITHUB" "MY_MEETINGS"

Filter by data source type.

orderBy
string^[+-](createdAt|lastIndexedAt|usageCount)$

Order by field and direction. Prefix field name with '+' for ascending or '-' for descending order. Allowed fields: createdAt, lastIndexedAt, usageCount.

page
integer

Page number for paginated results.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 0
}

Update a Data Source

Updates properties for the specified data source.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source to update.

Request Body schema: application/json
required
refreshPeriod
string (DataSourceRefreshPeriod)
Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY"

How frequently the data source should be refreshed.

cite
boolean or null
ais
Array of strings
orgVisible
boolean or null

Responses

Request samples

Content type
application/json
{
  • "refreshPeriod": "NEVER",
  • "cite": true,
  • "ais": [
    ],
  • "orgVisible": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastIndexedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "type": "API",
  • "refreshPeriod": "NEVER",
  • "indexStatus": "INITIALIZED",
  • "indexPercentage": "string",
  • "data": { },
  • "cite": true,
  • "orgVisible": true
}

Delete a Data Source

Deletes a specific data source associated with the given AI identifier.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source to be deleted.

Responses

Refresh a Data Source

This endpoint refreshes the specified data source.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source to be refreshed.

query Parameters
forceRefresh
boolean

Indicates if the data source should be refreshed even if the content has not been updated

Responses

Get data source stats

Retrieves indexing statistics for the specified data source.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source.

Responses

Response samples

Content type
application/json
{
  • "doneCount": 0,
  • "failedCount": 0,
  • "pendingCount": 0,
  • "indexingCount": 0,
  • "totalCount": 0
}

List knowledge items for a data source

Retrieves paginated knowledge items for the specified data source.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source.

query Parameters
first
integer

Number of items to return.

cursor
string

Cursor for pagination.

page
integer

Page number for pagination.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Update a knowledge item

Updates a knowledge item for the specified data source.

Authorizations:
ApiKeyAuth
path Parameters
dataSourceId
required
string

The unique identifier of the data source.

knowledgeId
required
string

The identifier of the knowledge item.

Request Body schema: application/json
required
cite
required
boolean

Responses

Request samples

Content type
application/json
{
  • "cite": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "type": "API",
  • "uniqueId": "string",
  • "parentUniqueId": "string",
  • "indexStatus": "INITIALIZED",
  • "documentCount": 0,
  • "tokenCount": 0,
  • "originalContent": {
    },
  • "documentsBlobUrl": "string",
  • "indexPercentage": "string",
  • "metadata": { },
  • "isBlobStorageDeleted": true,
  • "cite": true,
  • "rejection": {
    }
}

API Keys

Create and manage API keys

Create an API key

Creates a new API key for the caller or a specified user and organization (based on access level). Set tenantOwned true with orgId and userId to mint a key that child-org admins cannot revoke; manage those keys on the tenant-prefixed API-key routes.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string

Name of the API key.

scopes
required
Array of strings non-empty

Scopes to grant to the API key.

orgId
string

Optional organization ID to create the API key in. Defaults to the caller's organization. Tenant-scoped callers may use this to create keys for users in another organization within the same tenant. Required when tenantOwned is true.

userId
string

Optional user ID to create the API key for. Defaults to the caller. Required when tenantOwned is true.

tenantOwned
boolean
Default: false

When true, the key is tenant-owned: child-org admins cannot revoke, update, or reset it. Requires explicit orgId and userId, and an active tenant-owned membership for that user in that org. Omit or send false for unmanaged keys.

source
string
Default: "PLATFORM"
Enum: "PLATFORM" "ROUTER"

The type of key. PLATFORM is an ordinary key. ROUTER is a router key: its requests reach the model with only the caller's instructions and function tools, and it can call only the stateless model routes. ROUTER needs the router keys capability of the organization (403 otherwise). The type cannot change after creation.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ],
  • "orgId": "string",
  • "userId": "string",
  • "tenantOwned": false,
  • "source": "PLATFORM"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true,
  • "key": "string"
}

Update an API key

Renames a key and replaces its scope list. The key must belong to the calling user in the calling organization. Tenant-owned keys return 403; use the tenant-prefixed PUT instead. Scopes the caller does not hold are dropped, and the response reflects what was actually saved. The secret token is never returned here. Requires API_KEYS WRITE.

Authorizations:
ApiKeyAuth
path Parameters
apiKeyId
required
string

Identifier of the API key.

Request Body schema: application/json
required
name
required
string non-empty
scopes
required
Array of strings non-empty [ items non-empty ]

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true
}

Delete an API key

Permanently deletes a key belonging to the calling user in the calling organization. Tenant-owned keys return 403; use the tenant-prefixed DELETE instead. Requires API_KEYS WRITE. Note that deleting a key that does not exist, or belongs to someone else, currently reports 500 rather than 404.

Authorizations:
ApiKeyAuth
path Parameters
apiKeyId
required
string

Identifier of the API key.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Reset an API key

Rotates the key's secret and returns the new token. Tenant-owned keys return 403; use POST /api/v1/tenant/organizations/{orgId}/api-keys/{apiKeyId}/reset instead. The previous token stops working immediately, and the new one is shown only in this response, so capture it before discarding the result. The key must belong to the calling user in the calling organization. Requires API_KEYS WRITE.

Authorizations:
ApiKeyAuth
path Parameters
apiKeyId
required
string

Identifier of the API key.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true,
  • "key": "string"
}

List organization API keys

Lists every API key in the caller's organization as a bare array, including tenant-owned rows; this endpoint is not paginated and takes no query parameters. Tokens are never included. Requires API_KEYS or ORG_SETTINGS READ at tenant, organization or instance level. A caller whose API_KEYS access is only tenant-level sees just the keys carrying a tenant scope.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Revoke an organization API key

Revokes any unmanaged key in the caller's organization, including keys belonging to other users. Tenant-owned keys return 403; use DELETE /api/v1/tenant/organizations/{orgId}/api-keys/{apiKeyId} instead. Unlike the user-scoped delete, this returns 200 with a body rather than 204. Requires API_KEYS or ORG_SETTINGS WRITE at tenant, organization or instance level.

Authorizations:
ApiKeyAuth
path Parameters
apiKeyId
required
string

Identifier of the API key.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Groups

Manage user groups for AI access control

Create a new group

Creates a new group with the specified details.

Request Body schema: application/json
required
name
required
string

Name of the group.

availability
required
string (GroupAvailability)
Enum: "EVERYONE" "RESTRICTED"

Availability status of the group.

memberEmails
required
string

A comma-separated list of emails of users who should be added to the group.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "availability": "EVERYONE",
  • "memberEmails": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "availability": "EVERYONE",
  • "users": [
    ]
}

Update a group

Updates the details of a specific group and manages its member list.

path Parameters
groupId
required
string

The unique identifier of the group to update.

Request Body schema: application/json
required
name
string

Name of the group.

availability
string (GroupAvailability)
Enum: "EVERYONE" "RESTRICTED"

Availability status of the group.

memberEmailsToAdd
string

A comma-separated list of emails of users to be added to the group.

memberEmailsToRemove
Array of strings

A comma-separated list of emails of users to be removed from the group.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "availability": "EVERYONE",
  • "memberEmailsToAdd": "string",
  • "memberEmailsToRemove": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "name": "string",
  • "availability": "EVERYONE",
  • "users": [
    ]
}

Delete a group

Deletes the group with the specified identifier.

path Parameters
groupId
required
string

The unique identifier of the group to delete.

Responses

Leave a group

Allows the current user to leave the group specified by the groupId.

path Parameters
groupId
required
string

The unique identifier of the group to leave.

Responses

Get groups of the current user

Retrieves a list of groups associated with the current user.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Usage & Analytics

Monitor organization and AI usage metrics

Get organization usage metrics by AI

Returns the usage metrics of the organization broken down by AI.

Responses

Response samples

Content type
application/json
{
  • "orgUsage": {
    },
  • "aiUsages": [
    ]
}

Get organization usage metrics

Returns usage metrics for the organization.

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "dataTokensUsed": 0,
  • "dataUsageTokenLimit": 0,
  • "apiTokensUsed": 0,
  • "apiUsageTokenLimit": 0
}

Files

Upload and manage files for chat sessions

Create a chat file record or upload a small file

Attaches a file to this chat so you can reference it by id in a later message.

Two modes:

  1. JSON (recommended for files larger than about 4.5MB): create a file record (filename, size, mimeType). Status is UPLOADING. Then mint a client token with POST /api/v1/chats/{chatId}/files/upload and PUT the bytes to https://vercel.com/api/blob using that token and the returned access header. Poll GET /api/v1/files/{fileId} until status is UPLOADED. Default size cap is 100MB.

  2. multipart/form-data: upload the bytes through this API. This path goes through a Vercel Function, so the request body is limited to about 4.5MB. Do not use multipart for larger files.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Request Body schema:
required

JSON creates a file record for a later client upload to Vercel Blob. multipart uploads the file through this API and is limited to about 4.5MB.

filename
required
string

The name of the file.

size
required
integer

The size of the file in bytes.

mimeType
required
string

The MIME type of the file.

metadata
object or null

Additional metadata associated with the file.

Responses

Request samples

Content type
{
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "principalId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "source": "USER",
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "url": "string",
  • "revisionToken": "string",
  • "editable": true,
  • "policyWithheld": true,
  • "sandboxSyncFailed": true,
  • "metadata": { },
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "status": "UPLOADED"
}

List files in a chat session

Retrieves a list of all files associated with the specified chat session.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Mint a Vercel Blob client token for a chat file

Second step of the large-file upload flow. Call this after POST /api/v1/chats/{chatId}/files with a JSON body.

The JSON includes clientToken and access. PUT the file bytes to https://vercel.com/api/blob?pathname={url-encoded pathname} with:

  • Authorization: Bearer {clientToken} (not the Devs.ai API key)
  • x-vercel-blob-access set to the access value from this response (public or private). Do not hardcode public.
  • Content-Type matching the file MIME type

Chat file storage may be a private Blob store. A PUT that omits x-vercel-blob-access, or sends public when mint returned private, returns 400 from Vercel.

Do not cache this response. Mint a new token for every file. After the PUT succeeds, poll GET /api/v1/files/{fileId} until status is UPLOADED before referencing the file in a chat message.

Customers only send type: blob.generate-client-token. Vercel calls this endpoint again on upload completion.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The unique identifier of the chat session.

Request Body schema: application/json
required
type
required
string
Value: "blob.generate-client-token"
required
object

Responses

Request samples

Content type
application/json
{
  • "type": "blob.generate-client-token",
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "type": "blob.generate-client-token",
  • "clientToken": "string",
  • "access": "public"
}

List the caller's files

Lists the caller's files with pagination and filters.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{ }

Create a file record or upload a file

This endpoint supports two modes: 1) Create a file record with metadata (application/json), or 2) Upload a file directly (multipart/form-data). Multipart goes through a Vercel Function and is limited to about 4.5MB. For larger chat attachments, create the record on POST /api/v1/chats/{chatId}/files and complete the upload with POST /api/v1/chats/{chatId}/files/upload. Default size cap for client Blob uploads is 100MB.

Authorizations:
ApiKeyAuth
Request Body schema:
required

This endpoint supports two modes: Create a file record with metadata (application/json), or upload a file directly (multipart/form-data).

filename
required
string

The name of the file.

size
required
integer

The size of the file in bytes.

mimeType
required
string

The MIME type of the file.

metadata
object or null

Additional metadata associated with the file.

Responses

Request samples

Content type
{
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "principalId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "source": "USER",
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "url": "string",
  • "revisionToken": "string",
  • "editable": true,
  • "policyWithheld": true,
  • "sandboxSyncFailed": true,
  • "metadata": { },
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "status": "UPLOADED"
}

Get a file

Returns the file record, including status. After a client Blob upload, poll this until status is UPLOADED before referencing the file in a chat message.

Authorizations:
ApiKeyAuth
path Parameters
fileId
required
string

The unique identifier of the file.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "principalId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "source": "USER",
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "url": "string",
  • "revisionToken": "string",
  • "editable": true,
  • "policyWithheld": true,
  • "sandboxSyncFailed": true,
  • "metadata": { },
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "status": "UPLOADED"
}

Chat Completions

OpenAI-compatible chat completion API

Create a chat completion (OpenAI-compatible)

Creates a completion for the chat message. This endpoint is OpenAI-compatible and supports both regular prompts and tool output submissions. When the last message is a tool message, it will be treated as a tool output submission.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
Array of objects (ChatCompletionMessage) non-empty

A list of messages comprising the conversation so far

model
required
string

ID of the Devs.ai AI or the LLM model to use for completion

stream
boolean
Default: false

Whether to stream the response or not

object (ChatOptions)
Array of OpenAIFunctionTool (object) or BuiltInTool (object) or ImageGenerationTool (object) or McpServerTool (object)

Optional list of tools to use. Supports OpenAI function tools and Devs.ai built-in tools. Custom function tool names must be unique. Names that conflict with internal tools enabled for this specific request are rejected with HTTP 400.

generateCitations
boolean

Whether to generate citations in the response

parallel_tool_calls
boolean

Whether to allow parallel tool calls

object
max_tokens
integer

Maximum number of tokens to generate. Applied for a router key only.

max_completion_tokens
integer

Maximum number of tokens to generate. It wins over max_tokens. Applied for a router key only.

temperature
number [ 0 .. 2 ]

Sampling temperature. Sent to the model for a router key only.

top_p
number [ 0 .. 1 ]

Nucleus sampling probability. Sent to the model for a router key only.

string or Array of strings

Stop sequences. Sent to the model for a router key only.

tool_choice
any

How the model selects a tool: "auto", "none", "required", or { "type": "function", "function": { "name": ... } }. Sent to the model for a router key only.

prompt_cache_key
string <= 256 characters

Optional cache-affinity hint naming the prompt prefix whose cached copy should serve the next request. Forwarded to the AI Gateway as session affinity, scoped per organization so two callers that send the same value do not share a replica. Ignored for non-gateway models.

Responses

Request samples

Content type
application/json
{
  • "messages": [
    ],
  • "model": "string",
  • "stream": false,
  • "options": {
    },
  • "tools": [
    ],
  • "generateCitations": true,
  • "parallel_tool_calls": true,
  • "stream_options": {
    },
  • "max_tokens": 0,
  • "max_completion_tokens": 0,
  • "temperature": 2,
  • "top_p": 1,
  • "stop": "string",
  • "tool_choice": null,
  • "prompt_cache_key": "string"
}

Response samples

Content type
{
  • "choices": [
    ],
  • "chatId": "string"
}

Create a chat completion (Deprecated) Deprecated

Deprecated: This endpoint is deprecated. Please use /api/v1/chat/completions instead, which follows the OpenAI API convention and provides the same functionality.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
Array of objects (ChatCompletionMessage) non-empty

A list of messages comprising the conversation so far

model
required
string

ID of the Devs.ai AI or the LLM model to use for completion

stream
boolean
Default: false

Whether to stream the response or not

object (ChatOptions)
Array of OpenAIFunctionTool (object) or BuiltInTool (object) or ImageGenerationTool (object) or McpServerTool (object)

Optional list of tools to use. Supports OpenAI function tools and Devs.ai built-in tools. Custom function tool names must be unique. Names that conflict with internal tools enabled for this specific request are rejected with HTTP 400.

generateCitations
boolean

Whether to generate citations in the response

parallel_tool_calls
boolean

Whether to allow parallel tool calls

object
max_tokens
integer

Maximum number of tokens to generate. Applied for a router key only.

max_completion_tokens
integer

Maximum number of tokens to generate. It wins over max_tokens. Applied for a router key only.

temperature
number [ 0 .. 2 ]

Sampling temperature. Sent to the model for a router key only.

top_p
number [ 0 .. 1 ]

Nucleus sampling probability. Sent to the model for a router key only.

string or Array of strings

Stop sequences. Sent to the model for a router key only.

tool_choice
any

How the model selects a tool: "auto", "none", "required", or { "type": "function", "function": { "name": ... } }. Sent to the model for a router key only.

prompt_cache_key
string <= 256 characters

Optional cache-affinity hint naming the prompt prefix whose cached copy should serve the next request. Forwarded to the AI Gateway as session affinity, scoped per organization so two callers that send the same value do not share a replica. Ignored for non-gateway models.

Responses

Request samples

Content type
application/json
{
  • "messages": [
    ],
  • "model": "string",
  • "stream": false,
  • "options": {
    },
  • "tools": [
    ],
  • "generateCitations": true,
  • "parallel_tool_calls": true,
  • "stream_options": {
    },
  • "max_tokens": 0,
  • "max_completion_tokens": 0,
  • "temperature": 2,
  • "top_p": 1,
  • "stop": "string",
  • "tool_choice": null,
  • "prompt_cache_key": "string"
}

Response samples

Content type
{
  • "choices": [
    ],
  • "chatId": "string"
}

Models

OpenAI-compatible model list. Includes chat models, embedding models, and agents.

List models (OpenAI-compatible)

Lists the chat models the caller can use, the embedding models text-embedding-3-small, text-embedding-3-large, and text-embedding-ada-002, and the caller's agents.

Disabled chat models and realtime voice models are omitted. Embedding models are always included. They are not selectable in the chat picker.

Requires AI READ.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "object": "list",
  • "data": [
    ]
}

Embeddings

OpenAI-compatible embeddings API. Usage is billed on the chat balance.

Create embeddings (OpenAI-compatible)

Creates embeddings for the given input. Set the OpenAI client baseURL to {host}/api/v1 and call embeddings.create.

Prompt tokens are billed on the chat balance at the published embedding rate, with the organization's markup applied. Post-paid plans are metered. Prepaid plans are checked before the provider is called and then deducted. A denied balance does not call the embedding provider.

Send Idempotency-Key so a retry of the same request does not charge the ledger twice. The key may be up to 191 characters.

Requires CHATS WRITE.

Authorizations:
ApiKeyAuth
header Parameters
Idempotency-Key
string [ 1 .. 191 ] characters

Optional client key, 1–191 characters. Replays with the same key do not create a second chat-balance ledger charge.

Request Body schema: application/json
required
model
required
string
Enum: "text-embedding-3-small" "text-embedding-3-large" "text-embedding-ada-002"

Embedding model id. These models are listed by GET /api/v1/models and are not chat-picker models.

required
string or Array of strings or Array of integers or Array of integers

Text to embed, a batch of up to 2048 strings, one token-id array of at most 8191 tokens, or a batch of up to 2048 token-id arrays.

encoding_format
string
Default: "float"
Enum: "float" "base64"

float returns each embedding as an array of numbers. base64 returns each embedding as a string.

dimensions
integer >= 1

Output dimensions. text-embedding-3-small accepts 1–1536. text-embedding-3-large accepts 1–3072. text-embedding-ada-002 rejects this field.

user
string

Accepted for OpenAI client compatibility. Not used for billing or request attribution.

Responses

Request samples

Content type
application/json
{
  • "model": "text-embedding-3-small",
  • "input": "The food was delicious and the waiter was friendly.",
  • "encoding_format": "float"
}

Response samples

Content type
application/json
{
  • "object": "list",
  • "data": [
    ],
  • "model": "string",
  • "usage": {
    }
}

Responses API v2

OpenAI Responses-compatible API (v2). Supports streaming (SSE) and non-streaming runs, threaded and stateless execution, and lifecycle control (cancel / pause / resume).

The shape mirrors the official OpenAI Responses API for inputs, outputs, tools, and streaming events. Items below labelled [devs.ai extension] have no equivalent in OpenAI's spec; everything else is intended to be 1:1 compatible.

Vendor extensions used to flag devs.ai additions

Every devs.ai-specific element in this spec is also tagged with a machine-readable OpenAPI specification extension so tooling can detect them programmatically without parsing description text:

  • x-devs-ai-extension: true — applied to schemas, schema properties, parameters, response headers, and operations that have no OpenAI counterpart.
  • x-devs-ai-extension-values: [string, ...] — applied to enum schemas/properties whose enum is OpenAI-aligned but where devs.ai accepts/emits additional values. Lists only the extra values (e.g. ["cancelled"] on ResponseStatus).
  • x-devs-ai-extension-behavior: "<id>" — applied where the field name itself is OpenAI-standard but devs.ai's handling differs (e.g. optional-on-request on MessageInputItem.type because devs.ai accepts the field being omitted while OpenAI requires it).

devs.ai Extensions

A single reference list of every devs.ai-specific addition exposed by this API. Each entry below is also marked **[devs.ai extension]** at its source and carries one of the x-devs-ai-extension* vendor extensions described above.

Request fields (CreateResponseRequest)

  • chat_mode — execute / chat / plan execution mode.
  • user_secrets — short-lived per-request API keys / secrets for tools.
  • thread_mode — concurrent-request handling on an existing thread (collect / steer / interrupt / force).
  • options — internal devs.ai chat options (provider routing, tracing, etc.).
  • reasoning.effort extra values none, xhigh, and max (in addition to OpenAI's minimal / low / medium / high).
  • self_hosted_agent — self-hosted CLI agent session id.
  • computer — computer target of the message (cloud: the cloud computer of the user; local: the local computer of the session of self_hosted_agent).
  • canvas_document_id — open canvas document for a select-to-edit turn.
  • user_location — turn-scoped browser geolocation (lat, lng).
  • reload_thread_history — reload thread history instead of the inline cache.
  • integration_context — Slack/Teams external ids recorded for audit only.
  • hookResumePayload on resume — arbitrary record forwarded to a lifecycle gate.

Input content-part flags

  • input_text.invisible / input_image.invisible / input_file.invisible — content sent to the model but hidden from end-user transcripts.
  • input_text.metadata — arbitrary metadata attached to a content part (not forwarded to the model).
  • output_text.logprobs (when output_text appears inside an OutputMessageInputItem).

Input item enum

  • FunctionCallOutputInputItem.status uses ["success", "error", "cancelled"] instead of OpenAI's ["in_progress", "completed", "incomplete"] (incompatible enum).

Tools (ToolDefinition) — only function and web_search mirror OpenAI; everything below is devs.ai-specific.

  • python — emits server_tool_call items (not OpenAI's code_interpreter_call).
  • image_generation — shares the type name with OpenAI but uses devs.ai's input shape and emits server_tool_call items.
  • mcp_server — references a configured devs.ai MCP integration; does not emit OpenAI's mcp_list_tools discovery events or mcp_approval_request / mcp_approval_response items.
  • spreadsheet, memory, sandbox, deep_research — no OpenAI counterpart.
  • web_search.includeXSearch — extra X (Twitter) search inclusion flag.

Output items (OutputItem)

  • server_tool_call and server_tool_call_output — emitted instead of OpenAI's code_interpreter_call / image_generation_call items for devs.ai's server-side tools.

Response fields (Response)

  • selection_metadata — model routing / selection metadata (chosen provider, fallback chain, latency hints).
  • personal_credential_required — tools refused because they need the end user's own account on a shared chat integration request.
  • service_account_credential_required — connectors a service-account turn could not use because the agent's service account has no credential for them.
  • status extra value cancelled (in addition to OpenAI's in_progress / completed / failed / incomplete).
  • incomplete_details.reason extra value paused (in addition to OpenAI's max_output_tokens / content_filter).

Streaming events (full list and payloads in the x-streaming-events reference under components)

  • response.server_tool_call.in_progress / .completed / .failed.
  • response.server_tool_call_arguments.delta / .done.
  • response.subagent.started / .progress / .completed.
  • response.personal_credential_required.
  • response.service_account_credential_required.
  • response.output_item.added.status_hints (optional field on response.output_item.added).
  • Every event payload includes a monotonically increasing sequence_number field.
  • Terminal sentinel event: done / data: [DONE] after the last lifecycle event.

Endpoints / headers

  • POST /api/v2/responses/{responseId}/pause — pause an active threaded response run.
  • POST /api/v2/responses/{responseId}/resume — resume a paused threaded response run, optionally supplying tool outputs.
  • GET /api/v2/responses/{responseId}/stream — reconnect to an in-flight SSE stream. Pass streamEpoch with lastSequence; a mismatch replays from the start and sets x-stream-reset.
  • /api/v1/responses — same operations as /api/v2/responses, for OpenAI-compatible base URLs.
  • POST /api/v2/responses/{responseId}/deep-research/resume — approve / deny / clarify a paused deep research subagent.
  • x-stream-chat-id response header on streaming POST /api/v2/responses and on the /stream reconnect endpoint.

Create a response

Submit a prompt and receive a model response. When stream=true (default), returns an SSE event stream following the OpenAI Responses streaming format. When stream=false, returns the completed response as JSON. When background=true, returns the in-progress Response as JSON immediately.

The same operation is mounted at POST /api/v1/responses for OpenAI-compatible clients. Subpaths (get, stream, cancel, pause, resume, deep-research resume) are mounted under /api/v1/responses as well.

Execution modes:

  • Threaded: when previous_response_id or conversation is provided. Signals a long-lived Temporal ThreadWorkflow that processes requests sequentially.
  • Stateless: when neither previous_response_id nor conversation is set. Starts a one-shot SingleResponseWorkflow.

Response headers include x-response-id, x-response-status, and, for streaming responses, x-stream-epoch.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
string or Array of InputItem (any)

User prompt — plain text or an array of input items (message, function_call, function_call_output). See the InputItem schema for the full grammar.

model
string

Model ID to use, like gpt-4o or o3. Required for stateless requests; optional when continuing a thread via previous_response_id / conversation.

previous_response_id
string or null

ID of a previous response to continue the conversation. Establishes multi-turn context.

string or object

Conversation/thread ID (string) or object with id field. Items from this conversation are prepended to input and items from this response are appended to it.

instructions
string or null

System/developer instructions inserted as the first item in the model's context. When used with previous_response_id, instructions from the previous response are not carried over.

stream
boolean
Default: true

If true (default), the response data is streamed to the client as Server-Sent Events. If false, the completed response is returned as JSON.

Array of any (ToolDefinition)
Default: []

Tools the model may call while generating a response. See ToolDefinition for available tools (most built-ins are devs.ai extensions).

temperature
number [ 0 .. 2 ]

Sampling temperature between 0 and 2. Higher values produce more random output.

top_p
number [ 0 .. 1 ]

Nucleus sampling parameter. We generally recommend altering this OR temperature, not both.

max_output_tokens
integer >= 1

Upper bound for the number of tokens that can be generated for a response, including reasoning tokens.

object

Reasoning configuration for reasoning-capable models (e.g. o-series).

object or null

Metadata key-value pairs for tagging.

parallel_tool_calls
boolean

Whether to allow the model to run tool calls in parallel. Default true. Echoed back on the Response object.

tool_choice
any

How the model should select which tool(s) to use. Accepts the OpenAI tool_choice shapes (e.g. "auto", "none", "required", or a typed object referring to a specific tool).

store
boolean

Whether to store the generated response for later retrieval via the API. Default true.

truncation
any

Truncation strategy for the model response. OpenAI accepts "auto" or "disabled".

object

Configuration options for a text response from the model, in OpenAI's shape. A json_schema format is given to the model on a run that runs no agent and whose model is offered no tools, including tools that Devs AI adds on its own. A service-account request that sends no tools is offered none. If the model provider does not accept the schema, the request fails with the provider error. The reply is still returned as text, and Devs AI does not guarantee that it matches the schema, so check the reply against the schema. The text and json_object formats and verbosity are accepted and only repeated. A text value that does not match this shape returns 400 invalid_request_error. The response repeats text as sent, including unknown keys.

service_tier
string

Service tier to use for this request (e.g. "auto", "default", "flex").

user
string

Stable identifier for the end-user. Used to boost cache hit rates and to help OpenAI detect abuse. Deprecated by OpenAI in favor of safety_identifier / prompt_cache_key.

include
Array of strings

Specify additional output data to include in the model response (e.g. file_search_call.results, message.input_image.image_url, message.output_text.logprobs, reasoning.encrypted_content). reasoning.encrypted_content is returned automatically for requests without previous_response_id or conversation, so clients can replay history statelessly; threaded requests only receive it when they include this value.

background
boolean

If true, the create call returns the in-progress Response as JSON immediately and does not stream, even when stream is true. Poll GET /api/v2/responses/{responseId} or reconnect with GET /api/v2/responses/{responseId}/stream.

object

[devs.ai extension] Internal devs.ai chat options (provider-specific routing, sub-flow tracing, etc.). Not part of the OpenAI Responses API.

chat_mode
string
Default: "execute"
Enum: "execute" "chat" "plan"

[devs.ai extension] Chat execution mode: execute runs tools, chat returns text only, plan returns the planned steps without running them.

object

[devs.ai extension] User-provided API keys / secrets that tools may reference at execution time. Keys are short-lived and never persisted server-side.

thread_mode
string
Default: "collect"
Enum: "collect" "steer" "interrupt" "force"

[devs.ai extension] Controls how a new request is handled when an existing thread is mid-run. No OpenAI counterpart.

object

[devs.ai extension] Binds the run to a self-hosted CLI agent session.

object

[devs.ai extension] Where the primary assistant works for this message. Omit it for the run of today.

cloud selects the cloud computer of the user. Accepted only for a chat with the primary assistant of the user, with no project link, in the personal workspace, when the cloud_computer flag is on for the org; otherwise the request fails with 400. Cannot be sent with self_hosted_agent (400). Fails with 409 while a run of another chat uses the cloud computer.

local selects the local computer of the session that self_hosted_agent.sessionId names: the assistant can use the apps of that computer. The request fails with 400 when self_hosted_agent is absent, when a function tool of the request has a name that starts with local_computer_, when a check of self_hosted_agent fails (the feature is off for the org or the tenant, the session is offline, or the session has an incompatible version), or with the message The local computer is not available for this chat: <reason>. The reasons: flag_off (the local computer is off for the org), not_primary_assistant_chat (the chat is not a chat with the primary assistant of the user, or the request has no chat), project_link (the chat has a link to a project), chat_mode (chat_mode is chat or plan), computer_control_off (the session did not declare computer control), no_local_computer_tool (the session declared no local computer tool), browser_use_off (the request does not come from the desktop app, and the session does not allow chats in the browser to use the computer). local never answers 409.

canvas_document_id
string

[devs.ai extension] Open canvas document id for a select-to-edit turn. The regenerated document records a supersedes edge back to this id. Omit on ordinary turns.

client_capabilities
Array of strings <= 16 items [ items [ 1 .. 64 ] characters ]

[devs.ai extension] What the client can show, for example tool_cards. Read only from the Devs.ai desktop app, which sends it with every turn: the server keeps the latest list on the chat, and a turn without the field removes it. Every other caller's value is dropped. Unknown values are ignored.

object

[devs.ai extension] Browser geolocation the user has already allowed. Turn-scoped: a valid fix becomes a developer instruction and is not stored on the chat message. Distinct from the user_location field on OpenAI's web search tool, which devs.ai ignores.

reload_thread_history
boolean

[devs.ai extension] When true, skip a still-valid inline message cache and reload thread history.

object

[devs.ai extension] External ids a chat integration relays with a turn. Every field is optional. Each value is trimmed and limited to 191 characters.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "input": "string",
  • "model": "string",
  • "previous_response_id": "string",
  • "conversation": "string",
  • "instructions": "string",
  • "stream": true,
  • "tools": [ ],
  • "temperature": 2,
  • "top_p": 1,
  • "max_output_tokens": 1,
  • "reasoning": {
    },
  • "metadata": {
    },
  • "parallel_tool_calls": true,
  • "tool_choice": null,
  • "store": true,
  • "truncation": null,
  • "text": {
    },
  • "service_tier": "string",
  • "user": "string",
  • "include": [
    ],
  • "background": true,
  • "options": {
    },
  • "chat_mode": "execute",
  • "user_secrets": {
    },
  • "thread_mode": "collect",
  • "self_hosted_agent": {
    },
  • "computer": {
    },
  • "canvas_document_id": "string",
  • "client_capabilities": [
    ],
  • "user_location": {
    },
  • "reload_thread_history": true,
  • "integration_context": {
    }
}

Response samples

Content type
No sample

Get a response

Retrieve a response run by ID. Returns the full response object including output items, usage, and status.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response",
  • "status": "in_progress",
  • "model": "string",
  • "output": [
    ],
  • "usage": {
    },
  • "error": {
    },
  • "created_at": 0,
  • "instructions": "string",
  • "temperature": 0,
  • "top_p": 0,
  • "max_output_tokens": 0,
  • "metadata": {
    },
  • "previous_response_id": "string",
  • "parallel_tool_calls": true,
  • "incomplete_details": {
    },
  • "tool_choice": "string",
  • "tools": [
    ],
  • "text": { },
  • "reasoning": { },
  • "selection_metadata": { },
  • "personal_credential_required": [
    ],
  • "service_account_credential_required": [
    ]
}

Reconnect to an in-flight response stream

[devs.ai extension] Re-attach to a still-running response's SSE event stream after a network drop. The path parameter responseId and the required query parameter streamChatId MUST be equal — streamChatId exists for explicit client-side intent and to align with the underlying chat-stream backend.

Pass the x-stream-epoch header from the create call as streamEpoch. lastSequence is applied only when streamEpoch equals the current stream epoch: events with sequence_number <= lastSequence are then suppressed, and the first event delivered is typically response.in_progress (or whatever follows lastSequence), not response.created. If streamEpoch is omitted or does not match, the stream is replayed from the start and the response includes x-stream-reset: true.

This endpoint has no equivalent in OpenAI's Responses API.

Returns 404 when the run cannot be found, streamChatId does not equal responseId, or the underlying stream has already completed and can no longer be reattached.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
query Parameters
streamChatId
required
string non-empty

[devs.ai extension] Must equal the path responseId. Identifies the underlying chat-stream to attach to.

lastSequence
integer >= -1
Default: -1

[devs.ai extension] Last sequence_number the client has already processed. Honored only when streamEpoch matches the current epoch. Events with sequence_number <= lastSequence are then suppressed. Default -1 (no events suppressed).

streamEpoch
string non-empty

[devs.ai extension] Epoch from the create call's x-stream-epoch header (also stream_epoch on response.created). When it matches, lastSequence is applied. When it is omitted or stale, the stream restarts and the response sets x-stream-reset: true.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

Cancel a response

Cancel a response run that is running, queued, or waiting for an answer. Sends a CANCEL_ACTIVE_REQUEST signal to the Temporal workflow. As on OpenAI, a response that is already cancelled is returned unchanged, and a response that has already ended gets a 400 invalid_request_error with OpenAI's message for its status (Cannot cancel a completed response., Cannot cancel a failed response., Cannot cancel an incomplete response.). A paused response whose workflow is gone has ended: GET reports it as incomplete. Unlike OpenAI, a foreground response can be cancelled while it runs.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string
cancelPolicy
string (CancelPolicy)
Default: "graceful"
Enum: "graceful" "immediate"

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "cancelPolicy": "graceful"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Steer a response

[devs.ai extension] Ask a running response to end at the end of its current step: the model call that runs finishes, the server tool calls of that step finish, and client tool calls stay open in output. The call returns at once. The response then ends with status: "incomplete" and incomplete_details.reason: "steered", or ends as it would when that step ends it anyway. To continue, send a normal POST /api/v2/responses with previous_response_id, an output for each open function call, and the new message. A response that has already ended is not changed; the call returns its status. The request body is not read.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Pause a response

[devs.ai extension] Pause an active response run. Execution halts at the next safe checkpoint; in-flight work completes but no new model or tool steps are started. If the run has more steps to do, the response becomes incomplete with incomplete_details.reason set to paused, and can be continued via POST /api/v2/responses/{responseId}/resume. If the in-flight model turn ends the response, the response completes. Requests queued on the thread stay paused until resume. Only works for threaded execution mode. No equivalent in OpenAI's Responses API.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Resume a response

[devs.ai extension] Resume a paused response run. Optionally provide tool outputs for human-in-the-loop tool calling (function tools that require client execution). Only works for threaded execution mode. No equivalent in OpenAI's Responses API.

The tool outputs must answer every open tool call of the chat, and only those.

If the paused run's thread is gone and the request has tool outputs, this request creates a new response on the chat with those outputs. The returned id is the response that carries the answers: the paused response while its thread is alive, otherwise the new response. Follow that id.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string
Array of objects (ToolOutput)
object

[devs.ai extension] Arbitrary record forwarded to a lifecycle gate when resuming a paused run. Not part of OpenAI's Responses API.

Array of any (ToolDefinition)

[devs.ai extension] The tools of the new response that this request creates when the paused run's thread is gone. A live thread ignores them, because the paused run keeps its own tools.

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "toolOutputs": [
    ],
  • "hookResumePayload": { },
  • "tools": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Resume a deep research subagent

[devs.ai extension] Resume a paused deep research child workflow. Used to approve, deny, or provide clarification for a deep research run that is awaiting human input. Signals the deep research subagent workflow directly. No equivalent in OpenAI's Responses API.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
required
subagentRunId
required
string non-empty
approved
boolean
clarificationAnswer
string
goal
string
scope
string
deniedReason
string
reason
string

Responses

Request samples

Content type
application/json
{
  • "subagentRunId": "string",
  • "approved": true,
  • "clarificationAnswer": "string",
  • "goal": "string",
  • "scope": "string",
  • "deniedReason": "string",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.deep_research.resume",
  • "status": "resume_requested",
  • "subagentRunId": "string",
  • "reason": "string"
}

Create a response (OpenAI-compatible alias)

Alias of POST /api/v2/responses. Same request body, status codes, headers (x-response-id, x-response-status, x-stream-chat-id, x-stream-epoch), and response body.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
string or Array of InputItem (any)

User prompt — plain text or an array of input items (message, function_call, function_call_output). See the InputItem schema for the full grammar.

model
string

Model ID to use, like gpt-4o or o3. Required for stateless requests; optional when continuing a thread via previous_response_id / conversation.

previous_response_id
string or null

ID of a previous response to continue the conversation. Establishes multi-turn context.

string or object

Conversation/thread ID (string) or object with id field. Items from this conversation are prepended to input and items from this response are appended to it.

instructions
string or null

System/developer instructions inserted as the first item in the model's context. When used with previous_response_id, instructions from the previous response are not carried over.

stream
boolean
Default: true

If true (default), the response data is streamed to the client as Server-Sent Events. If false, the completed response is returned as JSON.

Array of any (ToolDefinition)
Default: []

Tools the model may call while generating a response. See ToolDefinition for available tools (most built-ins are devs.ai extensions).

temperature
number [ 0 .. 2 ]

Sampling temperature between 0 and 2. Higher values produce more random output.

top_p
number [ 0 .. 1 ]

Nucleus sampling parameter. We generally recommend altering this OR temperature, not both.

max_output_tokens
integer >= 1

Upper bound for the number of tokens that can be generated for a response, including reasoning tokens.

object

Reasoning configuration for reasoning-capable models (e.g. o-series).

object or null

Metadata key-value pairs for tagging.

parallel_tool_calls
boolean

Whether to allow the model to run tool calls in parallel. Default true. Echoed back on the Response object.

tool_choice
any

How the model should select which tool(s) to use. Accepts the OpenAI tool_choice shapes (e.g. "auto", "none", "required", or a typed object referring to a specific tool).

store
boolean

Whether to store the generated response for later retrieval via the API. Default true.

truncation
any

Truncation strategy for the model response. OpenAI accepts "auto" or "disabled".

object

Configuration options for a text response from the model, in OpenAI's shape. A json_schema format is given to the model on a run that runs no agent and whose model is offered no tools, including tools that Devs AI adds on its own. A service-account request that sends no tools is offered none. If the model provider does not accept the schema, the request fails with the provider error. The reply is still returned as text, and Devs AI does not guarantee that it matches the schema, so check the reply against the schema. The text and json_object formats and verbosity are accepted and only repeated. A text value that does not match this shape returns 400 invalid_request_error. The response repeats text as sent, including unknown keys.

service_tier
string

Service tier to use for this request (e.g. "auto", "default", "flex").

user
string

Stable identifier for the end-user. Used to boost cache hit rates and to help OpenAI detect abuse. Deprecated by OpenAI in favor of safety_identifier / prompt_cache_key.

include
Array of strings

Specify additional output data to include in the model response (e.g. file_search_call.results, message.input_image.image_url, message.output_text.logprobs, reasoning.encrypted_content). reasoning.encrypted_content is returned automatically for requests without previous_response_id or conversation, so clients can replay history statelessly; threaded requests only receive it when they include this value.

background
boolean

If true, the create call returns the in-progress Response as JSON immediately and does not stream, even when stream is true. Poll GET /api/v2/responses/{responseId} or reconnect with GET /api/v2/responses/{responseId}/stream.

object

[devs.ai extension] Internal devs.ai chat options (provider-specific routing, sub-flow tracing, etc.). Not part of the OpenAI Responses API.

chat_mode
string
Default: "execute"
Enum: "execute" "chat" "plan"

[devs.ai extension] Chat execution mode: execute runs tools, chat returns text only, plan returns the planned steps without running them.

object

[devs.ai extension] User-provided API keys / secrets that tools may reference at execution time. Keys are short-lived and never persisted server-side.

thread_mode
string
Default: "collect"
Enum: "collect" "steer" "interrupt" "force"

[devs.ai extension] Controls how a new request is handled when an existing thread is mid-run. No OpenAI counterpart.

object

[devs.ai extension] Binds the run to a self-hosted CLI agent session.

object

[devs.ai extension] Where the primary assistant works for this message. Omit it for the run of today.

cloud selects the cloud computer of the user. Accepted only for a chat with the primary assistant of the user, with no project link, in the personal workspace, when the cloud_computer flag is on for the org; otherwise the request fails with 400. Cannot be sent with self_hosted_agent (400). Fails with 409 while a run of another chat uses the cloud computer.

local selects the local computer of the session that self_hosted_agent.sessionId names: the assistant can use the apps of that computer. The request fails with 400 when self_hosted_agent is absent, when a function tool of the request has a name that starts with local_computer_, when a check of self_hosted_agent fails (the feature is off for the org or the tenant, the session is offline, or the session has an incompatible version), or with the message The local computer is not available for this chat: <reason>. The reasons: flag_off (the local computer is off for the org), not_primary_assistant_chat (the chat is not a chat with the primary assistant of the user, or the request has no chat), project_link (the chat has a link to a project), chat_mode (chat_mode is chat or plan), computer_control_off (the session did not declare computer control), no_local_computer_tool (the session declared no local computer tool), browser_use_off (the request does not come from the desktop app, and the session does not allow chats in the browser to use the computer). local never answers 409.

canvas_document_id
string

[devs.ai extension] Open canvas document id for a select-to-edit turn. The regenerated document records a supersedes edge back to this id. Omit on ordinary turns.

client_capabilities
Array of strings <= 16 items [ items [ 1 .. 64 ] characters ]

[devs.ai extension] What the client can show, for example tool_cards. Read only from the Devs.ai desktop app, which sends it with every turn: the server keeps the latest list on the chat, and a turn without the field removes it. Every other caller's value is dropped. Unknown values are ignored.

object

[devs.ai extension] Browser geolocation the user has already allowed. Turn-scoped: a valid fix becomes a developer instruction and is not stored on the chat message. Distinct from the user_location field on OpenAI's web search tool, which devs.ai ignores.

reload_thread_history
boolean

[devs.ai extension] When true, skip a still-valid inline message cache and reload thread history.

object

[devs.ai extension] External ids a chat integration relays with a turn. Every field is optional. Each value is trimmed and limited to 191 characters.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "input": "string",
  • "model": "string",
  • "previous_response_id": "string",
  • "conversation": "string",
  • "instructions": "string",
  • "stream": true,
  • "tools": [ ],
  • "temperature": 2,
  • "top_p": 1,
  • "max_output_tokens": 1,
  • "reasoning": {
    },
  • "metadata": {
    },
  • "parallel_tool_calls": true,
  • "tool_choice": null,
  • "store": true,
  • "truncation": null,
  • "text": {
    },
  • "service_tier": "string",
  • "user": "string",
  • "include": [
    ],
  • "background": true,
  • "options": {
    },
  • "chat_mode": "execute",
  • "user_secrets": {
    },
  • "thread_mode": "collect",
  • "self_hosted_agent": {
    },
  • "computer": {
    },
  • "canvas_document_id": "string",
  • "client_capabilities": [
    ],
  • "user_location": {
    },
  • "reload_thread_history": true,
  • "integration_context": {
    }
}

Response samples

Content type
No sample

Get a response (OpenAI-compatible alias)

Alias of GET /api/v2/responses/{responseId}.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response",
  • "status": "in_progress",
  • "model": "string",
  • "output": [
    ],
  • "usage": {
    },
  • "error": {
    },
  • "created_at": 0,
  • "instructions": "string",
  • "temperature": 0,
  • "top_p": 0,
  • "max_output_tokens": 0,
  • "metadata": {
    },
  • "previous_response_id": "string",
  • "parallel_tool_calls": true,
  • "incomplete_details": {
    },
  • "tool_choice": "string",
  • "tools": [
    ],
  • "text": { },
  • "reasoning": { },
  • "selection_metadata": { },
  • "personal_credential_required": [
    ],
  • "service_account_credential_required": [
    ]
}

Reconnect to an in-flight response stream (OpenAI-compatible alias)

Alias of GET /api/v2/responses/{responseId}/stream. Same query parameters, including streamEpoch and lastSequence.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
query Parameters
streamChatId
required
string non-empty

[devs.ai extension] Must equal the path responseId.

lastSequence
integer >= -1
Default: -1

[devs.ai extension] Honored only when streamEpoch matches the current epoch.

streamEpoch
string non-empty

[devs.ai extension] Epoch from x-stream-epoch. A mismatch replays the stream from the start.

Responses

Response samples

Content type
application/json
{
  • "error": "string"
}

Cancel a response (OpenAI-compatible alias)

Alias of POST /api/v2/responses/{responseId}/cancel.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string
cancelPolicy
string (CancelPolicy)
Default: "graceful"
Enum: "graceful" "immediate"

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "cancelPolicy": "graceful"
}

Response samples

Content type
application/json
Example
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Steer a response (alias)

Alias of POST /api/v2/responses/{responseId}/steer.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Pause a response (OpenAI-compatible alias)

Alias of POST /api/v2/responses/{responseId}/pause.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Resume a response (OpenAI-compatible alias)

Alias of POST /api/v2/responses/{responseId}/resume.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
reason
string
Array of objects (ToolOutput)
object

[devs.ai extension] Arbitrary record forwarded to a lifecycle gate when resuming a paused run. Not part of OpenAI's Responses API.

Array of any (ToolDefinition)

[devs.ai extension] The tools of the new response that this request creates when the paused run's thread is gone. A live thread ignores them, because the paused run keeps its own tools.

Responses

Request samples

Content type
application/json
{
  • "reason": "string",
  • "toolOutputs": [
    ],
  • "hookResumePayload": { },
  • "tools": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.cancel",
  • "status": "cancel_requested",
  • "chatId": "string"
}

Resume a deep research subagent (OpenAI-compatible alias)

Alias of POST /api/v2/responses/{responseId}/deep-research/resume.

Authorizations:
ApiKeyAuth
path Parameters
responseId
required
string non-empty
Request Body schema: application/json
required
subagentRunId
required
string non-empty
approved
boolean
clarificationAnswer
string
goal
string
scope
string
deniedReason
string
reason
string

Responses

Request samples

Content type
application/json
{
  • "subagentRunId": "string",
  • "approved": true,
  • "clarificationAnswer": "string",
  • "goal": "string",
  • "scope": "string",
  • "deniedReason": "string",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "response.deep_research.resume",
  • "status": "resume_requested",
  • "subagentRunId": "string",
  • "reason": "string"
}

Tenant Rate Limits

Tenant owner APIs to configure default rate limits and per-organization overrides

Block organization rate limits

Sets a BLOCKED override for the specified child organization. Caller must be the tenant owner organization with org settings write access.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "mode": "BLOCKED"
}

Get organization rate limit override status

Returns effective rate limit mode and whether an explicit override exists for the organization.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "effectiveMode": "BLOCKED",
  • "hasExplicitOverride": true
}

Clear organization rate limit override

Removes any explicit BLOCKED or UNLIMITED override so the tenant default applies.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "mode": "BLOCKED"
}

Unblock organization rate limits

Sets an UNLIMITED override for the specified child organization. Caller must be the tenant owner organization with org settings write access.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "mode": "BLOCKED"
}

Get tenant default rate limit mode

Returns the default rate limit mode applied to child organizations when no per-org override exists. Only the tenant owner organization may call this.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "mode": "SUBSCRIPTION_LIMITS"
}

Set tenant default rate limit mode

Updates the default rate limit mode for child organizations. Only the tenant owner organization may call this.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
mode
required
string
Enum: "SUBSCRIPTION_LIMITS" "UNLIMITED"

Default rate limit mode for child organizations. SUBSCRIPTION_LIMITS applies subscription-based limits; UNLIMITED removes subscription caps.

Responses

Request samples

Content type
application/json
{
  • "mode": "SUBSCRIPTION_LIMITS"
}

Response samples

Content type
application/json
{
  • "mode": "SUBSCRIPTION_LIMITS"
}

List tenant rate limit overrides

Paginated list of organizations with an explicit BLOCKED or UNLIMITED override. Only the tenant owner organization may call this.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 20

Page size (1–100, default 20).

cursor
string non-empty

Opaque cursor from a previous response pagination.nextCursor.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Tenant Administration

Tenant-owner M2M APIs for provisioning and managing child organizations (org create, subscription lifecycle, balance top-up, member seats, tenant-owned members and API keys). Requires a tenant-scoped API key from the tenant-owner org.

Create tenant organization

Creates a child organization under the tenant and returns the org ID and resolved admin user ID. When the tenant has subscription billing management enabled, the org is created without an automatic paid subscription (FREE bootstrap) so step 2 is POST .../subscription. Requires ORG_SETTINGS WRITE with a tenant-scoped API key from the tenant-owner org.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 255 ] characters

Organization display name.

seedOrgName
boolean
Default: true

When true (default), seeds the org brand name from name. When false, inherits tenant branding for the name.

object (CreateTenantOrganizationAdminDto)
externalId
string [ 1 .. 255 ] characters

Partner external organization identifier for reconciliation.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "seedOrgName": true,
  • "admin": {
    },
  • "externalId": "string"
}

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "adminUserId": "string",
  • "name": "string",
  • "tenantPublicId": "string",
  • "tenantName": "string",
  • "seededOrgName": true
}

Get organization subscription

Returns the active subscription for the target org. Poll after async create/patch/cancel operations. Reconcile cancellation on cancelledAt (status may remain ACTIVE until period close). Requires ORG_SUBSCRIPTIONS READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "orgId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "type": "FREE",
  • "pricingPlan": "FREE",
  • "pricingPlanLabel": "string",
  • "maxUsers": 0,
  • "allowsMultipleUsers": true,
  • "maxFreeUsers": 0,
  • "allowsFreeUsers": true,
  • "userMembershipType": "FULL",
  • "status": "ACTIVE",
  • "periodEndDate": "2019-08-24T14:15:22Z",
  • "usageLimits": {
    },
  • "externalSubscriptionId": "string",
  • "externalCustomerId": "string",
  • "processorType": "STRIPE",
  • "metadata": {
    },
  • "cancelledAt": "2019-08-24T14:15:22Z",
  • "periodStartDate": "2019-08-24T14:15:22Z",
  • "balanceAllocationPerUser": "string",
  • "storageAllocationGb": 0,
  • "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}

Create organization subscription

Starts the subscription-created workflow (202 Accepted, empty body). Requires X-Idempotency-Key. Returns 403 when subscriptionBillingManagementEnabled is false on the tenant. Returns 409 when the org already has an active non-FREE subscription. Replay with the same idempotency key returns 202 again. Requires ORG_SUBSCRIPTIONS WRITE.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

header Parameters
X-Idempotency-Key
required
string [ 1 .. 128 ] characters

Client-supplied idempotency key (1–128 characters). Required for subscription lifecycle mutations and balance top-ups. Replaying the same key returns the same success outcome.

Request Body schema: application/json
required
pricingPlan
required
string
Enum: "FREE" "FREE_MULTI_USER" "PERSONAL" "BUSINESS"

Pricing plan allowed on tenant subscription create/patch.

maxUsers
required
integer >= 1

Paid seat cap.

externalSubscriptionId
string or null
externalCustomerId
string or null
allowsFreeUsers
boolean

When true, permits RESTRICTED members up to maxFreeUsers.

maxFreeUsers
integer or null >= 1
object (TenantSubscriptionMetadataRequestDto)

Typed subscription metadata accepted on tenant subscription create/patch. Unknown keys are rejected.

Responses

Request samples

Content type
application/json
{
  • "pricingPlan": "FREE",
  • "maxUsers": 1,
  • "externalSubscriptionId": "string",
  • "externalCustomerId": "string",
  • "allowsFreeUsers": true,
  • "maxFreeUsers": 1,
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Update organization subscription

Updates plan, seats, or external identifiers. Entitlement changes run via async workflow (202, empty body). Trivial field-only edits may return 200 with OrgSubscriptionDto. Requires X-Idempotency-Key and ORG_SUBSCRIPTIONS WRITE. Returns 403 when subscriptionBillingManagementEnabled is false.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

header Parameters
X-Idempotency-Key
required
string [ 1 .. 128 ] characters

Client-supplied idempotency key (1–128 characters). Required for subscription lifecycle mutations and balance top-ups. Replaying the same key returns the same success outcome.

Request Body schema: application/json
required
pricingPlan
string
Enum: "FREE" "FREE_MULTI_USER" "PERSONAL" "BUSINESS"

Pricing plan allowed on tenant subscription create/patch.

maxUsers
integer or null >= 1
allowsFreeUsers
boolean
maxFreeUsers
integer or null >= 1
externalSubscriptionId
string or null
externalCustomerId
string or null
object (TenantSubscriptionMetadataRequestDto)

Typed subscription metadata accepted on tenant subscription create/patch. Unknown keys are rejected.

Responses

Request samples

Content type
application/json
{
  • "pricingPlan": "FREE",
  • "maxUsers": 1,
  • "allowsFreeUsers": true,
  • "maxFreeUsers": 1,
  • "externalSubscriptionId": "string",
  • "externalCustomerId": "string",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "orgId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "type": "FREE",
  • "pricingPlan": "FREE",
  • "pricingPlanLabel": "string",
  • "maxUsers": 0,
  • "allowsMultipleUsers": true,
  • "maxFreeUsers": 0,
  • "allowsFreeUsers": true,
  • "userMembershipType": "FULL",
  • "status": "ACTIVE",
  • "periodEndDate": "2019-08-24T14:15:22Z",
  • "usageLimits": {
    },
  • "externalSubscriptionId": "string",
  • "externalCustomerId": "string",
  • "processorType": "STRIPE",
  • "metadata": {
    },
  • "cancelledAt": "2019-08-24T14:15:22Z",
  • "periodStartDate": "2019-08-24T14:15:22Z",
  • "balanceAllocationPerUser": "string",
  • "storageAllocationGb": 0,
  • "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}

Cancel organization subscription

Starts the cancel lifecycle workflow (202 Accepted, empty body). Sets cancelledAt while status may remain ACTIVE until period close. Requires X-Idempotency-Key. Optional request body for provenance metadata. Requires ORG_SUBSCRIPTIONS WRITE. Returns 403 when subscriptionBillingManagementEnabled is false.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

header Parameters
X-Idempotency-Key
required
string [ 1 .. 128 ] characters

Client-supplied idempotency key (1–128 characters). Required for subscription lifecycle mutations and balance top-ups. Replaying the same key returns the same success outcome.

Request Body schema: application/json
optional
object

Optional provenance metadata for the cancel workflow.

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "eventMetadata": { }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

List organization balances

Returns current included and extra balances per balance type. Requires BILLING_BALANCES READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Top up organization balance

Credits the org balance (positive amounts only). Requires X-Idempotency-Key mapped to the ledger referenceId; replays return alreadyRecorded: true. Partner convention: balanceType CHAT and targetColumn EXTRA for purchased credits. Requires BILLING_BALANCES WRITE. Returns 403 when subscriptionBillingManagementEnabled is false.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

header Parameters
X-Idempotency-Key
required
string [ 1 .. 128 ] characters

Client-supplied idempotency key (1–128 characters). Required for subscription lifecycle mutations and balance top-ups. Replaying the same key returns the same success outcome.

Request Body schema: application/json
required
balanceType
required
string (BalanceTypeDto)
Enum: "CHAT" "CLI" "APP_BUILDER" "FREE_TIER"
targetColumn
required
string (BalanceColumnDto)
Enum: "INCLUDED" "EXTRA"

Balance column to credit. Partners typically send EXTRA for purchased top-ups.

amount
required
string^\d{1,8}(\.\d{1,12})?$

Positive non-zero dollar amount as a decimal string (up to 8 integer and 12 fractional digits). Must be greater than zero; floats are not accepted.

reason
required
string [ 10 .. 500 ] characters

Audit reason (trimmed; must be at least 10 characters after trim).

Responses

Request samples

Content type
application/json
{
  • "balanceType": "CHAT",
  • "targetColumn": "INCLUDED",
  • "amount": "string",
  • "reason": "stringstri"
}

Response samples

Content type
application/json
{
  • "ledgerEntry": {
    },
  • "alreadyRecorded": true
}

List organization balance ledger

Paginated ledger entries for reconciliation. Requires BILLING_BALANCES READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

query Parameters
balanceType
string (BalanceTypeDto)
Enum: "CHAT" "CLI" "APP_BUILDER" "FREE_TIER"
since
string <date-time>
until
string <date-time>
entryType
string (LedgerEntryTypeDto)
Enum: "CONSUMPTION" "WEB_SEARCH_CONSUMPTION" "IMAGE_GENERATION_CONSUMPTION" "VOICE_CALL_CONSUMPTION" "PROVISIONING" "TOP_UP" "RESET" "ADJUSTMENT" "FREE_TIER_CREDIT" "ADJUSTMENT_CREDIT_INCLUDED" "ADJUSTMENT_CREDIT_EXTRA" "ADJUSTMENT_DEBIT_INCLUDED" "ADJUSTMENT_DEBIT_EXTRA"
cursor
string
limit
integer [ 1 .. 100 ]
Default: 50

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List organization invoices

Paginated invoices for the org subscription. Requires BILLING_INVOICES READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

query Parameters
cursor
string non-empty
limit
integer [ 1 .. 100 ]
Default: 20

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List organization allocation limits

Returns org-level monthly/daily allocation limits per balance type. Requires BILLING_ALLOCATIONS READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List organization members

Paginated member list for seat reconciliation. Requires ORG_SETTINGS READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

query Parameters
limit
integer [ 1 .. 100 ]
Default: 10
offset
integer >= 0
Default: 0

Responses

Response samples

Content type
application/json
{
  • "members": [
    ],
  • "totalCount": 0
}

List service accounts

Lists active service accounts in the organization. The cursor is a public id. Requires ORG_SETTINGS WRITE or API_KEYS WRITE at tenant or instance level.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
query Parameters
limit
integer [ 1 .. 100 ]
Default: 50
cursor
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Create a service account

Creates a tenant-owned service account. The same active name returns 200 with alreadyExists true. A disabled name returns 409. More than 100 inserts in an hour for the caller returns 429. The response id is the public id.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
Request Body schema: application/json
required
name
required
string [ 1 .. 200 ] characters
required
Array of objects or objects (ServiceAccountRole) [ 1 .. 50 ] items

One to fifty roles: a built-in role, or a custom role of the account organization.

description
string <= 2000 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "roles": [
    ],
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "alreadyExists": true
}

Get a service account

Returns one active service account. A missing, deleted, or other-organization id returns 404.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete a service account

Marks the service account deleted, tombstones its name, and revokes its API keys. A second delete returns 404.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string

Responses

Disable a service account

Disables the service account. A second disable returns the same account.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Mint a service account API key

Returns the secret once. The key stores the account principal and an empty user id.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string
Request Body schema: application/json
required
name
required
string

Name of the API key.

scopes
required
Array of strings non-empty

Scopes to grant to the API key.

orgId
string

Optional organization ID to create the API key in. Defaults to the caller's organization. Tenant-scoped callers may use this to create keys for users in another organization within the same tenant. Required when tenantOwned is true.

userId
string

Optional user ID to create the API key for. Defaults to the caller. Required when tenantOwned is true.

tenantOwned
boolean
Default: false

When true, the key is tenant-owned: child-org admins cannot revoke, update, or reset it. Requires explicit orgId and userId, and an active tenant-owned membership for that user in that org. Omit or send false for unmanaged keys.

source
string
Default: "PLATFORM"
Enum: "PLATFORM" "ROUTER"

The type of key. PLATFORM is an ordinary key. ROUTER is a router key: its requests reach the model with only the caller's instructions and function tools, and it can call only the stateless model routes. ROUTER needs the router keys capability of the organization (403 otherwise). The type cannot change after creation.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ],
  • "orgId": "string",
  • "userId": "string",
  • "tenantOwned": false,
  • "source": "PLATFORM"
}

List service account API keys

Lists keys for the account. The secret is absent. A disabled account is listed.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string

Responses

Revoke a service account API key

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string
apiKeyId
required
string

Responses

Rotate a service account API key

Replaces the secret of one live key and returns it once. The key keeps its id, name, and scopes. The previous secret stops working at once. Requires tenant or instance level API_KEYS WRITE. A revoked key is not found.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string
apiKeyId
required
string

Responses

Enable a service account

Enables the service account. A second enable returns the same account.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}

List organization invitations

Paginated invitation list for reconciliation. Requires ORG_SETTINGS READ.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

query Parameters
status
string
Default: "pending"
Enum: "pending" "accepted" "revoked"
limit
integer [ 1 .. 100 ]
Default: 50
offset
integer >= 0
Default: 0

Responses

Response samples

Content type
application/json
{
  • "invitations": [
    ],
  • "totalCount": 0
}

Invite organization member

Sends an invitation email to add a member by email. Seat caps enforced. Optional tenantOwned marks the resulting membership so child-org admins cannot remove it; those memberships persist FULL and do not consume a paid seat. Requires ORG_SETTINGS WRITE.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Request Body schema: application/json
required
emailAddress
required
string <email>
role
required
string
Enum: "ADMIN" "MEMBER"
membershipType
string (OrgMembershipTypeDto)
Enum: "FULL" "RESTRICTED"
tenantOwned
boolean
Default: false

When true, the resulting membership is tenant-owned: child-org admins cannot remove it, and it does not consume a paid seat. Only this tenant invite route may persist true; extra tenantOwned on the org-admin invite API is 400.

Responses

Request samples

Content type
application/json
{
  • "emailAddress": "user@example.com",
  • "role": "ADMIN",
  • "membershipType": "FULL",
  • "tenantOwned": false
}

Response samples

Content type
application/json
{
  • "success": true
}

List child-organization API keys

Lists every API key in the target child organization, including tenant-owned rows. Tokens are never included. Requires API_KEYS WRITE at TENANT or INSTANCE, plus tenant ownership of the path org.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target child organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Convert or unmark a tenant-owned API key

Sets tenantOwned on an existing key in the child organization. Does not rotate the secret. Requires API_KEYS WRITE at TENANT or INSTANCE, plus tenant ownership of the path org. Returns 404 when the key's orgId does not match the path org.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target child organization ID (must belong to the tenant).

apiKeyId
required
string

Identifier of the API key.

Request Body schema: application/json
required
tenantOwned
required
boolean

Set true to convert an unmanaged key, or false to unmark it. Unmarking while the owner membership remains tenant-owned is allowed; unmarking a membership while tenant-owned keys remain returns 409 on the member PUT.

Responses

Request samples

Content type
application/json
{
  • "tenantOwned": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true
}

Update a child-organization API key

Renames a key and replaces its scope list in the child organization, including tenant-owned keys. The secret token is never returned. Requires API_KEYS WRITE at TENANT or INSTANCE, plus tenant ownership of the path org. Returns 404 when the key's orgId does not match the path org.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target child organization ID (must belong to the tenant).

apiKeyId
required
string

Identifier of the API key.

Request Body schema: application/json
required
name
required
string non-empty
scopes
required
Array of strings non-empty [ items non-empty ]

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true
}

Revoke a child-organization API key

Revokes a key in the child organization, including tenant-owned keys. Returns 204. Requires API_KEYS WRITE at TENANT or INSTANCE, plus tenant ownership of the path org. Returns 404 when the key's orgId does not match the path org. Do not use child-org DELETE /organizations/api-keys/{id} or owner DELETE /api-keys/{id} for tenant-owned keys.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target child organization ID (must belong to the tenant).

apiKeyId
required
string

Identifier of the API key.

Responses

Reset a child-organization API key

Rotates the secret for a tenant-owned key in the child organization and returns the new token once. A person-owned key gets 403, because the response holds the new secret: convert the key to tenant-owned first, or delete it and create a new one. Requires API_KEYS WRITE at TENANT or INSTANCE, plus tenant ownership of the path org. Returns 404 when the key's orgId does not match the path org.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target child organization ID (must belong to the tenant).

apiKeyId
required
string

Identifier of the API key.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true,
  • "key": "string"
}

Update organization member

Updates role, membership type, and/or tenantOwned. At least one field required. Flag-only { tenantOwned: true|false } is allowed. Cannot assign RESTRICTED while tenantOwned is true. Unmarking tenantOwned while tenant-owned keys still exist returns 409. Requires ORG_SETTINGS WRITE.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

userId
required
string

Target user ID.

Request Body schema: application/json
required
role
string
Enum: "ADMIN" "MEMBER"
membershipType
string (OrgMembershipTypeDto)
Enum: "FULL" "RESTRICTED"
tenantOwned
boolean

Set true to convert an unmanaged member, or false to unmark. Flag-only bodies are allowed. Unmarking while tenant-owned keys still exist returns 409. Cannot send membershipType RESTRICTED while tenantOwned is true.

Responses

Request samples

Content type
application/json
{
  • "role": "ADMIN",
  • "membershipType": "FULL",
  • "tenantOwned": true
}

Response samples

Content type
application/json
{
  • "success": true
}

Unassign organization member

Removes membership and cancels seat assignment. Idempotent: returns 204 even if the member was already removed. Requires ORG_SETTINGS WRITE. Uses a Redis-backed lock; returns 503 when Redis is unavailable. Returns 400 when another deletion is already in progress for the org.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

userId
required
string

Target user ID.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Get child organization

Returns the child organization's name and logo from the identity provider. This is not the settings object; use /api/v1/org-settings with orgId for that. Requires ORG_SETTINGS READ at tenant or instance level, and the organization must belong to the caller's tenant.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "name": "string",
  • "imageUrl": "string"
}

Update child organization name or logo

Updates a child organization's display name and logo. The body is multipart/form-data, not JSON, and at least one of name, logo or removeLogo must be present. Sending both logo and removeLogo applies the new logo and ignores the removal. This route covers name and logo only; plan tier, region and limits are not settable here. Requires ORG_SETTINGS WRITE at tenant or instance level.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Request Body schema: multipart/form-data
required
name
string <= 256 characters

New display name. Trimmed, and must not be empty after trimming.

logo
string <binary>

PNG, JPEG or WebP image of 5 MB or less.

removeLogo
string
Value: "true"

Send the string true to delete the current logo. Any other value is ignored.

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "name": "string",
  • "imageUrl": "string"
}

Detach child organization from the tenant

Removes the organization's tenant association by clearing its tenant ID. This is not a deprovision: the organization, its users and its data all survive, and the identity provider record is untouched. The tenant's own owner organization cannot be detached, nor can an organization that owns another tenant. Requires ORG_SETTINGS WRITE at tenant or instance level.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Revoke organization invitation

Revokes a pending invitation. This is not idempotent: the invitation state is not checked locally before the call is forwarded to the identity provider, so revoking an invitation that was already accepted or never existed surfaces as a 500 rather than a 404. Requires ORG_SETTINGS WRITE at tenant or instance level. Organizations billed through AppDirect cannot revoke invitations here.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

Target organization ID (must belong to the tenant).

invitationId
required
string

Identifier of the invitation to revoke.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Roles

Create and manage custom roles and their permission sets

List roles

Lists built-in and custom roles with their permission sets. The organization comes from the API key unless orgId is supplied. Requires ROLES READ at organization or instance level; tenant-level access alone is not accepted.

Authorizations:
ApiKeyAuth
query Parameters
orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a custom role

Creates a custom role. Requires ROLES WRITE at organization or instance level. Permissions that the platform reserves for superusers are dropped silently, so confirm the created role's permissions in the response. The permissions of the caller must cover each permission that remains: the same resourceType and action, at an equal or higher accessLevel. If one is not covered, the request returns 403 and no role is created. A caller whose ROLES WRITE is at tenant or instance level is not compared.

Authorizations:
ApiKeyAuth
query Parameters
orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Request Body schema: application/json
required
name
required
string [ 1 .. 50 ] characters

Must be unique within the organization.

description
string <= 250 characters
required
Array of objects (Permission) non-empty

At least one grantable permission is required.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "orgId": "string",
  • "name": "string",
  • "description": "string",
  • "permissions": [
    ],
  • "isSystem": true,
  • "isDeleted": true,
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Update a role

Updates a role's name, description or permissions. Supplying permissions replaces the existing set rather than merging. The built-in Admin role cannot be modified; the built-in User role can be, but no other system role can. Requires ROLES WRITE. The permissions of the caller must cover each permission that the request adds to the stored role: the same resourceType and action, at an equal or higher accessLevel. A permission that the stored role already holds is not compared. If an added permission is not covered, the request returns 403 and the role does not change. A caller whose ROLES WRITE is at tenant or instance level is not compared. The built-in User role cannot hold ROLES WRITE: a permission list for it with resourceType roles and action write returns 400, for each caller.

Authorizations:
ApiKeyAuth
path Parameters
roleId
required
string

Public identifier of the role, as returned in CustomRoleDto.id.

query Parameters
orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Request Body schema: application/json
required
name
string [ 1 .. 50 ] characters
description
string <= 250 characters
Array of objects (Permission) non-empty

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "createdBy": "string",
  • "orgId": "string",
  • "name": "string",
  • "description": "string",
  • "permissions": [
    ],
  • "isSystem": true,
  • "isDeleted": true,
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Delete a custom role

Soft-deletes a custom role, first unassigning it from every user in the organization. The built-in Admin and User roles cannot be deleted, nor can any other system role. Requires ROLES WRITE.

Authorizations:
ApiKeyAuth
path Parameters
roleId
required
string

Public identifier of the role, as returned in CustomRoleDto.id.

query Parameters
orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "code": "string",
  • "details": [
    ]
}

Organization Settings

Read and update organization-wide settings and policies

Get resolved UI policy for the current member

Returns the effective tenant UI configuration for the caller organization, including capabilities, policies, tool policies, chat interaction policies, white-label branding, and field provenance.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "capabilities": {
    },
  • "policies": {
    },
  • "toolPolicies": {
    },
  • "chatInteractionPolicies": {
    },
  • "whiteLabel": {
    },
  • "provenance": {
    }
}

Get organization settings

Returns the organization's settings. The response is filtered to what the caller may read: full org-settings read returns every field, while a caller holding only app-branding, app-integrations or app-deploy-approvals receives just that slice. Tenant callers read a child organization by passing orgId.

Authorizations:
ApiKeyAuth
query Parameters
orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "theme": "DEFAULT",
  • "publicCatalog": true,
  • "approvedFilter": true,
  • "userInvites": true,
  • "aiSharing": true,
  • "aiRating": true,
  • "apiAccess": true,
  • "officeAddinAccess": true,
  • "linkPermissions": true,
  • "orgPermissions": true,
  • "groupCreation": true,
  • "memory": true,
  • "incognito": true,
  • "suggestedActions": true,
  • "enterpriseSearch": true,
  • "selfHostedCliAgents": true,
  • "requireTwoFactorAuth": true,
  • "appExternalSharing": true,
  • "defaultAgentVisibility": "PRIVATE",
  • "modelSettings": {
    },
  • "logoDark": "string",
  • "logoLight": "string",
  • "orgName": "string",
  • "brandStyles": {
    },
  • "appBrandingPrompt": "string",
  • "docsSiteUrl": "string",
  • "showDevsAiBranding": true,
  • "showDocumentationLink": true,
  • "showUpgradeLink": true,
  • "showUserInviteLink": true,
  • "showUserMobileAppLink": true,
  • "showMobileAppAnnouncementBanner": true,
  • "showIntegrationsLinks": true,
  • "showAvatarImageGeneration": true,
  • "toolPolicies": {
    },
  • "integrationPolicies": {
    },
  • "timezone": "string",
  • "locale": "en",
  • "contextBudgetPercentages": {
    },
  • "networkCatalogTenantEnabled": true,
  • "defaultListInOrgCatalog": true,
  • "orgPrompt": "string",
  • "orgPromptConfig": {
    },
  • "sanitizationPolicy": {
    },
  • "tenantOwnerOrgId": "string",
  • "tenantId": 0,
  • "tenantName": "string",
  • "isTenantOwner": true,
  • "childOrganizations": [
    ]
}

Upsert organization settings

Replaces the organization's settings. This is a whole-object upsert rather than a per-field patch: the required fields must be present on every call, so read the settings first and send the modified object back. Optional fields you omit keep their current values, and fields you are not permitted to write are silently left unchanged instead of returning an error, so compare the response against what you sent. The target organization is taken from the body's orgId. Requires write access on the relevant settings group at tenant, organization or instance level.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
orgId
required
string
theme
required
string (OrgTheme)
Enum: "DEFAULT" "SCHOOL"
publicCatalog
required
boolean

Whether the organization lists agents in the public Network Catalog.

approvedFilter
required
boolean

Whether catalog browsing is limited to organization-approved agents.

userInvites
required
boolean

Whether members may invite other users.

aiSharing
required
boolean

Whether members may share agents.

aiRating
required
boolean

Whether agents may be rated.

apiAccess
required
boolean

Whether API keys may be minted for this organization. Creating a key requires this to be true.

officeAddinAccess
boolean

Whether members may sign in to the Office add-in. The office_addin feature flag must also be on.

linkPermissions
required
boolean

Whether link-based agent sharing is allowed.

orgPermissions
required
boolean

Whether organization-wide agent visibility is allowed.

groupCreation
required
boolean

Whether members may create groups.

memory
required
boolean

Whether conversational memory is enabled.

incognito
required
boolean

Whether incognito chats are enabled.

suggestedActions
required
boolean

Whether suggested actions are shown.

enterpriseSearch
required
boolean

Whether enterprise search is enabled.

selfHostedCliAgents
required
boolean

Whether self-hosted CLI agents are permitted.

requireTwoFactorAuth
required
boolean

Whether members must enrol in two-factor authentication.

appExternalSharing
boolean

Whether apps may be shared outside the organization.

defaultAgentVisibility
required
string (AIVisibility)
Enum: "PRIVATE" "GROUP" "ORGANIZATION" "ANYONE_WITH_LINK"

Visibility level controlling who can access the AI. PRIVATE: Only the owner can access. GROUP: Only specified groups can access. ORGANIZATION: Anyone in the organization can access. ANYONE_WITH_LINK: Anyone with the link can access.

required
object (OrgModelSettings)
logoDark
required
string or null

HTTPS URL of the dark-theme logo.

logoLight
required
string or null

HTTPS URL of the light-theme logo.

orgName
required
string or null
required
object or null

White-label appearance. Child organizations may be blocked from overriding branding by tenant policy, which returns 403.

appBrandingPrompt
string or null
docsSiteUrl
string or null <= 2048 characters

Must be HTTPS.

showDevsAiBranding
boolean

Whether Devs.ai branding is shown.

showDocumentationLink
boolean

Whether the documentation link is shown.

showUpgradeLink
boolean

Whether the upgrade link is shown.

showUserInviteLink
boolean

Whether the invite link is shown.

showUserMobileAppLink
boolean

Whether the mobile app link is shown.

showMobileAppAnnouncementBanner
boolean

Whether the mobile app banner is shown.

showIntegrationsLinks
boolean

Whether integration links are shown.

showAvatarImageGeneration
boolean

Whether avatar image generation is offered.

object (ToolPolicies)
object or null

Guardrails on third-party integrations and app deployment.

timezone
string <= 64 characters

IANA timezone, for example America/New_York.

locale
string
Enum: "en" "fr" ""

Default locale. Empty means the platform default.

object (ContextBudgetPercentages)

Share of the model context window reserved for history. Absent means no organization override, so product defaults apply: 50 for chat, 80 for App Builder, 90 for the primary assistant. The assistant budget is never below 100,000 tokens, or the full model window when that is smaller.

object (OrgPromptConfig)

System prompt injected by surface. agent covers custom agents; agentless covers direct model chat.

orgPrompt
string or null <= 4000 characters

Deprecated. Use orgPromptConfig. Sending a non-empty value together with orgPromptConfig is rejected.

showChatImageGeneration
boolean

Deprecated. Normalized into toolPolicies.imageGeneration.

tenantOwnerOrgId
string or null

Accepted for round-tripping but not persisted.

tenantId
integer or null

Accepted for round-tripping but not persisted.

tenantName
string or null

Accepted for round-tripping but not persisted.

isTenantOwner
boolean

Accepted for round-tripping but not persisted.

Array of objects (ChildOrgInfo)

Accepted for round-tripping but not persisted.

object

Accepted for round-tripping but not persisted here; use the dedicated sanitization routes.

Responses

Request samples

Content type
application/json
{
  • "orgId": "string",
  • "theme": "DEFAULT",
  • "publicCatalog": true,
  • "approvedFilter": true,
  • "userInvites": true,
  • "aiSharing": true,
  • "aiRating": true,
  • "apiAccess": true,
  • "officeAddinAccess": true,
  • "linkPermissions": true,
  • "orgPermissions": true,
  • "groupCreation": true,
  • "memory": true,
  • "incognito": true,
  • "suggestedActions": true,
  • "enterpriseSearch": true,
  • "selfHostedCliAgents": true,
  • "requireTwoFactorAuth": true,
  • "appExternalSharing": true,
  • "defaultAgentVisibility": "PRIVATE",
  • "modelSettings": {
    },
  • "logoDark": "string",
  • "logoLight": "string",
  • "orgName": "string",
  • "brandStyles": {
    },
  • "appBrandingPrompt": "string",
  • "docsSiteUrl": "string",
  • "showDevsAiBranding": true,
  • "showDocumentationLink": true,
  • "showUpgradeLink": true,
  • "showUserInviteLink": true,
  • "showUserMobileAppLink": true,
  • "showMobileAppAnnouncementBanner": true,
  • "showIntegrationsLinks": true,
  • "showAvatarImageGeneration": true,
  • "toolPolicies": {
    },
  • "integrationPolicies": {
    },
  • "timezone": "string",
  • "locale": "en",
  • "contextBudgetPercentages": {
    },
  • "orgPromptConfig": {
    },
  • "orgPrompt": "string",
  • "showChatImageGeneration": true,
  • "tenantOwnerOrgId": "string",
  • "tenantId": 0,
  • "tenantName": "string",
  • "isTenantOwner": true,
  • "childOrganizations": [
    ],
  • "sanitizationPolicy": {
    }
}

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "theme": "DEFAULT",
  • "publicCatalog": true,
  • "approvedFilter": true,
  • "userInvites": true,
  • "aiSharing": true,
  • "aiRating": true,
  • "apiAccess": true,
  • "officeAddinAccess": true,
  • "linkPermissions": true,
  • "orgPermissions": true,
  • "groupCreation": true,
  • "memory": true,
  • "incognito": true,
  • "suggestedActions": true,
  • "enterpriseSearch": true,
  • "selfHostedCliAgents": true,
  • "requireTwoFactorAuth": true,
  • "appExternalSharing": true,
  • "defaultAgentVisibility": "PRIVATE",
  • "modelSettings": {
    },
  • "logoDark": "string",
  • "logoLight": "string",
  • "orgName": "string",
  • "brandStyles": {
    },
  • "appBrandingPrompt": "string",
  • "docsSiteUrl": "string",
  • "showDevsAiBranding": true,
  • "showDocumentationLink": true,
  • "showUpgradeLink": true,
  • "showUserInviteLink": true,
  • "showUserMobileAppLink": true,
  • "showMobileAppAnnouncementBanner": true,
  • "showIntegrationsLinks": true,
  • "showAvatarImageGeneration": true,
  • "toolPolicies": {
    },
  • "integrationPolicies": {
    },
  • "timezone": "string",
  • "locale": "en",
  • "contextBudgetPercentages": {
    },
  • "networkCatalogTenantEnabled": true,
  • "defaultListInOrgCatalog": true,
  • "orgPrompt": "string",
  • "orgPromptConfig": {
    },
  • "sanitizationPolicy": {
    },
  • "tenantOwnerOrgId": "string",
  • "tenantId": 0,
  • "tenantName": "string",
  • "isTenantOwner": true,
  • "childOrganizations": [
    ]
}

Get model visibility overrides of an organization (superuser)

Lists every active hidden model, voice and non-voice, and whether the organization has a visibility override for it. An organization without a settings row is valid and has no overrides. Requires ORG_SETTINGS READ at instance level.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

ID of the organization whose visibility overrides are read or saved.

Responses

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "models": [
    ]
}

Save model visibility overrides of an organization (superuser)

Sets which active hidden models the organization has a visibility override for. The request is validated whole before any write, so a rejected request changes nothing. The save keeps stored overrides for IDs outside the active hidden models, and keeps all other organization settings, the voice allowlist and the stored voice default. Removing an override does not repair a default voice model or saved agent voices that use the model. Requires ORG_SETTINGS WRITE at instance level.

Authorizations:
ApiKeyAuth
path Parameters
orgId
required
string

ID of the organization whose visibility overrides are read or saved.

Request Body schema: application/json
required
modelIds
required
Array of strings <= 100 items [ items [ 1 .. 191 ] characters ]

The hidden model IDs that must have a visibility override after the save. Each ID must be an active hidden model. Duplicates count once. An empty list removes every override for the active hidden models. Stored overrides for other IDs (public, retired or unknown models) stay.

Responses

Request samples

Content type
application/json
{
  • "modelIds": [
    ]
}

Response samples

Content type
application/json
{
  • "orgId": "string",
  • "models": [
    ]
}

Organization Members

List organization members and invite new ones

List organization members

Returns a cursor-paginated page of members along with the roles available in the organization and current seat usage. Tenant-owned members are included with tenantOwned true. The invitations array is always empty here. Callers without roles read permission see empty role lists and isClerkAdmin false. Requires USERS READ at organization, tenant or instance level.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer >= 1
Default: 10

Page size. Defaults to 10; values above 100 are capped at 100.

cursor
string [ 1 .. 512 ] characters

Opaque cursor from pagination.nextCursor of the previous page. Without sortBy and sortDirection it is a numeric membership id. With sortBy and sortDirection it must be the cursor returned by a page requested with the same sort; a numeric cursor with a sort, a sorted-page cursor without a sort, a cursor issued for a different sort, and a malformed or tampered cursor are rejected with 400.

sortBy
string
Enum: "joinedAt" "lastLoginAt"

Sort field. Must be sent together with sortDirection; sending only one is rejected with 400. Without a sort, members are ordered by membership id ascending. Members who never logged in sort as the oldest: last when descending, first when ascending. Ties are ordered by membership id in the same direction.

sortDirection
string
Enum: "asc" "desc"

Sort direction. Must be sent together with sortBy.

search
string non-empty

Free-text match on member name or email.

seatTier
string (OrgMembershipTypeDto)
Enum: "FULL" "RESTRICTED"

Filter by membership type.

roleId
string non-empty

Filter by assigned role. Ignored unless the caller may read roles for the target organization.

orgId
string

Target organization ID. Defaults to the caller's organization. Cross-organization targeting requires INSTANCE access, or TENANT access where the target organization belongs to the caller's tenant.

Responses

Response samples

Content type
application/json
{
  • "members": [
    ],
  • "totalCount": 0,
  • "pagination": {
    },
  • "roles": [
    ],
  • "invitations": [
    ],
  • "seatUsage": {
    }
}

Invite members to an organization

Invites up to 100 email addresses in one call. Addresses that already belong to the organization or already have a pending invitation are skipped, so a successful call can report invitedCount 0. Seat availability is checked before sending. Requires USERS WRITE at organization, tenant or instance level. A role in customRoleIds also requires ROLES WRITE that is valid for the target organization. For a custom role, the permissions of the caller must cover each permission of the role: the same resourceType and action, at an equal or higher accessLevel. For the Admin role, they must cover each permission of the built-in Admin set. A signed-in organization admin passes this check. An API key or an OAuth token of organization level never passes it, also when its owner is an admin. A caller whose ROLES WRITE is at tenant or instance level is not compared. A refused role returns 403, and no invitation is sent. Organizations billed through AppDirect cannot invite members here. Sending more than 100 billable invitations in an hour is rate limited, and that response is plain text rather than JSON. This route does not accept tenantOwned; extra keys fail validation with 400. Use POST /api/v1/tenant/organizations/{orgId}/invitations to create a tenant-owned membership.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
emails
required
Array of strings <email> [ 1 .. 100 ] items [ items <email > ]

Lowercased and de-duplicated before sending.

membershipType
required
string (OrgMembershipTypeDto)
Enum: "FULL" "RESTRICTED"
customRoleIds
Array of strings <= 5 items [ items non-empty ]

Defaults to empty. Assigning an admin role requires roles write permission on the target organization.

orgId
string

Target organization. Defaults to the caller's organization.

Responses

Request samples

Content type
application/json
{
  • "emails": [
    ],
  • "membershipType": "FULL",
  • "customRoleIds": [
    ],
  • "orgId": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "invitedCount": 0
}

Conversations

Create, read, update, and delete conversation resources used as the conversation field on the Responses API.

Create a conversation

Create an empty conversation. Send the returned id as conversation on POST /api/v2/responses (or POST /api/v1/responses) to run turns in that thread. metadata may be omitted; send {} when there is none.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
object or null

String key-value pairs. Null clears stored conversation metadata.

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "conversation",
  • "created_at": 0,
  • "metadata": {
    }
}

Get a conversation

Authorizations:
ApiKeyAuth
path Parameters
conversationId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "conversation",
  • "created_at": 0,
  • "metadata": {
    }
}

Update conversation metadata

Replaces conversation metadata. This is POST, matching the OpenAI Conversations update method.

Authorizations:
ApiKeyAuth
path Parameters
conversationId
required
string non-empty
Request Body schema: application/json
required
object or null

String key-value pairs. Null clears stored conversation metadata.

property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "conversation",
  • "created_at": 0,
  • "metadata": {
    }
}

Delete a conversation

Authorizations:
ApiKeyAuth
path Parameters
conversationId
required
string non-empty

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "object": "conversation.deleted",
  • "deleted": true
}

CLI Authentication

Browser-session login that mints the API key external apps use. The supported client flow is /cli/login, documented in docs/reference/features/cli-authentication.md.

Mint an API key from a signed-in browser session

Called by the /cli/login page after the user signs in. Requires that browser session, not an API key. Creates a key, or resets the existing key with the same name, and returns the plaintext token once. External apps (mobile, Tauri, CLI) should open /cli/login and read the token from the callback. See docs/reference/features/cli-authentication.md. Returns 403 when the organization has API access disabled.

Request Body schema: application/json
required
name
string

API key display name. Each distinct name is an independent key for the signed-in user and org. Defaults when omitted.

state
string non-empty

CSRF nonce echoed back on the response.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "state": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastUsedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "userEmail": "string",
  • "name": "string",
  • "scopes": [
    ],
  • "source": "PLATFORM",
  • "tenantOwned": true,
  • "key": "string",
  • "orgName": "string",
  • "state": "string"
}

Projects

Create, read, and manage projects, their chats, members and files

Create a project

Creates a project owned by the caller and answers it. Requires projects.write.self.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters

Trimmed. A name that is empty after trimming is a 400.

description
string <= 300 characters
instructions
string or null <= 4000 characters

Instructions every chat in the project starts with.

defaultModelId
string
Default: "default"

Model a new project chat prefers. default leaves the ordinary chat default.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "default"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "string",
  • "status": "ACTIVE"
}

List the caller's projects

One page of the caller's owned, member or pending projects. Each row keeps the list data the browser already reads and adds the closed allowedActions set computed for this caller. Requires projects.read.self.

Authorizations:
ApiKeyAuth
query Parameters
type
required
string
Enum: "owned" "member" "pending"

Which section to read: projects the caller owns, projects where the caller is an accepted member, or projects with a pending invitation for the caller.

cursor
string non-empty

Opaque cursor from pagination.nextCursor.

limit
integer [ 1 .. 50 ]

Page size.

search
string

Match on project name or description.

includeArchived
string
Enum: "true" "false" "1" "0"

Include archived projects. Off when absent.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List project previews for the caller

One page of short project rows for a picker: id, name and description only. Requires projects.read.self.

Authorizations:
ApiKeyAuth
query Parameters
type
required
string
Enum: "owned" "member"

Which section to read. A preview read has no pending section.

cursor
string non-empty
limit
integer [ 1 .. 50 ]

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Get one project with the caller's allowed actions

Answers the project and the closed allowedActions set for this caller. View access is the project page rule: owner, accepted member, org admin or superuser. A caller who may not view it gets the same 404 a missing project gets. This is the reconciliation read a client awaits after ownership transfer. Requires projects.read.self.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Response samples

Content type
application/json
{
  • "project": {
    },
  • "allowedActions": [
    ]
}

Update one project

Updates the project settings and answers the saved project. Requires projects.write.self and the project owner, an org admin or a superuser.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Request Body schema: application/json
required
name
string [ 1 .. 100 ] characters
description
string or null <= 300 characters
instructions
string or null <= 4000 characters
defaultModelId
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "string",
  • "status": "ACTIVE"
}

Delete one project

Soft-deletes the project. The call is idempotent: a missing project, another organization's project, and a caller who may not delete all answer 204 and delete nothing. Requires projects.write.self.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Archive one project

Archives the project and answers it. Requires projects.write.self and the project owner, an org admin or a superuser.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "string",
  • "status": "ACTIVE"
}

Unarchive one project

Unarchives an archived project and answers it. Requires projects.write.self and the project owner, an org admin or a superuser.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "ownerUserId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "description": "string",
  • "instructions": "string",
  • "defaultModelId": "string",
  • "status": "ACTIVE"
}

List the chats of one project

One page of the project's chats, each with the person who started it. A caller who is not a member, an org admin or a superuser gets 403. Requires projects.read.self.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

query Parameters
limit
integer [ 1 .. 50 ]

Page size.

cursor
string

Opaque cursor from pagination.nextCursor.

filter
string
Default: "all"
Enum: "all" "my"

all reads every project chat; my reads only the caller's own chats in the project.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

List the members of one project

Answers every membership of the project, including the owner's synthesized row and pending invitations. Requires projects.read.self.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Invite one person to a project

Creates a PENDING membership for the named person. Requires projects.write.self and the project owner, an org admin or a superuser; inviting again for a person who already has a membership answers 200 with that membership instead of failing. For the Devs.ai Desktop client, inviting also needs users.read.self, the same predicate that offers invite_member. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Request Body schema: application/json
required
userId
required
string non-empty

Person to invite. The invitation starts as PENDING and needs the person's accept call.

Responses

Request samples

Content type
application/json
{
  • "userId": "string"
}

Response samples

Content type
application/json
{
  • "user": {
    },
  • "status": "PENDING",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Search people this project may invite

One page of eligible people, paged and searched by the server. The server excludes the owner, current and pending members, deleted users and integration-service identities. Requires projects.write.self and, separately, the exact users.read.self scope; an organization or instance user grant does not satisfy it. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

query Parameters
search
required
string non-empty

Free-text match on candidate name or email.

limit
integer [ 1 .. 50 ]
Default: 10

Page size.

cursor
string non-empty

Opaque cursor from pagination.nextCursor. Pass it back verbatim.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Remove one project member, or leave the project

Removes one membership. The owner may remove another member; an accepted member may remove themself, which is the Leave action; an org admin or superuser may remove any member. The owner cannot remove themself, and that is a 400. Requires projects.write.self. For the Devs.ai Desktop client, removing another member also reads the management flag; a self-removal does not. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

userId
required
string non-empty

User id of the project member the operation targets.

Responses

Accept your own project invitation

Moves the caller's own PENDING membership to ACCEPTED and answers it. A caller may accept only their own membership. Requires projects.write.self.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

userId
required
string non-empty

User id of the project member the operation targets.

Responses

Response samples

Content type
application/json
{
  • "user": {
    },
  • "status": "PENDING",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Transfer project ownership

Makes userId the owner. The target must hold an accepted membership: the use case refuses a missing, pending or removed membership with 409 before any write, and the transaction re-checks the membership as a race guard so a membership removed mid-transfer cannot be handed the project. Transferring to the current owner answers 204 and changes nothing. Requires projects.write.self and the project owner, an org admin or a superuser. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

userId
required
string non-empty

User id of the project member the operation targets.

Responses

List the files of one project

Answers every file of the project with its project-read status and token count. content is absent; the content route serves the body. Requires projects.read.self and project membership, org admin or superuser.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a project file record or upload a small file

Two modes. JSON creates a UPLOADING file record for a later durable-blob upload: mint a token with POST /api/v1/projects/{id}/files/upload, PUT the bytes to https://vercel.com/api/blob, then complete the session. multipart/form-data uploads the bytes through this API and answers an UPLOADED record; it goes through a Vercel Function and is limited to about 4.5MB. Requires projects.write.self, files.write.self and project membership, org admin or superuser; the Devs.ai Desktop client must also own the project. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Request Body schema:
required

JSON creates the file record; multipart uploads the bytes through this API.

filename
required
string

The name of the file.

size
required
integer

The size of the file in bytes.

mimeType
required
string

The MIME type of the file.

metadata
object or null

Additional metadata associated with the file.

Responses

Request samples

Content type
{
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "metadata": { }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "principalId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "source": "USER",
  • "filename": "string",
  • "size": 0,
  • "mimeType": "string",
  • "url": "string",
  • "revisionToken": "string",
  • "editable": true,
  • "policyWithheld": true,
  • "sandboxSyncFailed": true,
  • "metadata": { },
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "status": "UPLOADED"
}

Mint a Blob client token for a project file, or complete its upload

Second step of the durable-blob project upload. Send blob.generate-client-token after the JSON create-file call, then PUT the bytes to https://vercel.com/api/blob?pathname={url-encoded pathname} with Authorization: Bearer {clientToken}, x-vercel-blob-access set to the answered access value and a Content-Type that matches the file. When the answer sets sessionCompleteRequired, send durable-blob.session-complete with the stored blob URL to finish; the deployment's Vercel blob.upload-completed callback otherwise finishes it. The blob URL must sit under orgs/{orgId}/projects/{projectId}/files/ and name the same file id. Requires projects.write.self and files.write.self. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

Request Body schema: application/json
required
One of
type
required
string
Value: "blob.generate-client-token"
required
object

Responses

Request samples

Content type
application/json
Example
{
  • "type": "blob.generate-client-token",
  • "payload": {
    }
}

Response samples

Content type
application/json
Example
{
  • "type": "blob.generate-client-token",
  • "clientToken": "string",
  • "access": "public",
  • "sessionCompleteRequired": true
}

Read or download one project file

Serves the file's indexed text as text/plain, or 204 when the file has no indexed content yet. With ?download it streams the stored bytes as an attachment with the file's own media type. Only an UPLOADED file is served. Requires projects.read.self and project membership, org admin or superuser.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

fileId
required
string non-empty

Id of the file within the project.

query Parameters
download
string

Its presence, whatever the value, streams the stored bytes as an attachment instead of the indexed text.

Responses

Delete one project file

Starts the durable removal of the file and answers 202. Requires projects.write.self and the project owner, an org admin or a superuser; the Devs.ai Desktop client also needs files.write.self and must own the project. For the Devs.ai Desktop OAuth client only, the organization flag desktop_project_management gates this operation; the client id devsai-desktop with the flag off is refused before the operation has any effect. Browser sessions and other clients do not read the flag.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string non-empty

Public id of the project.

fileId
required
string non-empty

Id of the file within the project.

Responses

Client Versions

The minimum supported version and the download links of client apps, read with no sign-in

Get the minimum supported version of a client app

Returns the minimum supported version and the download links of a client app, such as desktop. Needs no sign-in: the route reads no cookie and no Authorization header, and it answers the same on devs.ai and on an organization's own host. The answer comes from a cache, so a change can take up to about one minute to show. The address and the form of the answer are a permanent contract with released clients.

path Parameters
application
required
string [ 1 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$

The client app, such as desktop. Lowercase letters and digits separated by hyphens, at most 64 characters.

Responses

Response samples

Content type
application/json
{}

Tools

List tools for the AI

Retrieves all tools associated with the specified AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a tool for the AI

Creates a new tool and associates it with the specified AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
One of
apiUrl
required
string
schema
required
string
authenticationType
required
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
compressionEnabled
required
boolean
object (ApiCompressionConfiguration)

Responses

Request samples

Content type
application/json
Example
{
  • "apiUrl": "string",
  • "schema": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "compressionEnabled": true,
  • "compressionConfiguration": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Get a tool for the AI

Retrieves details for a specific tool associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

toolId
required
string

The identifier of the tool.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update a tool for the AI

Updates supported tool types (e.g., spreadsheet, web search).

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
One of
model
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "model": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Delete a tool

Deletes the specified tool from the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

toolId
required
string

The identifier of the tool.

Responses

List API function tools for the AI

Retrieves API function tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create an API function tool

Creates an API function tool and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
apiUrl
required
string
schema
required
string
authenticationType
required
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
compressionEnabled
required
boolean
object (ApiCompressionConfiguration)

Responses

Request samples

Content type
application/json
{
  • "apiUrl": "string",
  • "schema": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "compressionEnabled": true,
  • "compressionConfiguration": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update an API function tool

Updates an API function tool associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
apiUrl
required
string
schema
required
string
authenticationType
required
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
compressionEnabled
required
boolean
object (ApiCompressionConfiguration)

Responses

Request samples

Content type
application/json
{
  • "apiUrl": "string",
  • "schema": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "compressionEnabled": true,
  • "compressionConfiguration": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

List user input tools for the AI

Retrieves user input tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a user input tool

Creates a user input tool and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
type
required
string
Value: "USER_INPUT"
textInput
required
boolean
selectInput
required
boolean
multiSelectInput
required
boolean
confirmInput
required
boolean
addressInput
required
boolean

Responses

Request samples

Content type
application/json
{
  • "type": "USER_INPUT",
  • "textInput": true,
  • "selectInput": true,
  • "multiSelectInput": true,
  • "confirmInput": true,
  • "addressInput": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

List knowledge retrieval tools for the AI

Retrieves knowledge retrieval tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a knowledge retrieval tool

Creates a knowledge retrieval tool and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
model
required
string
maxRetrievalTokens
required
integer
maxRetrievalDocuments
required
integer
queryExpansion
required
boolean
alternateQueryCount
required
integer
hyde
required
boolean
rerank
required
boolean
grade
required
boolean
compress
required
boolean
minRelevanceScore
required
number

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "maxRetrievalTokens": 0,
  • "maxRetrievalDocuments": 0,
  • "queryExpansion": true,
  • "alternateQueryCount": 0,
  • "hyde": true,
  • "rerank": true,
  • "grade": true,
  • "compress": true,
  • "minRelevanceScore": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

List image generation tools for the AI

Retrieves image generation tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an image generation tool

Creates an image generation tool and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
modelId
required
string
samples
integer
size
string
aspectRatio
string
quality
string
style
string

Responses

Request samples

Content type
application/json
{
  • "modelId": "string",
  • "samples": 0,
  • "size": "string",
  • "aspectRatio": "string",
  • "quality": "string",
  • "style": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

List MCP server tools for the AI

Retrieves MCP server tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an MCP server tool

Creates an MCP server tool and associates it with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
type
required
string
Value: "MCP_SERVER"
name
required
string
url
string
orgToolTemplateId
string
authenticationType
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
Array of objects (MCPTool)
selectedTools
Array of strings

Responses

Request samples

Content type
application/json
{
  • "type": "MCP_SERVER",
  • "name": "string",
  • "url": "string",
  • "orgToolTemplateId": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "allTools": [
    ],
  • "selectedTools": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

List tool OAuth status for the AI

Lists OAuth token status information for tools associated with the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reset tool OAuth tokens for the AI

Deletes tool OAuth tokens for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
"string"

Get a tool

Retrieves a tool by ID.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Delete a tool

Deletes the specified tool.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Responses

Update a user input tool

Updates the user input tool configuration.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
textInput
required
boolean
selectInput
required
boolean
multiSelectInput
required
boolean
confirmInput
required
boolean
addressInput
required
boolean

Responses

Request samples

Content type
application/json
{
  • "textInput": true,
  • "selectInput": true,
  • "multiSelectInput": true,
  • "confirmInput": true,
  • "addressInput": true
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update a knowledge retrieval tool

Updates the knowledge retrieval tool configuration.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
model
required
string
maxRetrievalTokens
required
integer
maxRetrievalDocuments
required
integer
queryExpansion
required
boolean
alternateQueryCount
required
integer
hyde
required
boolean
rerank
required
boolean
grade
required
boolean
compress
required
boolean
minRelevanceScore
required
number

Responses

Request samples

Content type
application/json
{
  • "model": "string",
  • "maxRetrievalTokens": 0,
  • "maxRetrievalDocuments": 0,
  • "queryExpansion": true,
  • "alternateQueryCount": 0,
  • "hyde": true,
  • "rerank": true,
  • "grade": true,
  • "compress": true,
  • "minRelevanceScore": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update an image generation tool

Updates the image generation tool configuration.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
modelId
required
string
samples
integer
size
string
aspectRatio
string
quality
string
style
string

Responses

Request samples

Content type
application/json
{
  • "modelId": "string",
  • "samples": 0,
  • "size": "string",
  • "aspectRatio": "string",
  • "quality": "string",
  • "style": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update an MCP server tool

Updates the MCP server tool configuration.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
name
required
string
url
string
orgToolTemplateId
string
authenticationType
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
Array of objects (MCPTool)
selectedTools
Array of strings

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "url": "string",
  • "orgToolTemplateId": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "allTools": [
    ],
  • "selectedTools": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

Update an API function tool

Updates the API function tool configuration.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Request Body schema: application/json
required
apiUrl
required
string
schema
required
string
authenticationType
required
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)
compressionEnabled
required
boolean
object (ApiCompressionConfiguration)

Responses

Request samples

Content type
application/json
{
  • "apiUrl": "string",
  • "schema": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    },
  • "compressionEnabled": true,
  • "compressionConfiguration": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "orgId": "string",
  • "userId": "string",
  • "name": "string",
  • "type": "API_FUNCTION",
  • "data": { },
  • "orgTemplateUuid": "string",
  • "orgTemplateConfig": { },
  • "templateConfig": { }
}

API function tool OAuth callback

Handles OAuth callbacks for API function tools.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

query Parameters
code
required
string

Authorization code.

Responses

Response samples

Content type
application/json
"string"

Get tool OAuth status

Checks whether a tool has an active OAuth token.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Responses

Response samples

Content type
application/json
{
  • "hasToken": true,
  • "scopes": "string"
}

Delete a tool OAuth token

Revokes the OAuth token for the specified tool.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Responses

Initiate tool OAuth flow

Generates an authorization URL for tool OAuth.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the tool.

Responses

Response samples

Content type
application/json
{
  • "authUrl": "string"
}

List chat connectors

Lists connectors the caller can use in chat. Each row includes chat readiness and the caller's current auth state.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Read chat connector connectivity

Reads reachability for the listed chat connectors.

Authorizations:
ApiKeyAuth
query Parameters
toolIds
string

Comma-separated tool ids to probe.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a managed connector session

Creates a user-scoped connect session for a managed connector.

Authorizations:
ApiKeyAuth
path Parameters
toolId
required
string

The identifier of the connector tool.

Request Body schema: application/json
optional
owner
string

Responses

Request samples

Content type
application/json
{
  • "owner": "string"
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "url": "string",
  • "connectorKey": "string",
  • "connectorName": "string"
}

Preview MCP server tools

Previews available tools from an MCP server or template.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
url
string
orgToolTemplateId
string
toolTemplateId
string
toolId
string
authenticationType
string (AuthenticationType)
Enum: "NONE" "API_KEY" "OAUTH"
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object)

Responses

Request samples

Content type
application/json
{
  • "url": "string",
  • "orgToolTemplateId": "string",
  • "toolTemplateId": "string",
  • "toolId": "string",
  • "authenticationType": "NONE",
  • "authenticationData": {
    }
}

Response samples

Content type
application/json
{
  • "availableTools": [
    ],
  • "authenticationRequired": true,
  • "oauthDiscovery": { },
  • "requiresToolSave": true
}

AI User Inputs

List AI user inputs

Retrieves configured user inputs for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create an AI user input

Creates a user input field for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
variableName
required
string
type
required
string (AIUserInputType)
Enum: "SHORT_TEXT" "LONG_TEXT" "TEXT_CHOICE" "IMAGE_CHOICE" "DATE" "NUMBER" "PHONE_NUMBER" "FILE_UPLOAD" "DISPLAY" "ADDRESS"
label
required
string
configuration
required
object
showOnChatCreate
boolean
orderIndex
integer

Responses

Request samples

Content type
application/json
{
  • "variableName": "string",
  • "type": "SHORT_TEXT",
  • "label": "string",
  • "configuration": { },
  • "showOnChatCreate": true,
  • "orderIndex": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "aiId": "string",
  • "variableName": "string",
  • "type": "SHORT_TEXT",
  • "label": "string",
  • "configuration": { },
  • "showOnChatCreate": true,
  • "orderIndex": 0
}

Update an AI user input

Updates a configured user input for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

userInputId
required
string

The identifier of the user input.

Request Body schema: application/json
required
variableName
required
string
type
required
string (AIUserInputType)
Enum: "SHORT_TEXT" "LONG_TEXT" "TEXT_CHOICE" "IMAGE_CHOICE" "DATE" "NUMBER" "PHONE_NUMBER" "FILE_UPLOAD" "DISPLAY" "ADDRESS"
label
required
string
configuration
required
object
showOnChatCreate
boolean
orderIndex
integer

Responses

Request samples

Content type
application/json
{
  • "variableName": "string",
  • "type": "SHORT_TEXT",
  • "label": "string",
  • "configuration": { },
  • "showOnChatCreate": true,
  • "orderIndex": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "aiId": "string",
  • "variableName": "string",
  • "type": "SHORT_TEXT",
  • "label": "string",
  • "configuration": { },
  • "showOnChatCreate": true,
  • "orderIndex": 0
}

Delete an AI user input

Deletes a configured user input from the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

userInputId
required
string

The identifier of the user input.

Responses

Reorder AI user inputs

Updates the order of configured user inputs for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
required
Array of objects (AIUserInputOrderItem)
Array
id
required
string
orderIndex
required
integer

Responses

Request samples

Content type
application/json
{
  • "inputs": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true
}

AI Embed

Get embedded client configuration

Retrieves the embedded client configuration for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "userId": "string",
  • "orgId": "string",
  • "aiId": "string",
  • "key": "string",
  • "data": {
    }
}

Update embedded client configuration

Updates the embedded client configuration for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Request Body schema: application/json
required
string or Array of strings
headerBackgroundColor
string
borderColor
string
shadowColor
string
iconColor
string
textColor
string
linkColor
string
aiMessageColor
string
humanMessageColor
string
buttonColor
string
buttonTextColor
string
borderRadius
integer
buttonImageUrl
string
buttonWidth
integer
buttonHeight
integer
buttonBackgroundColor
string
buttonBorderColor
string
buttonShadowColor
string
buttonBorderRadius
integer
buttonBorderWidth
integer
buttonPosition
string
buttonPositionX
integer
buttonPositionY
integer
backgroundColor
string
disableAutoFocus
boolean

Responses

Request samples

Content type
application/json
{
  • "hostUrl": "string",
  • "headerBackgroundColor": "string",
  • "borderColor": "string",
  • "shadowColor": "string",
  • "iconColor": "string",
  • "textColor": "string",
  • "linkColor": "string",
  • "aiMessageColor": "string",
  • "humanMessageColor": "string",
  • "buttonColor": "string",
  • "buttonTextColor": "string",
  • "borderRadius": 0,
  • "buttonImageUrl": "string",
  • "buttonWidth": 0,
  • "buttonHeight": 0,
  • "buttonBackgroundColor": "string",
  • "buttonBorderColor": "string",
  • "buttonShadowColor": "string",
  • "buttonBorderRadius": 0,
  • "buttonBorderWidth": 0,
  • "buttonPosition": "string",
  • "buttonPositionX": 0,
  • "buttonPositionY": 0,
  • "backgroundColor": "string",
  • "disableAutoFocus": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "userId": "string",
  • "orgId": "string",
  • "aiId": "string",
  • "key": "string",
  • "data": {
    }
}

Generate an embedded client key

Generates a new embedded client key for the AI.

Authorizations:
ApiKeyAuth
path Parameters
aiId
required
string

The identifier of the AI.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "userId": "string",
  • "orgId": "string",
  • "aiId": "string",
  • "key": "string",
  • "data": {
    }
}

Skills

List the caller's skills

Lists skills in the caller's own library.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Create a skill

Creates a skill in the caller's library. The skill is validated against the Agent Skills specification; a broken rule returns 400 with a message that names it.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 100 ] characters ^[a-z0-9_-]+$

Agent Skills name: lowercase letters, digits, and single hyphens, with no leading or trailing hyphen, at most 64 characters. Built-in skill names (docx, pdf, pptx, xlsx) are reserved. During the format rollout an old-style name (underscores, up to 100 characters) is accepted and normalized, for example my_skill becomes my-skill; the response carries the stored name.

description
required
string [ 1 .. 1024 ] characters

What the skill does and when to use it.

content
required
string [ 1 .. 50000 ] characters

Skill instructions. A leading YAML frontmatter block is parsed into the skill fields (request fields win) and removed.

surfaces
Array of strings or null
Enum: "chat" "agents" "app_builder"

Surfaces the skill is available on; null means all surfaces.

Array of objects <= 20 items

Bundled text files. A root SKILL.md is parsed into the skill fields and not stored as a file.

license
string or null <= 255 characters

Agent Skills license field.

compatibility
string or null [ 1 .. 500 ] characters

Agent Skills compatibility field: environment requirements.

object or null <= 20 properties

Agent Skills metadata: a map of string keys to string values.

allowedTools
string or null <= 1024 characters

Agent Skills allowed-tools field. Stored, not enforced.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "content": "string",
  • "surfaces": [
    ],
  • "files": [
    ],
  • "license": "string",
  • "compatibility": "string",
  • "metadata": {
    },
  • "allowedTools": "string"
}

Response samples

Content type
application/json
{
  • "userId": "string",
  • "orgId": "string",
  • "skillId": "string",
  • "enabled": true,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "skill": {
    },
  • "fileCount": 0
}

List the caller's skill rename notices

Lists the caller's skills that the Agent Skills name backfill renamed and that the caller did not acknowledge yet.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Acknowledge the caller's skill rename notices

Marks every unacknowledged skill rename notice of the caller as shown.

Authorizations:
ApiKeyAuth

Responses

Get a client upload token for a skill import

Vercel Blob client-upload handshake (@vercel/blob/client handleUpload). The pathname must be skill-imports/{userId}/<name> with a .zip, .md, .mdc, or .txt extension, and the upload is limited to 5 MB. Send the resulting blob URL to the import route.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
object

A HandleUploadBody from @vercel/blob/client.

Responses

Request samples

Content type
application/json
{ }

Preview a skill import for the caller's library

Reads a .zip that holds one skill folder (SKILL.md at the root, or exactly one top-level folder with SKILL.md), or one SKILL.md (.md, .mdc, or .txt), and returns a preview. The parse is lenient: YAML values with an unquoted colon are repaired, the name is normalized (falling back to the folder name, then the first heading), when_to_use is appended to the description when it fits, and other non-spec keys go to metadata. Archives with symlinks, absolute or .. paths, invalid skill file paths, case-variant duplicate paths, or more than 200 entries are rejected. Bundle files that are not UTF-8 text, longer than 65,536 characters, or past 20 files are dropped and listed. Save the skill through the create route. Save with POST /api/v1/me/skills.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
blobUrl
required
string <uri>

URL of the blob uploaded through POST /api/v1/me/skills/import/upload. It must be under skill-imports/{userId}/ of the caller. The blob is deleted after the read.

fileName
required
string <= 255 characters

Original file name. It is a name fallback and selects the document type.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "license": "string",
  • "compatibility": "string",
  • "metadata": {
    },
  • "allowedTools": "string",
  • "content": "string",
  • "files": [
    ],
  • "normalizations": [
    ],
  • "droppedFiles": [
    ],
  • "warnings": [
    ]
}

Preview a skill import (org admin)

Org-level SKILLS write only. Reads a .zip that holds one skill folder (SKILL.md at the root, or exactly one top-level folder with SKILL.md), or one SKILL.md (.md, .mdc, or .txt), and returns a preview. The parse is lenient: YAML values with an unquoted colon are repaired, the name is normalized (falling back to the folder name, then the first heading), when_to_use is appended to the description when it fits, and other non-spec keys go to metadata. Archives with symlinks, absolute or .. paths, invalid skill file paths, case-variant duplicate paths, or more than 200 entries are rejected. Bundle files that are not UTF-8 text, longer than 65,536 characters, or past 20 files are dropped and listed. Save the skill through the create route.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
blobUrl
required
string <uri>

URL of the blob uploaded through POST /api/v1/me/skills/import/upload. It must be under skill-imports/{userId}/ of the caller. The blob is deleted after the read.

fileName
required
string <= 255 characters

Original file name. It is a name fallback and selects the document type.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "license": "string",
  • "compatibility": "string",
  • "metadata": {
    },
  • "allowedTools": "string",
  • "content": "string",
  • "files": [
    ],
  • "normalizations": [
    ],
  • "droppedFiles": [
    ],
  • "warnings": [
    ]
}

Export a skill as a .zip

Exports a skill that the caller can read in the library. A platform-<name> id exports the enabled platform skill, with its LICENSE.txt.

Authorizations:
ApiKeyAuth
path Parameters
skillId
required
string

Responses

Export an org skill as a .zip (org admin)

Org-level SKILLS read only. Exports any skill in the caller's org.

Authorizations:
ApiKeyAuth
path Parameters
skillId
required
string

Responses

List organization skills

Lists enabled organization skills the caller can discover.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{ }

Organizations

Read effective org capabilities

Reads effective capability flags for the caller's organization.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{ }

List organizations the current user can open

Returns the organizations the signed-in user can open. Each row has an active local membership. The sign-in URL is the tenant host when one exists, and the request origin when it does not.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "organizations": [
    ]
}

Chats

Issue a live browser credential

Issues a short-lived live browser credential for a chat turn.

Authorizations:
ApiKeyAuth
path Parameters
chatId
required
string

The identifier of the chat.

query Parameters
responseId
required
string

The response id for the running turn.

cadence
string
Enum: "high" "low"

Frame cadence for the credential.

Responses

Response samples

Content type
application/json
{
  • "available": true,
  • "endpoint": "string",
  • "token": "string",
  • "expiresAt": "string",
  • "streamId": "string"
}

Secrets

List secrets

Lists secrets for the organization or a specific AI.

Authorizations:
ApiKeyAuth
query Parameters
aiId
string

Filter secrets by AI ID.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a secret

Creates a secret for the organization or a specific AI.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string
description
required
string
data
string
aiId
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "data": "string",
  • "aiId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "valueSource": "saved",
  • "vaultSecretId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update a secret

Updates an existing secret.

Authorizations:
ApiKeyAuth
path Parameters
secretId
required
string

The identifier of the secret.

Request Body schema: application/json
required
description
string
data
string
valueSource
string
Enum: "saved" "user-provided" "vault"

The chosen value source. 'user-provided' clears the stored value; 'saved' keeps it when 'data' is blank and replaces it when 'data' is set.

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "data": "string",
  • "valueSource": "saved"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "valueSource": "saved",
  • "vaultSecretId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a secret

Deletes the specified secret.

Authorizations:
ApiKeyAuth
path Parameters
secretId
required
string

The identifier of the secret.

Responses

Response samples

Content type
application/json
{
  • "success": true
}

AI Models

List AI models

Retrieves available AI models.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Categories

List tenant categories

Retrieves available tenant categories for AI assignment.

Authorizations:
ApiKeyAuth
query Parameters
orgId
string

Optional org ID for superusers.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Subscriptions

Get an organization subscription by public ID

Retrieves an organization subscription by its public subscription identifier. Callers must have organization, tenant, or instance-level read permission on organization subscriptions. When that requirement is met, the subscription is returned only if it exists and the caller is permitted to read that specific subscription; otherwise the API responds with 404 so clients cannot infer whether a given public ID exists.

Authorizations:
ApiKeyAuth
path Parameters
publicId
required
string non-empty

Public subscription identifier.

Responses

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "orgId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "type": "FREE",
  • "pricingPlan": "FREE",
  • "pricingPlanLabel": "string",
  • "maxUsers": 0,
  • "allowsMultipleUsers": true,
  • "maxFreeUsers": 0,
  • "allowsFreeUsers": true,
  • "userMembershipType": "FULL",
  • "status": "ACTIVE",
  • "periodEndDate": "2019-08-24T14:15:22Z",
  • "usageLimits": {
    },
  • "externalSubscriptionId": "string",
  • "externalCustomerId": "string",
  • "processorType": "STRIPE",
  • "metadata": {
    },
  • "cancelledAt": "2019-08-24T14:15:22Z",
  • "periodStartDate": "2019-08-24T14:15:22Z",
  • "balanceAllocationPerUser": "string",
  • "storageAllocationGb": 0,
  • "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}

Tool Templates

List organization tool templates

Retrieves tool templates available for the organization.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer

Maximum number of templates to return.

offset
integer

Offset for pagination.

Responses

Response samples

Content type
application/json
{
  • "orgToolTemplates": [
    ],
  • "total": 0
}

Get an organization tool template

Retrieves details for a specific organization tool template.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The template identifier.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "orgId": "string",
  • "name": "string",
  • "templateId": "string",
  • "isEnabled": true,
  • "isEnabledInChat": true,
  • "orgConfiguration": { },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "template": {
    }
}

Integrations

List Google Drive accounts

Retrieves Google Drive OAuth accounts for the current user. data.access_token is returned only to browser sessions, for the Google Picker. API key and OAuth2 callers get the accounts without data.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List OneDrive accounts

Retrieves OneDrive OAuth accounts for the current user.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Disconnect a OneDrive account

Deletes the specified OneDrive OAuth token.

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

The OAuth token ID.

Responses

Response samples

Content type
application/json
"string"

Search OneDrive content

Searches OneDrive files and folders.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
searchTerm
required
string
oauthTokenId
required
string

Responses

Request samples

Content type
application/json
{
  • "searchTerm": "string",
  • "oauthTokenId": "string"
}

Response samples

Content type
application/json
{ }

List OneDrive folder children

Retrieves child items for a OneDrive folder.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
id
required
string
oauthTokenId
required
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "oauthTokenId": "string"
}

Response samples

Content type
application/json
{ }

List SharePoint children

Retrieves child items for a SharePoint site.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
id
required
string
oauthTokenId
required
string

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "oauthTokenId": "string"
}

Response samples

Content type
application/json
{ }

List Confluence accounts

Retrieves Confluence OAuth accounts for the current user.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search Confluence content

Searches Confluence content for selection.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
searchTerm
required
string
oauthTokenId
required
string

Responses

Request samples

Content type
application/json
{
  • "searchTerm": "string",
  • "oauthTokenId": "string"
}

Response samples

Content type
application/json
{ }

List Jira accounts

Retrieves Jira OAuth accounts for the current user.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Search Jira projects

Searches Jira projects for selection.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
searchTerm
required
string
oauthTokenId
required
string

Responses

Request samples

Content type
application/json
{
  • "searchTerm": "string",
  • "oauthTokenId": "string"
}

Response samples

Content type
application/json
{ }

List GitHub accounts

Retrieves GitHub OAuth accounts for the current user.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List GitHub app installations

Retrieves GitHub app installations for the current user.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Search GitHub repositories

Searches GitHub repositories accessible to an installation.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
searchTerm
string
gitHubAppInstallationId
required
integer
limit
integer
cursor
string

Responses

Request samples

Content type
application/json
{
  • "searchTerm": "string",
  • "gitHubAppInstallationId": 0,
  • "limit": 0,
  • "cursor": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Preview GitHub repository

Previews repository content for selection.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
repo
required
string
gitHubAppInstallationId
required
string

Responses

Request samples

Content type
application/json
{
  • "repo": "string",
  • "gitHubAppInstallationId": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

User Settings

Get the caller's settings

Returns the caller's own settings. orgContextBudgetPercentages (the organization's normalized defaults, each 30 to 90) is answered to a browser session and to a token of the devsai-desktop client only. Every other caller gets the answer without it.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "memory": true,
  • "pinnedAgentIds": [
    ],
  • "advancedMode": true,
  • "camoufoxBrowserEngine": true,
  • "showGlobalHeader": true,
  • "agentStudioMode": "simple",
  • "homePage": "chat",
  • "userPromptConfig": { },
  • "notificationPreferences": { },
  • "locale": "string",
  • "contextBudgetPercentages": {
    },
  • "orgContextBudgetPercentages": {
    },
  • "seenAnnouncementIds": [
    ]
}

Update the caller's settings

Upserts the fields of the body that are present and returns the stored settings with status 201. The body does not accept orgContextBudgetPercentages: the field is ignored. orgContextBudgetPercentages (the organization's normalized defaults, each 30 to 90) is answered to a browser session and to a token of the devsai-desktop client only. Every other caller gets the answer without it.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
object

Any subset of the settings fields. Unknown fields, including orgContextBudgetPercentages, are ignored.

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "memory": true,
  • "pinnedAgentIds": [
    ],
  • "advancedMode": true,
  • "camoufoxBrowserEngine": true,
  • "showGlobalHeader": true,
  • "agentStudioMode": "simple",
  • "homePage": "chat",
  • "userPromptConfig": { },
  • "notificationPreferences": { },
  • "locale": "string",
  • "contextBudgetPercentages": {
    },
  • "orgContextBudgetPercentages": {
    },
  • "seenAnnouncementIds": [
    ]
}

List the Create menu items of the caller

Returns the Create items the member can use, in display order, and the page that opens the agent studio. items is empty when the sidebar_create_menu flag is off for the organization and for a guest. Each item follows the member's own permissions, not the token's scopes; for the desktop client, chat, routine and project also need the token to hold that write permission. Answered to a browser session and to a token of the devsai-desktop client only; every other caller gets 403. Not cached.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "agentPath": "/ai/new/simple"
}

Organization Administration

List service accounts

Lists active service accounts in the caller organization. The cursor is a public id. Requires ORG_SETTINGS WRITE or API_KEYS WRITE at organization level.

Authorizations:
ApiKeyAuth
query Parameters
limit
integer [ 1 .. 100 ]
Default: 50
cursor
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "pagination": {
    }
}

Create a service account

Creates a service account in the caller organization with tenant_owned false. The same active name returns 200 with alreadyExists true. A disabled name returns 409. More than 100 inserts in an hour for the caller returns 429.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
required
string [ 1 .. 200 ] characters
required
Array of objects or objects (ServiceAccountRole) [ 1 .. 50 ] items

One to fifty roles: a built-in role, or a custom role of the account organization.

description
string <= 2000 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "roles": [
    ],
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "alreadyExists": true
}

Get a service account

Returns one service account in the caller organization. A missing or deleted account returns 404.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Delete a service account

Deletes a service account the organization created. A tenant-owned account returns 403. A second delete returns 404.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string

Responses

Disable a service account

Disables a service account the organization created. A tenant-owned account returns 403. A second disable returns the same account.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}

Mint a service account API key

Returns the secret once. The key stores the account principal, an empty user id, and tenant_owned false. Requires API_KEYS WRITE at organization level. A tenant-owned account returns 403.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string
Request Body schema: application/json
required
name
required
string

Name of the API key.

scopes
required
Array of strings non-empty

Scopes to grant to the API key.

orgId
string

Optional organization ID to create the API key in. Defaults to the caller's organization. Tenant-scoped callers may use this to create keys for users in another organization within the same tenant. Required when tenantOwned is true.

userId
string

Optional user ID to create the API key for. Defaults to the caller. Required when tenantOwned is true.

tenantOwned
boolean
Default: false

When true, the key is tenant-owned: child-org admins cannot revoke, update, or reset it. Requires explicit orgId and userId, and an active tenant-owned membership for that user in that org. Omit or send false for unmanaged keys.

source
string
Default: "PLATFORM"
Enum: "PLATFORM" "ROUTER"

The type of key. PLATFORM is an ordinary key. ROUTER is a router key: its requests reach the model with only the caller's instructions and function tools, and it can call only the stateless model routes. ROUTER needs the router keys capability of the organization (403 otherwise). The type cannot change after creation.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "scopes": [
    ],
  • "orgId": "string",
  • "userId": "string",
  • "tenantOwned": false,
  • "source": "PLATFORM"
}

List service account API keys

Lists keys for the account. The secret is absent. A disabled account and a tenant-owned account are listed. Requires API_KEYS WRITE at organization level.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string

Responses

Revoke a service account API key

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string
apiKeyId
required
string

Responses

Rotate a service account API key

Replaces the secret of one live key and returns it once. The key keeps its id, name, and scopes. The previous secret stops working at once. Requires API_KEYS WRITE at organization level. A tenant-owned account returns 403. A revoked key is not found.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string
apiKeyId
required
string

Responses

Enable a service account

Enables a service account the organization created. A tenant-owned account returns 403. A second enable returns the same account.

Authorizations:
ApiKeyAuth
path Parameters
serviceAccountId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "description": "string",
  • "roles": [
    ],
  • "tenantOwned": true,
  • "status": "ACTIVE",
  • "createdAt": "2019-08-24T14:15:22Z"
}