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.
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.
| type required | string Value: "blob.generate-client-token" |
required | object |
{- "type": "blob.generate-client-token",
- "payload": {
- "pathname": "string",
- "clientPayload": "string",
- "multipart": false
}
}{- "type": "blob.generate-client-token",
- "clientToken": "string",
- "access": "public",
- "sessionCompleteRequired": false
}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.
| 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 ] |
{- "files": [
- {
- "slackFileId": "string",
- "mimetype": "string"
}
], - "teamId": "string",
- "channelId": "string",
- "ts": "string",
- "anchor": {
- "messageId": "string",
- "slackTs": "string"
}, - "text": "string",
- "skipped": [
- {
- "reason": "download_failed",
- "count": 1
}
], - "cardAction": {
- "responseId": "string",
- "buttonId": "string"
}, - "quoted": [
- {
- "source": "string",
- "incomplete": true,
- "text": "string"
}
], - "notices": [
- "string"
]
}{- "kind": "started",
- "responseId": "string",
- "chatId": "string",
- "messageId": "string",
- "assistant": {
- "name": "string",
- "avatarUrl": "string"
},
}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.
| responseId required | string^[A-Za-z0-9_-]{1,128}$ |
| callIds required | Array of strings non-empty unique [ items [ 1 .. 255 ] characters ] |
| decision required | string Enum: "allow_once" "always_allow" "deny" |
{- "callIds": [
- "string"
], - "decision": "allow_once"
}{- "kind": "continued",
- "responseId": "string"
}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.
| responseId required | string^[A-Za-z0-9_-]{1,128}$ |
| callIds required | string [ 1 .. 4000 ] characters Comma-separated call ids of the waiting step. |
{- "calls": [
- {
- "callId": "string",
- "name": "string",
- "connectorName": "string",
- "fields": [
- {
- "label": "string",
- "value": "string",
- "recipient": true
}
]
}
]
}Creates a new AI specified by the given identifier.
| 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. |
{- "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": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "voiceModelId": "string",
- "speakerVoiceId": "string",
- "personality": {
- "warmth": 100,
- "directness": 100,
- "humor": 100,
- "initiative": 100
}
}{- "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": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "userName": "string",
- "orgName": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "modelId": "string",
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "messageCount": 0,
- "rating": 0,
- "ratingCount": 0,
- "isShared": true,
- "hasUserChats": true,
- "isApprovedByOrg": true,
- "isPremiumModel": true,
- "isDeleted": true,
- "voiceModelId": "string",
- "speakerVoiceId": "string"
}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.
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. |
{- "bundle": {
- "version": "1.0",
- "exportedAt": "2019-08-24T14:15:22Z",
- "source": {
- "apiBaseUrl": "string",
- "orgId": "string"
}, - "agent": {
- "name": "string",
- "introduction": "string",
- "description": "string",
- "instructions": "string",
- "seed": "string",
- "src": "string",
- "modelId": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}
}, - "tools": [
- {
- "name": "string",
- "type": "API_FUNCTION",
- "data": { }
}
], - "userInputs": [
- {
- "variableName": "string",
- "type": "SHORT_TEXT",
- "label": "string",
- "configuration": { },
- "showOnChatCreate": true,
- "orderIndex": 0
}
], - "flows": [
- {
- "name": "string",
- "enabled": true,
- "versions": [
- {
- "version": 0,
- "active": true,
- "description": "string",
- "data": { }
}
]
}
], - "dataSources": [
- {
- "originalId": "string",
- "name": "string",
- "type": "API",
- "refreshPeriod": "NEVER",
- "data": { },
- "knowledgeItems": [
- {
- "name": "string",
- "type": "string",
- "uniqueId": "string",
- "blobUrl": "string",
- "filename": "string",
- "mimeType": "string"
}
]
}
], - "skills": [
- {
- "name": "string",
- "description": "string",
- "content": "string",
- "enabled": true
}
], - "requiredSecrets": [
- {
- "key": "string",
- "description": "string",
- "secretType": "apiKey"
}
]
}, - "name": "string",
- "secrets": {
- "property1": "string",
- "property2": "string"
}
}{- "aiId": "string",
- "warnings": [
- "string"
]
}Retrieves details of the AI specified by the given identifier.
| aiId required | string The identifier of the AI whose details are to be retrieved. |
{- "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": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "userName": "string",
- "orgName": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "modelId": "string",
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "messageCount": 0,
- "rating": 0,
- "ratingCount": 0,
- "isShared": true,
- "hasUserChats": true,
- "isApprovedByOrg": true,
- "isPremiumModel": true,
- "isDeleted": true,
- "voiceModelId": "string",
- "speakerVoiceId": "string",
- "personality": {
- "warmth": 100,
- "directness": 100,
- "humor": 100,
- "initiative": 100
}
}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.
| aiId required | string The identifier of the agent. |
| 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. |
{- "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": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "voiceModelId": "string",
- "speakerVoiceId": "string",
- "personality": {
- "warmth": 100,
- "directness": 100,
- "humor": 100,
- "initiative": 100
}
}{- "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": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "userName": "string",
- "orgName": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "modelId": "string",
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "messageCount": 0,
- "rating": 0,
- "ratingCount": 0,
- "isShared": true,
- "hasUserChats": true,
- "isApprovedByOrg": true,
- "isPremiumModel": true,
- "isDeleted": true,
- "voiceModelId": "string",
- "speakerVoiceId": "string"
}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.
| aiId required | string The identifier of the agent. |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| aiId required | string The identifier of the agent to export. |
| 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. |
{- "version": "1.0",
- "exportedAt": "2019-08-24T14:15:22Z",
- "source": {
- "apiBaseUrl": "string",
- "orgId": "string"
}, - "agent": {
- "name": "string",
- "introduction": "string",
- "description": "string",
- "instructions": "string",
- "seed": "string",
- "src": "string",
- "modelId": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "profile": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}
}, - "tools": [
- {
- "name": "string",
- "type": "API_FUNCTION",
- "data": { }
}
], - "userInputs": [
- {
- "variableName": "string",
- "type": "SHORT_TEXT",
- "label": "string",
- "configuration": { },
- "showOnChatCreate": true,
- "orderIndex": 0
}
], - "flows": [
- {
- "name": "string",
- "enabled": true,
- "versions": [
- {
- "version": 0,
- "active": true,
- "description": "string",
- "data": { }
}
]
}
], - "dataSources": [
- {
- "originalId": "string",
- "name": "string",
- "type": "API",
- "refreshPeriod": "NEVER",
- "data": { },
- "knowledgeItems": [
- {
- "name": "string",
- "type": "string",
- "uniqueId": "string",
- "blobUrl": "string",
- "filename": "string",
- "mimeType": "string"
}
]
}
], - "skills": [
- {
- "name": "string",
- "description": "string",
- "content": "string",
- "enabled": true
}
], - "requiredSecrets": [
- {
- "key": "string",
- "description": "string",
- "secretType": "apiKey"
}
]
}Generates an AI profile based on existing AI data.
| aiId required | string The identifier of the AI. |
{- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}| 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. |
[- {
- "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": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "userName": "string",
- "orgName": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "modelId": "string",
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "messageCount": 0,
- "rating": 0,
- "ratingCount": 0,
- "isShared": true,
- "hasUserChats": true,
- "isApprovedByOrg": true,
- "isPremiumModel": true,
- "isDeleted": true,
- "voiceModelId": "string",
- "speakerVoiceId": "string"
}
]| 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 |
{- "data": [
- {
- "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": {
- "headline": "string",
- "description": "string",
- "features": [
- {
- "title": "string",
- "description": "string"
}
], - "initialSuggestedActions": [
- {
- "label": "string",
- "message": "string",
- "icon": "string",
- "color": "string"
}
], - "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"
}, - "userName": "string",
- "orgName": "string",
- "visibility": "PRIVATE",
- "listInOrgCatalog": true,
- "listInPublicCatalog": true,
- "listInTenantCatalog": true,
- "chatLogsVisible": true,
- "generateCitations": true,
- "intermediateStepsVisible": true,
- "modelId": "string",
- "options": {
- "temperature": [
- 0
], - "topP": [
- 0
], - "topK": [
- 0
], - "maxTokens": [
- 0
], - "maxInputTokens": [
- 0
], - "frequencyPenalty": [
- 0
], - "presencePenalty": [
- 0
], - "reasoningEffort": "string",
- "reasoning": {
- "enabled": true,
- "parameters": {
- "property1": "string",
- "property2": "string"
}
}
}, - "groups": [
- "string"
], - "editors": [
- {
- "id": "string",
- "name": "string",
- "email": "string"
}
], - "publicCategories": [
- "ACCOUNTING_FINANCE"
], - "orgCategoryIds": [
- "string"
], - "messageCount": 0,
- "rating": 0,
- "ratingCount": 0,
- "isShared": true,
- "hasUserChats": true,
- "isApprovedByOrg": true,
- "isPremiumModel": true,
- "isDeleted": true,
- "voiceModelId": "string",
- "speakerVoiceId": "string"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
{- "aiId": "string",
- "name": "string",
- "avatar": "string",
- "personality": {
- "warmth": 100,
- "directness": 100,
- "humor": 100,
- "initiative": 100
}, - "modelId": "string",
- "voicePreset": {
- "modelId": "string",
- "speakerVoiceId": "string"
}, - "platformActionsEnabled": true,
- "faceEnabled": true,
- "autoSummonEnabled": true,
- "outfit": {
- "revision": 0,
- "worn": [
- {
- "id": "string",
- "name": "string",
- "slot": "head",
- "layer": "front",
- "tilt": -25,
- "opaque": true,
- "shapes": [
- {
- "type": "circle",
- "cx": -60,
- "cy": -60,
- "r": 0,
- "fill": "string",
- "stroke": "string",
- "strokeWidth": 0.5,
- "opacity": 0.05,
- "detail": true
}
]
}
], - "wardrobe": [
- {
- "id": "string",
- "name": "string",
- "slot": "head",
- "layer": "front",
- "tilt": -25,
- "opaque": true,
- "shapes": [
- {
- "type": "circle",
- "cx": -60,
- "cy": -60,
- "r": 0,
- "fill": "string",
- "stroke": "string",
- "strokeWidth": 0.5,
- "opacity": 0.05,
- "detail": true
}
]
}
]
}, - "characterLook": {
- "character": "relay",
- "dressCode": "signature",
- "palette": "original"
}, - "characterOptions": [
- "relay"
]
}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.
| name required | string [ 1 .. 200 ] characters New name, trimmed and not blank. |
{- "checkInExcludedSources": [
- "string"
]
}{- "aiId": "string",
- "name": "string",
- "avatar": "string",
- "personality": {
- "warmth": 100,
- "directness": 100,
- "humor": 100,
- "initiative": 100
}, - "modelId": "string",
- "voicePreset": {
- "modelId": "string",
- "speakerVoiceId": "string"
}, - "platformActionsEnabled": true,
- "faceEnabled": true,
- "autoSummonEnabled": true,
- "outfit": {
- "revision": 0,
- "worn": [
- {
- "id": "string",
- "name": "string",
- "slot": "head",
- "layer": "front",
- "tilt": -25,
- "opaque": true,
- "shapes": [
- {
- "type": "circle",
- "cx": -60,
- "cy": -60,
- "r": 0,
- "fill": "string",
- "stroke": "string",
- "strokeWidth": 0.5,
- "opacity": 0.05,
- "detail": true
}
]
}
], - "wardrobe": [
- {
- "id": "string",
- "name": "string",
- "slot": "head",
- "layer": "front",
- "tilt": -25,
- "opaque": true,
- "shapes": [
- {
- "type": "circle",
- "cx": -60,
- "cy": -60,
- "r": 0,
- "fill": "string",
- "stroke": "string",
- "strokeWidth": 0.5,
- "opacity": 0.05,
- "detail": true
}
]
}
]
}, - "characterLook": {
- "character": "relay",
- "dressCode": "signature",
- "palette": "original"
}, - "characterOptions": [
- "relay"
]
}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.
{- "available": true,
- "mailbox": {
- "address": "ari-k3j9x2m4pq@agents.devs.ai",
- "status": "provisioning"
}, - "domain": "agents.devs.ai",
- "suggestedLocalPart": "ari"
}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
| 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. |
{- "localPart": "string",
- "replaceAddress": "string"
}{- "available": true,
- "mailbox": {
- "address": "ari-k3j9x2m4pq@agents.devs.ai",
- "status": "provisioning"
}
}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.
| cursor | string Opaque cursor from the previous page. |
| limit | integer [ 1 .. 50 ] Default: 24 Page size. |
{- "data": [
- {
- "aiId": "string",
- "name": "string",
- "ownerName": "string",
- "src": "string",
- "description": "string",
- "callCount": 0,
- "lastCalledAt": "2019-08-24T14:15:22Z",
- "hiddenFromSearch": true
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| aiId required | string The agent id. |
| hiddenFromSearch required | boolean True hides the agent from the assistant's specialist search and agent listing. False shows it again. |
{- "hiddenFromSearch": true
}{- "aiId": "string",
- "hiddenFromSearch": true
}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.
| 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. |
{- "text": "string",
- "purpose": "draft"
}{- "query": "string",
- "agents": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "userName": "string",
- "src": "string",
- "familiar": true
}
], - "unavailable": true
}Retrieves a list of all chat sessions associated with the given AI identifier.
| aiId required | string The identifier of the AI whose chats are to be retrieved. |
{- "data": [
- {
- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}
]
}Creates a new chat session associated with the given AI identifier and returns the created chat session data.
| aiId required | string The identifier of the AI with which the chat session is to be associated. |
| name | string Optional name for the chat session. |
| source | string Chat source, for example |
| 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 |
| 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 |
{- "name": "string",
- "source": "string",
- "modelId": "string",
- "ephemeral": true,
- "parentChatId": "string",
- "workingAgentId": "string",
- "defaultAssistant": true,
- "clientCapabilities": [
- "string"
], - "integration_context": { },
- "clientContext": {
- "property1": "string",
- "property2": "string"
}
}{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}Retrieves the chat session with the specified ID.
| chatId required | string The unique identifier of the chat session to retrieve. |
| 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. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}Send a message to a chat session with an AI.
| chatId required | string The unique identifier of the chat session. |
| 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). |
{- "date": "2024-01-15T10:30:00Z",
- "prompt": "Hello, how are you?",
- "tools": [ ]
}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.
| chatId required | string The unique identifier of the chat session to archive. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}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).
| chatId required | string The unique identifier of the chat session. |
| projectId required | string [ 1 .. 32 ] characters The public id of the target project. |
{- "projectId": "string"
}{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "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": {
- "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"
}
}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.
| chatId required | string The unique identifier of the chat session. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "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": {
- "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"
}
}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.
| chatId required | string The unique identifier of the chat session to unarchive. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}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.
| chatId required | string The unique identifier of the chat session to set. |
| behaviour required | string Enum: "INHERIT" "ENABLED" "DISABLED" The chat's own auto-archive instruction. |
{- "behaviour": "INHERIT"
}{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}Creates a duplicate of the chat session with the specified ID.
| chatId required | string The unique identifier of the chat session to duplicate. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}Resets the chat session with the specified ID, clearing its current state or content.
| chatId required | string The unique identifier of the chat session to reset. |
{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}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.
| 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. |
{- "chat": {
- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "aiId": "string",
- "modelId": "string",
- "parentChatId": "string",
- "parentMessageId": "string",
- "defaultAssistant": true
}
}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.
| 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 |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| chatId required | string The parent chat: a top-level default-assistant chat of the caller. |
{- "sideThreads": [
- {
- "chatId": "string",
- "parentMessageId": "string",
- "replyCount": 0,
- "lastReplyMessageId": "string",
- "lastReplyAt": "2019-08-24T14:15:22Z"
}
]
}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.
| chatId required | string The unique identifier of the chat session. |
| 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) |
Example of submitting a user's name when the AI requests it.
{- "systemMessageId": "msg_abc123",
- "outputs": [
- {
- "toolCallId": "call_xyz789",
- "status": "success",
- "output": "John Doe"
}
]
}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.
| page | integer >= 0 Default: 0 The page number, from 0. |
| pinned | string Enum: "true" "false" Only pinned ( |
| 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 |
{- "data": [
- {
- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}
}
]
}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.
| q required | string The text to search for. It may be empty, which finds nothing unless |
| cursor | string Opaque cursor from |
| limit | integer [ 1 .. 100 ] The page size. Without |
| include_messages | string Default: "true" Enum: "true" "false" "1" "0" With |
| recent | string Default: "false" Enum: "true" "false" "1" "0" With |
| 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. |
{- "data": [
- {
- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "messages": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "content": "string",
- "role": "string"
}
]
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
{- "enabled": true,
- "retentionDays": 1
}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.
| 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 |
{- "enabled": true,
- "retentionDays": 1
}{- "enabled": true,
- "retentionDays": 1
}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.
| 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. |
| 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 |
| 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 |
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. |
{- "name": "string",
- "parentChatId": "string",
- "source": "UI",
- "modelId": "string",
- "ephemeral": true,
- "appId": "string",
- "projectId": "string",
- "workingAgentId": "string",
- "defaultAssistant": true,
- "clientCapabilities": [
- "string"
], - "integration_context": {
- "external_workspace_id": "string",
- "external_channel_id": "string",
- "external_thread_id": "string",
- "external_user_id": "string"
}
}{- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "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"
}Retrieves a list of data sources associated with the given AI identifier.
| aiId required | string The identifier of the AI whose data sources are to be retrieved. |
{- "data": [
- {
- "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
}
]
}Associates an existing data source with the specified AI.
| aiId required | string The unique identifier for the AI to which the data source is to be added. |
| dataSourceId required | string The unique identifier of the existing data source to be added. |
{- "dataSourceId": "string"
}{- "aiId": "string",
- "dataSourceId": "string"
}Adds a new API data source with a specified name and JSON payload for the given AI.
| aiId required | string The unique identifier for the AI. |
| name required | string Name of the data source. |
| data required | object The JSON payload to be used as the data source's knowledge. |
{- "name": "string",
- "data": { }
}{- "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
}| aiId required | string The unique identifier for the AI. |
| file | string <binary> |
{- "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
}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.
| aiId required | string The unique identifier for the AI. |
| property name* additional property | any |
{ }{- "type": "blob.generate-client-token",
- "clientToken": "string",
- "access": "public"
}Creates a web URL knowledge source and associates it with the AI.
| aiId required | string The unique identifier for the AI. |
| 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 |
{- "url": "string",
- "dataRefreshPeriod": "NEVER",
- "includeFiles": true,
- "includedFileTypes": [
- "TEXT"
], - "includeUrlGlobs": [
- "string"
], - "excludeUrlGlobs": [
- "string"
], - "maxPages": 0,
- "maxMemory": 0,
- "timeout": 0
}{- "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
}Creates Google Drive knowledge sources and associates them with the AI.
| aiId required | string The unique identifier for the AI. |
| oauthTokenId | string |
required | Array of objects (GoogleDriveFile) |
| dataRefreshPeriod | string (DataSourceRefreshPeriod) Enum: "NEVER" "DAILY" "WEEKLY" "MONTHLY" How frequently the data source should be refreshed. |
{- "oauthTokenId": "string",
- "files": [
- {
- "id": "string",
- "name": "string"
}
], - "dataRefreshPeriod": "NEVER"
}Creates a OneDrive knowledge source and associates it with the AI.
| aiId required | string The unique identifier for the AI. |
| 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. |
{- "oauthTokenId": "string",
- "fileId": "string",
- "filename": "string",
- "dataRefreshPeriod": "NEVER"
}Creates a Confluence knowledge source and associates it with the AI.
| aiId required | string The unique identifier for the AI. |
| 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 |
{- "oauthTokenId": "string",
- "pageId": "string",
- "pageName": "string",
- "contentType": "string",
- "spaceId": "string",
- "dataRefreshPeriod": "NEVER",
- "indexChildPages": true,
- "indexDriveFiles": true,
- "indexAttachments": true,
- "selectedDriveAccount": "string",
- "archive": true,
- "allSpaces": true
}{- "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
}Creates a Jira knowledge source and associates it with the AI.
| aiId required | string The unique identifier for the AI. |
| 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. |
{- "oauthTokenId": "string",
- "projectName": "string",
- "projectKey": "string",
- "dataRefreshPeriod": "NEVER"
}Creates a GitHub knowledge source and associates it with the AI.
| aiId required | string The unique identifier for the AI. |
| 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. |
{- "mode": "repos",
- "gitHubAppInstallationId": 0,
- "repos": [
- "string"
], - "dataRefreshPeriod": "NEVER"
}Bulk delete data sources by ID for the specified AI.
| aiId required | string The identifier of the AI. |
| dataSourceIds required | Array of strings |
{- "dataSourceIds": [
- "string"
]
}Retrieves a list of data sources associated which the user has access to.
| 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. |
{- "data": [
- {
- "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,
- "ais": [
- {
- "id": "string",
- "name": "string",
- "src": "string"
}
], - "ownerUser": {
- "id": "string",
- "email": "string",
- "name": "string"
}
}
], - "total": 0
}Updates properties for the specified data source.
| dataSourceId required | string The unique identifier of the data source to update. |
| 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 |
{- "refreshPeriod": "NEVER",
- "cite": true,
- "ais": [
- "string"
], - "orgVisible": true
}{- "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
}This endpoint refreshes the specified data source.
| dataSourceId required | string The unique identifier of the data source to be refreshed. |
| forceRefresh | boolean Indicates if the data source should be refreshed even if the content has not been updated |
Retrieves indexing statistics for the specified data source.
| dataSourceId required | string The unique identifier of the data source. |
{- "doneCount": 0,
- "failedCount": 0,
- "pendingCount": 0,
- "indexingCount": 0,
- "totalCount": 0
}Retrieves paginated knowledge items for the specified data source.
| dataSourceId required | string The unique identifier of the data source. |
| first | integer Number of items to return. |
| cursor | string Cursor for pagination. |
| page | integer Page number for pagination. |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "type": "API",
- "uniqueId": "string",
- "parentUniqueId": "string",
- "indexStatus": "INITIALIZED",
- "documentCount": 0,
- "tokenCount": 0,
- "originalContent": {
- "contentBlobUrl": "string",
- "filename": "string",
- "mimeType": "string",
- "isContentStoredExternally": true,
- "contentUrl": "string"
}, - "documentsBlobUrl": "string",
- "indexPercentage": "string",
- "metadata": { },
- "isBlobStorageDeleted": true,
- "cite": true,
- "rejection": {
- "reason": "OVERSIZED",
- "limitKind": "indexing-size",
- "sizeBytes": 0,
- "limitBytes": 0
}
}
], - "pagination": {
- "nextCursor": "string"
}
}Updates a knowledge item for the specified data source.
| dataSourceId required | string The unique identifier of the data source. |
| knowledgeId required | string The identifier of the knowledge item. |
| cite required | boolean |
{- "cite": true
}{- "id": "string",
- "name": "string",
- "type": "API",
- "uniqueId": "string",
- "parentUniqueId": "string",
- "indexStatus": "INITIALIZED",
- "documentCount": 0,
- "tokenCount": 0,
- "originalContent": {
- "contentBlobUrl": "string",
- "filename": "string",
- "mimeType": "string",
- "isContentStoredExternally": true,
- "contentUrl": "string"
}, - "documentsBlobUrl": "string",
- "indexPercentage": "string",
- "metadata": { },
- "isBlobStorageDeleted": true,
- "cite": true,
- "rejection": {
- "reason": "OVERSIZED",
- "limitKind": "indexing-size",
- "sizeBytes": 0,
- "limitBytes": 0
}
}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.
| 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. |
{- "name": "string",
- "scopes": [
- "string"
], - "orgId": "string",
- "userId": "string",
- "tenantOwned": false,
- "source": "PLATFORM"
}{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true,
- "key": "string"
}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.
| apiKeyId required | string Identifier of the API key. |
| name required | string non-empty |
| scopes required | Array of strings non-empty [ items non-empty ] |
{- "name": "string",
- "scopes": [
- "string"
]
}{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true
}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.
| apiKeyId required | string Identifier of the API key. |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| apiKeyId required | string Identifier of the API key. |
{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true,
- "key": "string"
}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.
[- {
- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true
}
]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.
| apiKeyId required | string Identifier of the API key. |
{- "success": true
}Creates a new group with the specified details.
| 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. |
{- "name": "string",
- "availability": "EVERYONE",
- "memberEmails": "string"
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE",
- "users": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "email": "string"
}
]
}Updates the details of a specific group and manages its member list.
| groupId required | string The unique identifier of the group to update. |
| 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. |
{- "name": "string",
- "availability": "EVERYONE",
- "memberEmailsToAdd": "string",
- "memberEmailsToRemove": [
- "string"
]
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE",
- "users": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "email": "string"
}
]
}Retrieves a list of groups associated with the current user.
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "ownerUserId": "string",
- "name": "string",
- "availability": "EVERYONE"
}
]Returns the usage metrics of the organization broken down by AI.
{- "orgUsage": {
- "orgId": "string",
- "dataTokensUsed": 0,
- "dataUsageTokenLimit": 0,
- "apiTokensUsed": 0,
- "apiUsageTokenLimit": 0
}, - "aiUsages": [
- {
- "aiId": "string",
- "aiDataTokensUsed": 0,
- "aiApiTokensUsed": 0
}
]
}Attaches a file to this chat so you can reference it by id in a later message.
Two modes:
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.
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.
| chatId required | string The unique identifier of the chat session. |
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. |
{- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "metadata": { }
}{- "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"
}Retrieves a list of all files associated with the specified chat session.
| chatId required | string The unique identifier of the chat session. |
{- "data": [
- {
- "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"
}
]
}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 typeChat 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.
| chatId required | string The unique identifier of the chat session. |
| type required | string Value: "blob.generate-client-token" |
required | object |
{- "type": "blob.generate-client-token",
- "payload": {
- "pathname": "string",
- "clientPayload": "string",
- "multipart": false
}
}{- "type": "blob.generate-client-token",
- "clientToken": "string",
- "access": "public"
}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.
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. |
{- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "metadata": { }
}{- "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"
}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.
| fileId required | string The unique identifier of the file. |
{- "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"
}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.
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 |
| 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: |
| 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. |
{- "messages": [
- {
- "role": "system",
- "content": "string",
- "tool_calls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "string"
}
}
], - "tool_call_id": "string"
}
], - "model": "string",
- "stream": false,
- "options": {
- "flow": {
- "override": {
- "force": true,
- "id": "string",
- "version": 0
}, - "tracing": {
- "enabled": true
}
}
}, - "tools": [
- {
- "type": "function",
- "function": {
- "name": "string",
- "description": "string",
- "parameters": { }
}
}
], - "generateCitations": true,
- "parallel_tool_calls": true,
- "stream_options": {
- "include_usage": true
}, - "max_tokens": 0,
- "max_completion_tokens": 0,
- "temperature": 2,
- "top_p": 1,
- "stop": "string",
- "tool_choice": null,
- "prompt_cache_key": "string"
}{- "choices": [
- {
- "index": 0,
- "message": {
- "role": "assistant",
- "content": "string"
}, - "finish_reason": "stop"
}
], - "chatId": "string"
}Deprecated: This endpoint is deprecated. Please use /api/v1/chat/completions instead, which follows the OpenAI API convention and provides the same functionality.
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 |
| 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: |
| 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. |
{- "messages": [
- {
- "role": "system",
- "content": "string",
- "tool_calls": [
- {
- "id": "string",
- "type": "function",
- "function": {
- "name": "string",
- "arguments": "string"
}
}
], - "tool_call_id": "string"
}
], - "model": "string",
- "stream": false,
- "options": {
- "flow": {
- "override": {
- "force": true,
- "id": "string",
- "version": 0
}, - "tracing": {
- "enabled": true
}
}
}, - "tools": [
- {
- "type": "function",
- "function": {
- "name": "string",
- "description": "string",
- "parameters": { }
}
}
], - "generateCitations": true,
- "parallel_tool_calls": true,
- "stream_options": {
- "include_usage": true
}, - "max_tokens": 0,
- "max_completion_tokens": 0,
- "temperature": 2,
- "top_p": 1,
- "stop": "string",
- "tool_choice": null,
- "prompt_cache_key": "string"
}{- "choices": [
- {
- "index": 0,
- "message": {
- "role": "assistant",
- "content": "string"
}, - "finish_reason": "stop"
}
], - "chatId": "string"
}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.
{- "object": "list",
- "data": [
- {
- "id": "string",
- "object": "model",
- "created": 0,
- "owned_by": "string"
}
]
}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.
| 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. |
| 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. |
{- "model": "text-embedding-3-small",
- "input": "The food was delicious and the waiter was friendly.",
- "encoding_format": "float"
}{- "object": "list",
- "data": [
- {
- "object": "embedding",
- "index": 0,
- "embedding": [
- 0
]
}
], - "model": "string",
- "usage": {
- "prompt_tokens": 0,
- "total_tokens": 0
}
}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.
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).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).sequence_number field.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.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:
previous_response_id or conversation is provided.
Signals a long-lived Temporal ThreadWorkflow that processes requests sequentially.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.
required | string or Array of InputItem (any) User prompt — plain text or an array of input items ( |
| model | string Model ID to use, like |
| 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 | |
| instructions | string or null System/developer instructions inserted as the first item in the model's context. When used with |
| stream | boolean Default: true If |
Array of any (ToolDefinition) Default: [] Tools the model may call while generating a response. See | |
| 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 |
| 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 |
| tool_choice | any How the model should select which tool(s) to use. Accepts the OpenAI |
| store | boolean Whether to store the generated response for later retrieval via the API. Default |
| truncation | any Truncation strategy for the model response. OpenAI accepts |
object Configuration options for a text response from the model, in OpenAI's shape. A | |
| service_tier | string Service tier to use for this request (e.g. |
| 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 |
| include | Array of strings Specify additional output data to include in the model response (e.g. |
| background | boolean If |
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: |
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.
| |
| 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 |
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 | |
| reload_thread_history | boolean [devs.ai extension] When |
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 |
{- "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": {
- "effort": "none",
- "summary": "auto",
- "generate_summary": "auto"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "parallel_tool_calls": true,
- "tool_choice": null,
- "store": true,
- "truncation": null,
- "text": {
- "format": {
- "type": "text"
}, - "verbosity": "low"
}, - "service_tier": "string",
- "user": "string",
- "include": [
- "string"
], - "background": true,
- "options": {
- "flow": {
- "override": {
- "force": true,
- "id": "string",
- "version": 0
}, - "tracing": {
- "enabled": true
}
}
}, - "chat_mode": "execute",
- "user_secrets": {
- "property1": "string",
- "property2": "string"
}, - "thread_mode": "collect",
- "self_hosted_agent": {
- "sessionId": "string"
}, - "computer": {
- "target": "cloud"
}, - "canvas_document_id": "string",
- "client_capabilities": [
- "string"
], - "user_location": {
- "lat": 0,
- "lng": 0
}, - "reload_thread_history": true,
- "integration_context": {
- "external_workspace_id": "string",
- "external_channel_id": "string",
- "external_thread_id": "string",
- "external_user_id": "string"
}
}Retrieve a response run by ID. Returns the full response object including output items, usage, and status.
| responseId required | string non-empty |
{- "id": "string",
- "object": "response",
- "status": "in_progress",
- "model": "string",
- "output": [
- {
- "id": "string",
- "type": "message",
- "role": "assistant",
- "status": "in_progress",
- "content": [
- {
- "type": "output_text",
- "text": "string",
- "annotations": [
- {
- "type": "url_citation",
- "url": "string",
- "title": "string",
- "start_index": 0,
- "end_index": 0
}
]
}
], - "phase": "commentary"
}
], - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0,
- "last_model_call": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}
}
}, - "error": {
- "code": "string",
- "message": "string"
}, - "created_at": 0,
- "instructions": "string",
- "temperature": 0,
- "top_p": 0,
- "max_output_tokens": 0,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "previous_response_id": "string",
- "parallel_tool_calls": true,
- "incomplete_details": {
- "reason": "max_output_tokens"
}, - "tool_choice": "string",
- "tools": [
- null
], - "text": { },
- "reasoning": { },
- "selection_metadata": { },
- "personal_credential_required": [
- {
- "type": "personal_credential_required",
- "toolId": "string",
- "toolName": "string",
- "connectorKey": "string",
- "reason": "service_principal"
}
], - "service_account_credential_required": [
- {
- "type": "service_account_credential_required",
- "toolId": "string",
- "toolName": "string",
- "connectorKey": "string",
- "reason": "missing_credential"
}
]
}[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.
| responseId required | string non-empty |
| streamChatId required | string non-empty [devs.ai extension] Must equal the path |
| lastSequence | integer >= -1 Default: -1 [devs.ai extension] Last |
| streamEpoch | string non-empty [devs.ai extension] Epoch from the create call's |
{- "error": "string"
}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.
| responseId required | string non-empty |
| reason | string |
| cancelPolicy | string (CancelPolicy) Default: "graceful" Enum: "graceful" "immediate" |
{- "reason": "string",
- "cancelPolicy": "graceful"
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}[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.
| responseId required | string non-empty |
{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}[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.
| responseId required | string non-empty |
| reason | string |
{- "reason": "string"
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}[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.
| responseId required | string non-empty |
| 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. |
{- "reason": "string",
- "toolOutputs": [
- {
- "toolCallId": "string",
- "status": "success",
- "output": "string"
}
], - "hookResumePayload": { },
- "tools": [
- {
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": { },
- "strict": true
}
]
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}[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.
| responseId required | string non-empty |
| subagentRunId required | string non-empty |
| approved | boolean |
| clarificationAnswer | string |
| goal | string |
| scope | string |
| deniedReason | string |
| reason | string |
{- "subagentRunId": "string",
- "approved": true,
- "clarificationAnswer": "string",
- "goal": "string",
- "scope": "string",
- "deniedReason": "string",
- "reason": "string"
}{- "id": "string",
- "object": "response.deep_research.resume",
- "status": "resume_requested",
- "subagentRunId": "string",
- "reason": "string"
}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.
required | string or Array of InputItem (any) User prompt — plain text or an array of input items ( |
| model | string Model ID to use, like |
| 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 | |
| instructions | string or null System/developer instructions inserted as the first item in the model's context. When used with |
| stream | boolean Default: true If |
Array of any (ToolDefinition) Default: [] Tools the model may call while generating a response. See | |
| 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 |
| 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 |
| tool_choice | any How the model should select which tool(s) to use. Accepts the OpenAI |
| store | boolean Whether to store the generated response for later retrieval via the API. Default |
| truncation | any Truncation strategy for the model response. OpenAI accepts |
object Configuration options for a text response from the model, in OpenAI's shape. A | |
| service_tier | string Service tier to use for this request (e.g. |
| 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 |
| include | Array of strings Specify additional output data to include in the model response (e.g. |
| background | boolean If |
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: |
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.
| |
| 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 |
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 | |
| reload_thread_history | boolean [devs.ai extension] When |
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 |
{- "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": {
- "effort": "none",
- "summary": "auto",
- "generate_summary": "auto"
}, - "metadata": {
- "property1": "string",
- "property2": "string"
}, - "parallel_tool_calls": true,
- "tool_choice": null,
- "store": true,
- "truncation": null,
- "text": {
- "format": {
- "type": "text"
}, - "verbosity": "low"
}, - "service_tier": "string",
- "user": "string",
- "include": [
- "string"
], - "background": true,
- "options": {
- "flow": {
- "override": {
- "force": true,
- "id": "string",
- "version": 0
}, - "tracing": {
- "enabled": true
}
}
}, - "chat_mode": "execute",
- "user_secrets": {
- "property1": "string",
- "property2": "string"
}, - "thread_mode": "collect",
- "self_hosted_agent": {
- "sessionId": "string"
}, - "computer": {
- "target": "cloud"
}, - "canvas_document_id": "string",
- "client_capabilities": [
- "string"
], - "user_location": {
- "lat": 0,
- "lng": 0
}, - "reload_thread_history": true,
- "integration_context": {
- "external_workspace_id": "string",
- "external_channel_id": "string",
- "external_thread_id": "string",
- "external_user_id": "string"
}
}Alias of GET /api/v2/responses/{responseId}.
| responseId required | string non-empty |
{- "id": "string",
- "object": "response",
- "status": "in_progress",
- "model": "string",
- "output": [
- {
- "id": "string",
- "type": "message",
- "role": "assistant",
- "status": "in_progress",
- "content": [
- {
- "type": "output_text",
- "text": "string",
- "annotations": [
- {
- "type": "url_citation",
- "url": "string",
- "title": "string",
- "start_index": 0,
- "end_index": 0
}
]
}
], - "phase": "commentary"
}
], - "usage": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}, - "total_tokens": 0,
- "last_model_call": {
- "input_tokens": 0,
- "input_tokens_details": {
- "cached_tokens": 0
}, - "output_tokens": 0,
- "output_tokens_details": {
- "reasoning_tokens": 0
}
}
}, - "error": {
- "code": "string",
- "message": "string"
}, - "created_at": 0,
- "instructions": "string",
- "temperature": 0,
- "top_p": 0,
- "max_output_tokens": 0,
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "previous_response_id": "string",
- "parallel_tool_calls": true,
- "incomplete_details": {
- "reason": "max_output_tokens"
}, - "tool_choice": "string",
- "tools": [
- null
], - "text": { },
- "reasoning": { },
- "selection_metadata": { },
- "personal_credential_required": [
- {
- "type": "personal_credential_required",
- "toolId": "string",
- "toolName": "string",
- "connectorKey": "string",
- "reason": "service_principal"
}
], - "service_account_credential_required": [
- {
- "type": "service_account_credential_required",
- "toolId": "string",
- "toolName": "string",
- "connectorKey": "string",
- "reason": "missing_credential"
}
]
}Alias of GET /api/v2/responses/{responseId}/stream. Same query parameters, including streamEpoch and lastSequence.
| responseId required | string non-empty |
| streamChatId required | string non-empty [devs.ai extension] Must equal the path |
| lastSequence | integer >= -1 Default: -1 [devs.ai extension] Honored only when |
| streamEpoch | string non-empty [devs.ai extension] Epoch from |
{- "error": "string"
}Alias of POST /api/v2/responses/{responseId}/cancel.
| responseId required | string non-empty |
| reason | string |
| cancelPolicy | string (CancelPolicy) Default: "graceful" Enum: "graceful" "immediate" |
{- "reason": "string",
- "cancelPolicy": "graceful"
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}Alias of POST /api/v2/responses/{responseId}/steer.
| responseId required | string non-empty |
{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}Alias of POST /api/v2/responses/{responseId}/pause.
| responseId required | string non-empty |
| reason | string |
{- "reason": "string"
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}Alias of POST /api/v2/responses/{responseId}/resume.
| responseId required | string non-empty |
| 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. |
{- "reason": "string",
- "toolOutputs": [
- {
- "toolCallId": "string",
- "status": "success",
- "output": "string"
}
], - "hookResumePayload": { },
- "tools": [
- {
- "type": "function",
- "name": "string",
- "description": "string",
- "parameters": { },
- "strict": true
}
]
}{- "id": "string",
- "object": "response.cancel",
- "status": "cancel_requested",
- "chatId": "string"
}Alias of POST /api/v2/responses/{responseId}/deep-research/resume.
| responseId required | string non-empty |
| subagentRunId required | string non-empty |
| approved | boolean |
| clarificationAnswer | string |
| goal | string |
| scope | string |
| deniedReason | string |
| reason | string |
{- "subagentRunId": "string",
- "approved": true,
- "clarificationAnswer": "string",
- "goal": "string",
- "scope": "string",
- "deniedReason": "string",
- "reason": "string"
}{- "id": "string",
- "object": "response.deep_research.resume",
- "status": "resume_requested",
- "subagentRunId": "string",
- "reason": "string"
}Sets a BLOCKED override for the specified child organization. Caller must be the tenant owner organization with org settings write access.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "orgId": "string",
- "mode": "BLOCKED"
}Returns effective rate limit mode and whether an explicit override exists for the organization.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "orgId": "string",
- "effectiveMode": "BLOCKED",
- "hasExplicitOverride": true
}Removes any explicit BLOCKED or UNLIMITED override so the tenant default applies.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "orgId": "string",
- "mode": "BLOCKED"
}Sets an UNLIMITED override for the specified child organization. Caller must be the tenant owner organization with org settings write access.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "orgId": "string",
- "mode": "BLOCKED"
}Updates the default rate limit mode for child organizations. Only the tenant owner organization may call this.
| mode required | string Enum: "SUBSCRIPTION_LIMITS" "UNLIMITED" Default rate limit mode for child organizations. SUBSCRIPTION_LIMITS applies subscription-based limits; UNLIMITED removes subscription caps. |
{- "mode": "SUBSCRIPTION_LIMITS"
}{- "mode": "SUBSCRIPTION_LIMITS"
}Paginated list of organizations with an explicit BLOCKED or UNLIMITED override. Only the tenant owner organization may call this.
| limit | integer [ 1 .. 100 ] Default: 20 Page size (1–100, default 20). |
| cursor | string non-empty Opaque cursor from a previous response pagination.nextCursor. |
{- "data": [
- {
- "orgId": "string",
- "mode": "BLOCKED"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
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.
| 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. |
{- "name": "string",
- "seedOrgName": true,
- "admin": {
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "externalId": "string",
- "membershipType": "FULL"
}, - "externalId": "string"
}{- "orgId": "string",
- "adminUserId": "string",
- "name": "string",
- "tenantPublicId": "string",
- "tenantName": "string",
- "seededOrgName": true
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "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": {
- "tokenLimits": {
- "standard": {
- "input": 0,
- "output": 0
}, - "premium": {
- "input": 0,
- "output": 0
}
}, - "dataUsageLimitInGb": 0,
- "mediaUsageTokenLimit": 0
}, - "externalSubscriptionId": "string",
- "externalCustomerId": "string",
- "processorType": "STRIPE",
- "metadata": {
- "trialEndDate": "2019-08-24T14:15:22Z",
- "promo": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z",
- "periodStartDate": "2019-08-24T14:15:22Z",
- "balanceAllocationPerUser": "string",
- "storageAllocationGb": 0,
- "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
| 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. |
{- "pricingPlan": "FREE",
- "maxUsers": 1,
- "externalSubscriptionId": "string",
- "externalCustomerId": "string",
- "allowsFreeUsers": true,
- "maxFreeUsers": 1,
- "metadata": {
- "trialEndDate": "2019-08-24T14:15:22Z",
- "promo": "string"
}
}{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
| 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. |
{- "pricingPlan": "FREE",
- "maxUsers": 1,
- "allowsFreeUsers": true,
- "maxFreeUsers": 1,
- "externalSubscriptionId": "string",
- "externalCustomerId": "string",
- "metadata": {
- "trialEndDate": "2019-08-24T14:15:22Z",
- "promo": "string"
}
}{- "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": {
- "tokenLimits": {
- "standard": {
- "input": 0,
- "output": 0
}, - "premium": {
- "input": 0,
- "output": 0
}
}, - "dataUsageLimitInGb": 0,
- "mediaUsageTokenLimit": 0
}, - "externalSubscriptionId": "string",
- "externalCustomerId": "string",
- "processorType": "STRIPE",
- "metadata": {
- "trialEndDate": "2019-08-24T14:15:22Z",
- "promo": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z",
- "periodStartDate": "2019-08-24T14:15:22Z",
- "balanceAllocationPerUser": "string",
- "storageAllocationGb": 0,
- "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
object Optional provenance metadata for the cancel workflow. | |||
| |||
{- "eventMetadata": { }
}{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}Returns current included and extra balances per balance type. Requires BILLING_BALANCES READ.
| orgId required | string Target organization ID (must belong to the tenant). |
[- {
- "balanceType": "CHAT",
- "includedBalance": "string",
- "extraBalance": "string"
}
]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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
| 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). |
{- "balanceType": "CHAT",
- "targetColumn": "INCLUDED",
- "amount": "string",
- "reason": "stringstri"
}{- "ledgerEntry": {
- "id": 0,
- "userId": "string",
- "balanceType": "CHAT",
- "entryType": "CONSUMPTION",
- "amount": "string",
- "initiatorType": "SYSTEM",
- "initiatedBy": "string",
- "reason": "string",
- "referenceType": "string",
- "referenceId": "string",
- "consumptionDetail": {
- "durationSeconds": 0
}, - "createdAt": "2019-08-24T14:15:22Z"
}, - "alreadyRecorded": true
}Paginated ledger entries for reconciliation. Requires BILLING_BALANCES READ.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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 |
{- "data": [
- {
- "id": 0,
- "userId": "string",
- "balanceType": "CHAT",
- "entryType": "CONSUMPTION",
- "amount": "string",
- "initiatorType": "SYSTEM",
- "initiatedBy": "string",
- "reason": "string",
- "referenceType": "string",
- "referenceId": "string",
- "consumptionDetail": {
- "durationSeconds": 0
}, - "createdAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "nextCursor": "string",
- "limit": 0
}
}Paginated invoices for the org subscription. Requires BILLING_INVOICES READ.
| orgId required | string Target organization ID (must belong to the tenant). |
| cursor | string non-empty |
| limit | integer [ 1 .. 100 ] Default: 20 |
{- "data": [
- {
- "id": "string",
- "number": "string",
- "description": "string",
- "status": "string",
- "currency": "string",
- "amountPaid": "string",
- "amountDue": "string",
- "hostedInvoiceUrl": "string",
- "invoicePdfUrl": "string",
- "periodStart": "2019-08-24T14:15:22Z",
- "periodEnd": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "paidAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "nextCursor": "string",
- "limit": 0
}
}Returns org-level monthly/daily allocation limits per balance type. Requires BILLING_ALLOCATIONS READ.
| orgId required | string Target organization ID (must belong to the tenant). |
[- {
- "balanceType": "CHAT",
- "monthlyLimit": "unlimited",
- "dailyLimit": "unlimited"
}
]Paginated member list for seat reconciliation. Requires ORG_SETTINGS READ.
| orgId required | string Target organization ID (must belong to the tenant). |
| limit | integer [ 1 .. 100 ] Default: 10 |
| offset | integer >= 0 Default: 0 |
{- "members": [
- {
- "userId": "string",
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "role": "ADMIN",
- "status": "member",
- "membershipType": "FULL",
- "createdAt": "2019-08-24T14:15:22Z",
- "externalUserId": "string",
- "tenantOwned": true
}
], - "totalCount": 0
}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.
| orgId required | string |
| limit | integer [ 1 .. 100 ] Default: 50 |
| cursor | string |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| orgId required | string |
| 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 |
{- "name": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "description": "string"
}{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z",
- "alreadyExists": true
}Returns one active service account. A missing, deleted, or other-organization id returns 404.
| orgId required | string |
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}Disables the service account. A second disable returns the same account.
| orgId required | string |
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}Returns the secret once. The key stores the account principal and an empty user id.
| orgId required | string |
| serviceAccountId required | string |
| 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. |
{- "name": "string",
- "scopes": [
- "string"
], - "orgId": "string",
- "userId": "string",
- "tenantOwned": false,
- "source": "PLATFORM"
}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.
| orgId required | string |
| serviceAccountId required | string |
| apiKeyId required | string |
Enables the service account. A second enable returns the same account.
| orgId required | string |
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}Paginated invitation list for reconciliation. Requires ORG_SETTINGS READ.
| orgId required | string Target organization ID (must belong to the tenant). |
| status | string Default: "pending" Enum: "pending" "accepted" "revoked" |
| limit | integer [ 1 .. 100 ] Default: 50 |
| offset | integer >= 0 Default: 0 |
{- "invitations": [
- {
- "id": "string",
- "emailAddress": "user@example.com",
- "role": "string",
- "status": "pending",
- "membershipType": "FULL",
- "createdAt": "2019-08-24T14:15:22Z",
- "tenantOwned": true
}
], - "totalCount": 0
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
{- "emailAddress": "user@example.com",
- "role": "ADMIN",
- "membershipType": "FULL",
- "tenantOwned": false
}{- "success": true
}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.
| orgId required | string Target child organization ID (must belong to the tenant). |
[- {
- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true
}
]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.
| orgId required | string Target child organization ID (must belong to the tenant). |
| apiKeyId required | string Identifier of the API key. |
| 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. |
{- "tenantOwned": true
}{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true
}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.
| orgId required | string Target child organization ID (must belong to the tenant). |
| apiKeyId required | string Identifier of the API key. |
| name required | string non-empty |
| scopes required | Array of strings non-empty [ items non-empty ] |
{- "name": "string",
- "scopes": [
- "string"
]
}{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true
}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.
| orgId required | string Target child organization ID (must belong to the tenant). |
| apiKeyId required | string Identifier of the 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.
| orgId required | string Target child organization ID (must belong to the tenant). |
| apiKeyId required | string Identifier of the API key. |
{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true,
- "key": "string"
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| userId required | string Target user ID. |
| 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. |
{- "role": "ADMIN",
- "membershipType": "FULL",
- "tenantOwned": true
}{- "success": true
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| userId required | string Target user ID. |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "orgId": "string",
- "name": "string",
- "imageUrl": "string"
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| 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. |
{- "orgId": "string",
- "name": "string",
- "imageUrl": "string"
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| orgId required | string Target organization ID (must belong to the tenant). |
| invitationId required | string Identifier of the invitation to revoke. |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}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.
| 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. |
{- "data": [
- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "orgId": "string",
- "name": "string",
- "description": "string",
- "permissions": [
- {
- "resourceType": "ai",
- "action": "read",
- "accessLevel": "instance"
}
], - "isSystem": true,
- "isDeleted": true,
- "deletedAt": "2019-08-24T14:15:22Z"
}
]
}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.
| 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. |
| 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. |
{- "name": "string",
- "description": "string",
- "permissions": [
- {
- "resourceType": "ai",
- "action": "read",
- "accessLevel": "instance"
}
]
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "orgId": "string",
- "name": "string",
- "description": "string",
- "permissions": [
- {
- "resourceType": "ai",
- "action": "read",
- "accessLevel": "instance"
}
], - "isSystem": true,
- "isDeleted": true,
- "deletedAt": "2019-08-24T14:15:22Z"
}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.
| roleId required | string Public identifier of the role, as returned in CustomRoleDto.id. |
| 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. |
| name | string [ 1 .. 50 ] characters |
| description | string <= 250 characters |
Array of objects (Permission) non-empty |
{- "name": "string",
- "description": "string",
- "permissions": [
- {
- "resourceType": "ai",
- "action": "read",
- "accessLevel": "instance"
}
]
}{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "orgId": "string",
- "name": "string",
- "description": "string",
- "permissions": [
- {
- "resourceType": "ai",
- "action": "read",
- "accessLevel": "instance"
}
], - "isSystem": true,
- "isDeleted": true,
- "deletedAt": "2019-08-24T14:15:22Z"
}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.
| roleId required | string Public identifier of the role, as returned in CustomRoleDto.id. |
| 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. |
{- "message": "string",
- "code": "string",
- "details": [
- {
- "path": "string",
- "message": "string",
- "code": "INVALID_TYPE"
}
]
}Returns the effective tenant UI configuration for the caller organization, including capabilities, policies, tool policies, chat interaction policies, white-label branding, and field provenance.
{- "capabilities": {
- "showDevsAiBranding": true,
- "showDocumentationLink": true,
- "showUpgradeLink": true,
- "showUserInviteLink": true,
- "showUserMobileAppLink": true,
- "showMobileAppAnnouncementBanner": true,
- "showIntegrationsLinks": true,
- "showAvatarImageGeneration": true
}, - "policies": {
- "toolPolicies": {
- "imageGeneration": {
- "mode": "allow"
}
}, - "chatInteractionPolicies": {
- "showSuggestedActions": true,
- "showInitialSuggestedActions": true,
- "agentIntroduction": true,
- "agentInputs": true,
- "inChatAuthentication": true,
- "userAttachments": true,
- "agentFlowsAndSubagents": true,
- "agentProfile": true,
- "agentDeploy": true,
- "selfHostedCliAgents": true
}
}, - "toolPolicies": {
- "imageGeneration": {
- "mode": "allow"
}
}, - "chatInteractionPolicies": {
- "showSuggestedActions": true,
- "showInitialSuggestedActions": true,
- "agentIntroduction": true,
- "agentInputs": true,
- "inChatAuthentication": true,
- "userAttachments": true,
- "agentFlowsAndSubagents": true,
- "agentProfile": true,
- "agentDeploy": true,
- "selfHostedCliAgents": true
}, - "whiteLabel": {
- "brandName": "string",
- "logoDark": "string",
- "logoLight": "string",
- "brandStyles": {
- "font": {
- "sans": "Inter",
- "serif": "Roboto Serif"
}, - "colors": {
- "primary": "string",
- "secondary": "string",
- "primaryButtonFont": "string",
- "secondaryButtonFont": "string",
- "loginScreenBackground": "string",
- "loginScreenText": "string"
}, - "authCopy": {
- "loginTitle": "string",
- "loginSubtitle": "string"
}, - "socialLinks": {
- "linkedIn": {
- "visible": true,
- "url": "string"
}, - "twitter": {
- "visible": true,
- "url": "string"
}, - "email": {
- "visible": true,
- "url": "string"
}
}, - "designLibrary": {
- "id": "tailwind",
- "customName": "string",
- "customInstructions": "string",
- "csbTemplateId": "string",
- "componentList": [
- "string"
], - "importPath": "string"
}, - "presentationTemplate": { }
}, - "appBrandingPrompt": "string",
- "docsSiteUrl": "string"
}, - "provenance": {
- "capabilities": {
- "property1": "tenant",
- "property2": "tenant"
}, - "policies": {
- "toolPolicies": {
- "imageGeneration": {
- "mode": "tenant"
}
}, - "chatInteractionPolicies": {
- "property1": "tenant",
- "property2": "tenant"
}
}, - "toolPolicies": {
- "imageGeneration": {
- "mode": "tenant"
}
}, - "chatInteractionPolicies": {
- "property1": "tenant",
- "property2": "tenant"
}, - "whiteLabel": {
- "brandName": "tenant",
- "logoDark": "tenant",
- "logoLight": "tenant",
- "brandStyles": { },
- "appBrandingPrompt": "tenant",
- "docsSiteUrl": "tenant"
}
}
}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.
| 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. |
{- "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": {
- "restrictAvailableModels": true,
- "defaultModel": "string",
- "defaultImageModel": "string",
- "models": [
- "string"
], - "featureModels": {
- "property1": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}, - "property2": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}
}, - "modelAudienceExclusions": {
- "property1": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}, - "property2": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}
}, - "modelAudienceInclusions": {
- "property1": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}, - "property2": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}
}, - "visibilityOverrides": [
- "string"
]
}, - "logoDark": "string",
- "logoLight": "string",
- "orgName": "string",
- "brandStyles": {
- "font": {
- "sans": "Inter",
- "serif": "Roboto Serif"
}, - "colors": {
- "primary": "string",
- "secondary": "string",
- "primaryButtonFont": "string",
- "secondaryButtonFont": "string",
- "loginScreenBackground": "string",
- "loginScreenText": "string"
}, - "authCopy": {
- "loginTitle": "string",
- "loginSubtitle": "string"
}, - "socialLinks": {
- "linkedIn": {
- "visible": true,
- "url": "string"
}, - "twitter": {
- "visible": true,
- "url": "string"
}, - "email": {
- "visible": true,
- "url": "string"
}
}, - "designLibrary": {
- "id": "tailwind",
- "customName": "string",
- "customInstructions": "string",
- "csbTemplateId": "string",
- "componentList": [
- "string"
], - "importPath": "string"
}, - "presentationTemplate": { }
}, - "appBrandingPrompt": "string",
- "docsSiteUrl": "string",
- "showDevsAiBranding": true,
- "showDocumentationLink": true,
- "showUpgradeLink": true,
- "showUserInviteLink": true,
- "showUserMobileAppLink": true,
- "showMobileAppAnnouncementBanner": true,
- "showIntegrationsLinks": true,
- "showAvatarImageGeneration": true,
- "toolPolicies": {
- "imageGeneration": {
- "mode": "allow"
}
}, - "integrationPolicies": {
- "github": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "netlify": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "vercel": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "supabase": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "allowedRegions": [
- "string"
], - "allowedPlans": [
- "string"
], - "maxProjectsPerUser": 0,
- "inactiveProjectCleanup": {
- "enabled": true,
- "inactiveDays": 90,
- "acknowledged": true,
- "acknowledgement": {
- "userId": "string",
- "acknowledgedAt": "2019-08-24T14:15:22Z"
}
}
}, - "deployRiskAssessment": {
- "enabled": true,
- "staticBypassEnabled": true,
- "applyToTargets": "preview",
- "agentBypassMode": "explain_only",
- "overrideAgentId": "string",
- "staticDefinition": {
- "allowApiRoutes": true,
- "allowServerSideCode": true,
- "allowDatabase": true,
- "allowLinkedAgents": true,
- "allowExternalNetworkCalls": true,
- "allowAuthOrPayments": true,
- "maxFileCount": 1
}
}, - "appDuplicate": {
- "allowPublicCrossOrg": true
}, - "marketplaceConnect": {
- "landingRequirement": "deploy"
}, - "assistantPurchases": {
- "enabled": true,
- "maxPurchaseAmountCents": 100,
- "monthlyMemberLimitCents": 100,
- "allowedMerchantDomains": [
- "string"
]
}
}, - "timezone": "string",
- "locale": "en",
- "contextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "networkCatalogTenantEnabled": true,
- "defaultListInOrgCatalog": true,
- "orgPrompt": "string",
- "orgPromptConfig": {
- "agent": {
- "enabled": true,
- "prompt": "string"
}, - "agentless": {
- "enabled": true,
- "prompt": "string"
}
}, - "sanitizationPolicy": {
- "enabled": true,
- "defaultAction": "ALLOW",
- "minScore": 1,
- "rules": [
- {
- "entityType": "EMAIL_ADDRESS",
- "minConfidence": 1,
- "action": "ALLOW"
}
], - "allowList": [
- "string"
], - "exemptions": {
- "userIds": [
- "string"
], - "groupIds": [
- "string"
], - "orgUnitIds": [
- "string"
]
}
}, - "tenantOwnerOrgId": "string",
- "tenantId": 0,
- "tenantName": "string",
- "isTenantOwner": true,
- "childOrganizations": [
- {
- "orgId": "string",
- "name": "string"
}
]
}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.
| 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. |
{- "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": {
- "restrictAvailableModels": true,
- "defaultModel": "string",
- "defaultImageModel": "string",
- "models": [
- "string"
], - "featureModels": {
- "property1": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}, - "property2": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}
}, - "modelAudienceExclusions": {
- "property1": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}, - "property2": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}
}, - "modelAudienceInclusions": {
- "property1": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}, - "property2": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}
}, - "visibilityOverrides": [
- "string"
]
}, - "logoDark": "string",
- "logoLight": "string",
- "orgName": "string",
- "brandStyles": {
- "font": {
- "sans": "Inter",
- "serif": "Roboto Serif"
}, - "colors": {
- "primary": "string",
- "secondary": "string",
- "primaryButtonFont": "string",
- "secondaryButtonFont": "string",
- "loginScreenBackground": "string",
- "loginScreenText": "string"
}, - "authCopy": {
- "loginTitle": "string",
- "loginSubtitle": "string"
}, - "socialLinks": {
- "linkedIn": {
- "visible": true,
- "url": "string"
}, - "twitter": {
- "visible": true,
- "url": "string"
}, - "email": {
- "visible": true,
- "url": "string"
}
}, - "designLibrary": {
- "id": "tailwind",
- "customName": "string",
- "customInstructions": "string",
- "csbTemplateId": "string",
- "componentList": [
- "string"
], - "importPath": "string"
}, - "presentationTemplate": { }
}, - "appBrandingPrompt": "string",
- "docsSiteUrl": "string",
- "showDevsAiBranding": true,
- "showDocumentationLink": true,
- "showUpgradeLink": true,
- "showUserInviteLink": true,
- "showUserMobileAppLink": true,
- "showMobileAppAnnouncementBanner": true,
- "showIntegrationsLinks": true,
- "showAvatarImageGeneration": true,
- "toolPolicies": {
- "imageGeneration": {
- "mode": "allow"
}
}, - "integrationPolicies": {
- "github": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "netlify": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "vercel": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "supabase": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "allowedRegions": [
- "string"
], - "allowedPlans": [
- "string"
], - "maxProjectsPerUser": 0,
- "inactiveProjectCleanup": {
- "enabled": true,
- "inactiveDays": 90,
- "acknowledged": true,
- "acknowledgement": {
- "userId": "string",
- "acknowledgedAt": "2019-08-24T14:15:22Z"
}
}
}, - "deployRiskAssessment": {
- "enabled": true,
- "staticBypassEnabled": true,
- "applyToTargets": "preview",
- "agentBypassMode": "explain_only",
- "overrideAgentId": "string",
- "staticDefinition": {
- "allowApiRoutes": true,
- "allowServerSideCode": true,
- "allowDatabase": true,
- "allowLinkedAgents": true,
- "allowExternalNetworkCalls": true,
- "allowAuthOrPayments": true,
- "maxFileCount": 1
}
}, - "appDuplicate": {
- "allowPublicCrossOrg": true
}, - "marketplaceConnect": {
- "landingRequirement": "deploy"
}, - "assistantPurchases": {
- "enabled": true,
- "maxPurchaseAmountCents": 100,
- "monthlyMemberLimitCents": 100,
- "allowedMerchantDomains": [
- "string"
]
}
}, - "timezone": "string",
- "locale": "en",
- "contextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "orgPromptConfig": {
- "agent": {
- "enabled": true,
- "prompt": "string"
}, - "agentless": {
- "enabled": true,
- "prompt": "string"
}
}, - "orgPrompt": "string",
- "showChatImageGeneration": true,
- "tenantOwnerOrgId": "string",
- "tenantId": 0,
- "tenantName": "string",
- "isTenantOwner": true,
- "childOrganizations": [
- {
- "orgId": "string",
- "name": "string"
}
], - "sanitizationPolicy": {
- "enabled": true,
- "defaultAction": "ALLOW",
- "minScore": 1,
- "rules": [
- {
- "entityType": "EMAIL_ADDRESS",
- "minConfidence": 1,
- "action": "ALLOW"
}
], - "allowList": [
- "string"
], - "exemptions": {
- "userIds": [
- "string"
], - "groupIds": [
- "string"
], - "orgUnitIds": [
- "string"
]
}
}
}{- "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": {
- "restrictAvailableModels": true,
- "defaultModel": "string",
- "defaultImageModel": "string",
- "models": [
- "string"
], - "featureModels": {
- "property1": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}, - "property2": {
- "chat": true,
- "appBuilder": true,
- "agents": true,
- "routines": true,
- "property1": true,
- "property2": true
}
}, - "modelAudienceExclusions": {
- "property1": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}, - "property2": {
- "excludedGroupIds": [
- "string"
], - "excludedUserIds": [
- "string"
]
}
}, - "modelAudienceInclusions": {
- "property1": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}, - "property2": {
- "includedGroupIds": [
- "string"
], - "includedUserIds": [
- "string"
]
}
}, - "visibilityOverrides": [
- "string"
]
}, - "logoDark": "string",
- "logoLight": "string",
- "orgName": "string",
- "brandStyles": {
- "font": {
- "sans": "Inter",
- "serif": "Roboto Serif"
}, - "colors": {
- "primary": "string",
- "secondary": "string",
- "primaryButtonFont": "string",
- "secondaryButtonFont": "string",
- "loginScreenBackground": "string",
- "loginScreenText": "string"
}, - "authCopy": {
- "loginTitle": "string",
- "loginSubtitle": "string"
}, - "socialLinks": {
- "linkedIn": {
- "visible": true,
- "url": "string"
}, - "twitter": {
- "visible": true,
- "url": "string"
}, - "email": {
- "visible": true,
- "url": "string"
}
}, - "designLibrary": {
- "id": "tailwind",
- "customName": "string",
- "customInstructions": "string",
- "csbTemplateId": "string",
- "componentList": [
- "string"
], - "importPath": "string"
}, - "presentationTemplate": { }
}, - "appBrandingPrompt": "string",
- "docsSiteUrl": "string",
- "showDevsAiBranding": true,
- "showDocumentationLink": true,
- "showUpgradeLink": true,
- "showUserInviteLink": true,
- "showUserMobileAppLink": true,
- "showMobileAppAnnouncementBanner": true,
- "showIntegrationsLinks": true,
- "showAvatarImageGeneration": true,
- "toolPolicies": {
- "imageGeneration": {
- "mode": "allow"
}
}, - "integrationPolicies": {
- "github": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "netlify": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "vercel": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "deployApproval": {
- "mode": "none",
- "frequency": "every_time",
- "requestFormUrl": "string"
}
}, - "supabase": {
- "enabled": true,
- "allowedIdentifiers": [
- "string"
], - "allowedRegions": [
- "string"
], - "allowedPlans": [
- "string"
], - "maxProjectsPerUser": 0,
- "inactiveProjectCleanup": {
- "enabled": true,
- "inactiveDays": 90,
- "acknowledged": true,
- "acknowledgement": {
- "userId": "string",
- "acknowledgedAt": "2019-08-24T14:15:22Z"
}
}
}, - "deployRiskAssessment": {
- "enabled": true,
- "staticBypassEnabled": true,
- "applyToTargets": "preview",
- "agentBypassMode": "explain_only",
- "overrideAgentId": "string",
- "staticDefinition": {
- "allowApiRoutes": true,
- "allowServerSideCode": true,
- "allowDatabase": true,
- "allowLinkedAgents": true,
- "allowExternalNetworkCalls": true,
- "allowAuthOrPayments": true,
- "maxFileCount": 1
}
}, - "appDuplicate": {
- "allowPublicCrossOrg": true
}, - "marketplaceConnect": {
- "landingRequirement": "deploy"
}, - "assistantPurchases": {
- "enabled": true,
- "maxPurchaseAmountCents": 100,
- "monthlyMemberLimitCents": 100,
- "allowedMerchantDomains": [
- "string"
]
}
}, - "timezone": "string",
- "locale": "en",
- "contextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "networkCatalogTenantEnabled": true,
- "defaultListInOrgCatalog": true,
- "orgPrompt": "string",
- "orgPromptConfig": {
- "agent": {
- "enabled": true,
- "prompt": "string"
}, - "agentless": {
- "enabled": true,
- "prompt": "string"
}
}, - "sanitizationPolicy": {
- "enabled": true,
- "defaultAction": "ALLOW",
- "minScore": 1,
- "rules": [
- {
- "entityType": "EMAIL_ADDRESS",
- "minConfidence": 1,
- "action": "ALLOW"
}
], - "allowList": [
- "string"
], - "exemptions": {
- "userIds": [
- "string"
], - "groupIds": [
- "string"
], - "orgUnitIds": [
- "string"
]
}
}, - "tenantOwnerOrgId": "string",
- "tenantId": 0,
- "tenantName": "string",
- "isTenantOwner": true,
- "childOrganizations": [
- {
- "orgId": "string",
- "name": "string"
}
]
}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.
| orgId required | string ID of the organization whose visibility overrides are read or saved. |
{- "orgId": "string",
- "models": [
- {
- "id": "string",
- "name": "string",
- "hasVisibilityOverride": true
}
]
}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.
| orgId required | string ID of the organization whose visibility overrides are read or saved. |
| 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. |
{- "modelIds": [
- "string"
]
}{- "orgId": "string",
- "models": [
- {
- "id": "string",
- "name": "string",
- "hasVisibilityOverride": true
}
]
}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.
| 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. |
{- "members": [
- {
- "userId": "string",
- "email": "user@example.com",
- "firstName": "string",
- "lastName": "string",
- "membershipType": "FULL",
- "isClerkAdmin": true,
- "joinedAt": "2019-08-24T14:15:22Z",
- "lastLoginAt": "2019-08-24T14:15:22Z",
- "lastActiveAt": "2019-08-24T14:15:22Z",
- "externalUserId": "string",
- "imageUrl": "string",
- "roles": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "isSystem": true
}
], - "tenantOwned": true
}
], - "totalCount": 0,
- "pagination": {
- "nextCursor": "string"
}, - "roles": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "isSystem": true
}
], - "invitations": [
- {
- "id": "string",
- "emailAddress": "user@example.com",
- "membershipType": "FULL",
- "customRoleIds": [
- "string"
], - "invitedByEmail": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "tenantOwned": true
}
], - "seatUsage": {
- "processorType": "STRIPE",
- "allowsFreeUsers": true,
- "isFreeMultiUserPlan": true,
- "paidSeatsUsed": 0,
- "paidSeatsMax": 0,
- "paidSeatsPending": 0,
- "freeSeatsUsed": 0,
- "freeSeatsMax": 0,
- "freeSeatsPending": 0,
- "pendingCountsApproximate": true
}
}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.
| 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. |
{- "emails": [
- "user@example.com"
], - "membershipType": "FULL",
- "customRoleIds": [
- "string"
], - "orgId": "string"
}{- "success": true,
- "invitedCount": 0
}Create, read, update, and delete conversation resources used as the conversation field on the Responses API.
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.
object or null String key-value pairs. Null clears stored conversation metadata. | |||
| |||
{- "metadata": {
- "property1": "string",
- "property2": "string"
}
}{- "id": "string",
- "object": "conversation",
- "created_at": 0,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}Replaces conversation metadata. This is POST, matching the OpenAI Conversations update method.
| conversationId required | string non-empty |
object or null String key-value pairs. Null clears stored conversation metadata. | |||
| |||
{- "metadata": {
- "property1": "string",
- "property2": "string"
}
}{- "id": "string",
- "object": "conversation",
- "created_at": 0,
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}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.
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.
| 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. |
{- "name": "string",
- "state": "string"
}{- "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": [
- "string"
], - "source": "PLATFORM",
- "tenantOwned": true,
- "key": "string",
- "orgName": "string",
- "state": "string"
}Creates a project owned by the caller and answers it. Requires projects.write.self.
| 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. |
{- "name": "string",
- "description": "string",
- "instructions": "string",
- "defaultModelId": "default"
}{- "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"
}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.
| 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 |
| 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. |
{- "data": [
- {
- "project": {
- "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"
}, - "members": [
- {
- "user": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}, - "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "tags": [
- "string"
], - "chatCount": 0,
- "lastActive": "2019-08-24T14:15:22Z",
- "allowedActions": [
- "start_chat"
]
}
], - "pagination": {
- "nextCursor": "string"
}
}One page of short project rows for a picker: id, name and description only. Requires projects.read.self.
| 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 ] |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| id required | string non-empty Public id of the project. |
{- "project": {
- "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"
}, - "allowedActions": [
- "start_chat"
]
}Updates the project settings and answers the saved project. Requires projects.write.self and the project owner, an org admin or a superuser.
| id required | string non-empty Public id of the project. |
| name | string [ 1 .. 100 ] characters |
| description | string or null <= 300 characters |
| instructions | string or null <= 4000 characters |
| defaultModelId | string |
{- "name": "string",
- "description": "string",
- "instructions": "string",
- "defaultModelId": "string"
}{- "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"
}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.
| id required | string non-empty Public id of the project. |
Archives the project and answers it. Requires projects.write.self and the project owner, an org admin or a superuser.
| id required | string non-empty Public id of the project. |
{- "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"
}Unarchives an archived project and answers it. Requires projects.write.self and the project owner, an org admin or a superuser.
| id required | string non-empty Public id of the project. |
{- "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"
}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.
| id required | string non-empty Public id of the project. |
| limit | integer [ 1 .. 50 ] Page size. |
| cursor | string Opaque cursor from |
| filter | string Default: "all" Enum: "all" "my"
|
{- "data": [
- {
- "chat": {
- "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": {
- "id": "string",
- "name": "string",
- "src": "string",
- "description": "string",
- "userId": "string",
- "userName": "string"
}, - "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"
}, - "user": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}
}
], - "pagination": {
- "nextCursor": "string"
}
}Answers every membership of the project, including the owner's synthesized row and pending invitations. Requires projects.read.self.
| id required | string non-empty Public id of the project. |
{- "data": [
- {
- "user": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}, - "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}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.
| id required | string non-empty Public id of the project. |
| userId required | string non-empty Person to invite. The invitation starts as |
{- "userId": "string"
}{- "user": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}, - "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}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.
| id required | string non-empty Public id of the project. |
| 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 |
{- "data": [
- {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| id required | string non-empty Public id of the project. |
| userId required | string non-empty User id of the project member the operation targets. |
Moves the caller's own PENDING membership to ACCEPTED and answers it. A caller may accept only their own membership. Requires projects.write.self.
| id required | string non-empty Public id of the project. |
| userId required | string non-empty User id of the project member the operation targets. |
{- "user": {
- "id": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "imageUrl": "string"
}, - "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}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.
| id required | string non-empty Public id of the project. |
| userId required | string non-empty User id of the project member the operation targets. |
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.
| id required | string non-empty Public id of the project. |
{- "data": [
- {
- "status": "PENDING",
- "file": {
- "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"
}, - "tokenCount": 0
}
]
}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.
| id required | string non-empty Public id of the project. |
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. |
{- "filename": "string",
- "size": 0,
- "mimeType": "string",
- "metadata": { }
}{- "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"
}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.
| id required | string non-empty Public id of the project. |
| type required | string Value: "blob.generate-client-token" |
required | object |
{- "type": "blob.generate-client-token",
- "payload": {
- "pathname": "string",
- "clientPayload": "string",
- "multipart": false
}
}{- "type": "blob.generate-client-token",
- "clientToken": "string",
- "access": "public",
- "sessionCompleteRequired": true
}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.
| id required | string non-empty Public id of the project. |
| fileId required | string non-empty Id of the file within the project. |
| download | string Its presence, whatever the value, streams the stored bytes as an attachment instead of the indexed text. |
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.
| id required | string non-empty Public id of the project. |
| fileId required | string non-empty Id of the file within the project. |
The minimum supported version and the download links of client apps, read with no sign-in
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.
| application required | string [ 1 .. 64 ] characters ^[a-z0-9]+(?:-[a-z0-9]+)*$ The client app, such as |
{- "minimumVersion": "1.3.0",
- "downloads": {
}
}Retrieves all tools associated with the specified AI.
| aiId required | string The identifier of the AI. |
[- {
- "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": { }
}
]Creates a new tool and associates it with the specified AI.
| aiId required | string The identifier of the AI. |
| 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) |
{- "apiUrl": "string",
- "schema": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "compressionEnabled": true,
- "compressionConfiguration": {
- "compressionModel": "string",
- "compressionThreshold": 0,
- "compressionChunkSize": 0
}
}{- "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": { }
}Retrieves details for a specific tool associated with the AI.
| aiId required | string The identifier of the AI. |
| toolId required | string The identifier of the tool. |
{- "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": { }
}Updates supported tool types (e.g., spreadsheet, web search).
| aiId required | string The identifier of the AI. |
| toolId required | string The identifier of the tool. |
| model required | string |
{- "model": "string"
}{- "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": { }
}Retrieves API function tools associated with the AI.
| aiId required | string The identifier of the AI. |
{- "data": [
- {
- "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": { }
}
]
}Creates an API function tool and associates it with the AI.
| aiId required | string The identifier of the AI. |
| 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) |
{- "apiUrl": "string",
- "schema": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "compressionEnabled": true,
- "compressionConfiguration": {
- "compressionModel": "string",
- "compressionThreshold": 0,
- "compressionChunkSize": 0
}
}{- "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": { }
}Updates an API function tool associated with the AI.
| aiId required | string The identifier of the AI. |
| toolId required | string The identifier of the tool. |
| 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) |
{- "apiUrl": "string",
- "schema": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "compressionEnabled": true,
- "compressionConfiguration": {
- "compressionModel": "string",
- "compressionThreshold": 0,
- "compressionChunkSize": 0
}
}{- "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": { }
}Retrieves user input tools associated with the AI.
| aiId required | string The identifier of the AI. |
[- {
- "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": { }
}
]Creates a user input tool and associates it with the AI.
| aiId required | string The identifier of the AI. |
| type required | string Value: "USER_INPUT" |
| textInput required | boolean |
| selectInput required | boolean |
| multiSelectInput required | boolean |
| confirmInput required | boolean |
| addressInput required | boolean |
{- "type": "USER_INPUT",
- "textInput": true,
- "selectInput": true,
- "multiSelectInput": true,
- "confirmInput": true,
- "addressInput": true
}{- "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": { }
}Retrieves knowledge retrieval tools associated with the AI.
| aiId required | string The identifier of the AI. |
[- {
- "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": { }
}
]Creates a knowledge retrieval tool and associates it with the AI.
| aiId required | string The identifier of the AI. |
| 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 |
{- "model": "string",
- "maxRetrievalTokens": 0,
- "maxRetrievalDocuments": 0,
- "queryExpansion": true,
- "alternateQueryCount": 0,
- "hyde": true,
- "rerank": true,
- "grade": true,
- "compress": true,
- "minRelevanceScore": 0
}{- "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": { }
}Retrieves image generation tools associated with the AI.
| aiId required | string The identifier of the AI. |
[- {
- "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": { }
}
]Creates an image generation tool and associates it with the AI.
| aiId required | string The identifier of the AI. |
| modelId required | string |
| samples | integer |
| size | string |
| aspectRatio | string |
| quality | string |
| style | string |
{- "modelId": "string",
- "samples": 0,
- "size": "string",
- "aspectRatio": "string",
- "quality": "string",
- "style": "string"
}{- "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": { }
}Retrieves MCP server tools associated with the AI.
| aiId required | string The identifier of the AI. |
[- {
- "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": { }
}
]Creates an MCP server tool and associates it with the AI.
| aiId required | string The identifier of the AI. |
| 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 |
{- "type": "MCP_SERVER",
- "name": "string",
- "url": "string",
- "orgToolTemplateId": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "allTools": [
- {
- "name": "string",
- "description": "string",
- "schema": "string"
}
], - "selectedTools": [
- "string"
]
}{- "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": { }
}Lists OAuth token status information for tools associated with the AI.
| aiId required | string The identifier of the AI. |
[- {
- "name": "string",
- "scope": "string",
- "expiresIn": 0,
- "issuedAt": "2019-08-24T14:15:22Z"
}
]Retrieves a tool by ID.
| toolId required | string The identifier of the tool. |
{- "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": { }
}Updates the user input tool configuration.
| toolId required | string The identifier of the tool. |
| textInput required | boolean |
| selectInput required | boolean |
| multiSelectInput required | boolean |
| confirmInput required | boolean |
| addressInput required | boolean |
{- "textInput": true,
- "selectInput": true,
- "multiSelectInput": true,
- "confirmInput": true,
- "addressInput": true
}{- "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": { }
}Updates the knowledge retrieval tool configuration.
| toolId required | string The identifier of the tool. |
| 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 |
{- "model": "string",
- "maxRetrievalTokens": 0,
- "maxRetrievalDocuments": 0,
- "queryExpansion": true,
- "alternateQueryCount": 0,
- "hyde": true,
- "rerank": true,
- "grade": true,
- "compress": true,
- "minRelevanceScore": 0
}{- "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": { }
}Updates the image generation tool configuration.
| toolId required | string The identifier of the tool. |
| modelId required | string |
| samples | integer |
| size | string |
| aspectRatio | string |
| quality | string |
| style | string |
{- "modelId": "string",
- "samples": 0,
- "size": "string",
- "aspectRatio": "string",
- "quality": "string",
- "style": "string"
}{- "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": { }
}Updates the MCP server tool configuration.
| toolId required | string The identifier of the tool. |
| 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 |
{- "name": "string",
- "url": "string",
- "orgToolTemplateId": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "allTools": [
- {
- "name": "string",
- "description": "string",
- "schema": "string"
}
], - "selectedTools": [
- "string"
]
}{- "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": { }
}Updates the API function tool configuration.
| toolId required | string The identifier of the tool. |
| 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) |
{- "apiUrl": "string",
- "schema": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}, - "compressionEnabled": true,
- "compressionConfiguration": {
- "compressionModel": "string",
- "compressionThreshold": 0,
- "compressionChunkSize": 0
}
}{- "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": { }
}Lists connectors the caller can use in chat. Each row includes chat readiness and the caller's current auth state.
{- "data": [
- {
- "type": "string",
- "orgTemplateId": "string",
- "templateId": "string",
- "name": "string",
- "toolId": "string",
- "requiresAuth": true,
- "isChatReady": true,
- "logoImageUrl": "string",
- "description": "string",
- "category": "string",
- "legacy": true,
- "hasOAuthToken": true,
- "managedConnectionStatus": "CONNECTED",
- "usesSharedOrgConnection": true
}
]
}Reads reachability for the listed chat connectors.
| toolIds | string Comma-separated tool ids to probe. |
{- "data": [
- {
- "toolId": "string",
- "reachable": true,
- "failureReason": "string",
- "detail": "string",
- "rateLimited": true
}
]
}Creates a user-scoped connect session for a managed connector.
| toolId required | string The identifier of the connector tool. |
| owner | string |
{- "owner": "string"
}{- "token": "string",
- "url": "string",
- "connectorKey": "string",
- "connectorName": "string"
}Previews available tools from an MCP server or template.
| url | string |
| orgToolTemplateId | string |
| toolTemplateId | string |
| toolId | string |
| authenticationType | string (AuthenticationType) Enum: "NONE" "API_KEY" "OAUTH" |
ApiKeyAuthenticationData (object) or OAuthAuthenticationData (object) |
{- "url": "string",
- "orgToolTemplateId": "string",
- "toolTemplateId": "string",
- "toolId": "string",
- "authenticationType": "NONE",
- "authenticationData": {
- "apiKey": "string",
- "apiKeyAuthType": "BASIC",
- "customHeader": [
- {
- "header": "string",
- "value": "string"
}
]
}
}{- "availableTools": [
- {
- "name": "string",
- "description": "string",
- "schema": "string"
}
], - "authenticationRequired": true,
- "oauthDiscovery": { },
- "requiresToolSave": true
}Retrieves configured user inputs for the AI.
| aiId required | string The identifier of the AI. |
{- "data": [
- {
- "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
}
]
}Creates a user input field for the AI.
| aiId required | string The identifier of the AI. |
| 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 |
{- "variableName": "string",
- "type": "SHORT_TEXT",
- "label": "string",
- "configuration": { },
- "showOnChatCreate": true,
- "orderIndex": 0
}{- "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
}Updates a configured user input for the AI.
| aiId required | string The identifier of the AI. |
| userInputId required | string The identifier of the user input. |
| 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 |
{- "variableName": "string",
- "type": "SHORT_TEXT",
- "label": "string",
- "configuration": { },
- "showOnChatCreate": true,
- "orderIndex": 0
}{- "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
}Updates the order of configured user inputs for the AI.
| aiId required | string The identifier of the AI. |
required | Array of objects (AIUserInputOrderItem) | ||||
Array
| |||||
{- "inputs": [
- {
- "id": "string",
- "orderIndex": 0
}
]
}{- "success": true
}Retrieves the embedded client configuration for the AI.
| aiId required | string The identifier of the AI. |
{- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "orgId": "string",
- "aiId": "string",
- "key": "string",
- "data": {
- "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
}
}Updates the embedded client configuration for the AI.
| aiId required | string The identifier of the AI. |
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 |
{- "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
}{- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "orgId": "string",
- "aiId": "string",
- "key": "string",
- "data": {
- "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
}
}Generates a new embedded client key for the AI.
| aiId required | string The identifier of the AI. |
{- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": "string",
- "orgId": "string",
- "aiId": "string",
- "key": "string",
- "data": {
- "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
}
}Lists skills in the caller's own library.
{- "data": [
- {
- "userId": "string",
- "orgId": "string",
- "skillId": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "skill": {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "userId": "string",
- "name": "string",
- "description": "string",
- "content": "string",
- "surfaces": [
- "chat"
], - "license": "string",
- "compatibility": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "allowedTools": "string"
}, - "fileCount": 0
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| 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. |
{- "name": "string",
- "description": "string",
- "content": "string",
- "surfaces": [
- "chat"
], - "files": [
- {
- "path": "string",
- "content": "string",
- "contentType": "string"
}
], - "license": "string",
- "compatibility": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "allowedTools": "string"
}{- "userId": "string",
- "orgId": "string",
- "skillId": "string",
- "enabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "skill": {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "orgId": "string",
- "userId": "string",
- "name": "string",
- "description": "string",
- "content": "string",
- "surfaces": [
- "chat"
], - "license": "string",
- "compatibility": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "allowedTools": "string"
}, - "fileCount": 0
}Lists the caller's skills that the Agent Skills name backfill renamed and that the caller did not acknowledge yet.
{- "items": [
- {
- "skillId": "string",
- "oldName": "string",
- "newName": "string",
- "renamedAt": "2019-08-24T14:15:22Z"
}
]
}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.
A HandleUploadBody from @vercel/blob/client.
{ }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.
| 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. |
{- "fileName": "string"
}{- "name": "string",
- "description": "string",
- "license": "string",
- "compatibility": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "allowedTools": "string",
- "content": "string",
- "files": [
- {
- "path": "string",
- "content": "string"
}
], - "normalizations": [
- "string"
], - "droppedFiles": [
- {
- "path": "string",
- "reason": "not_text"
}
], - "warnings": [
- "string"
]
}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.
| 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. |
{- "fileName": "string"
}{- "name": "string",
- "description": "string",
- "license": "string",
- "compatibility": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "allowedTools": "string",
- "content": "string",
- "files": [
- {
- "path": "string",
- "content": "string"
}
], - "normalizations": [
- "string"
], - "droppedFiles": [
- {
- "path": "string",
- "reason": "not_text"
}
], - "warnings": [
- "string"
]
}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.
{- "organizations": [
- {
- "id": "string",
- "name": "string",
- "imageUrl": "string",
- "signInUrl": "string"
}
]
}Issues a short-lived live browser credential for a chat turn.
| chatId required | string The identifier of the chat. |
| responseId required | string The response id for the running turn. |
| cadence | string Enum: "high" "low" Frame cadence for the credential. |
{- "available": true,
- "endpoint": "string",
- "token": "string",
- "expiresAt": "string",
- "streamId": "string"
}Lists secrets for the organization or a specific AI.
| aiId | string Filter secrets by AI ID. |
[- {
- "id": "string",
- "name": "string",
- "description": "string",
- "valueSource": "saved",
- "vaultSecretId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Creates a secret for the organization or a specific AI.
| name required | string |
| description required | string |
| data | string |
| aiId | string |
{- "name": "string",
- "description": "string",
- "data": "string",
- "aiId": "string"
}{- "id": "string",
- "name": "string",
- "description": "string",
- "valueSource": "saved",
- "vaultSecretId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Updates an existing secret.
| secretId required | string The identifier of the secret. |
| 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. |
{- "description": "string",
- "data": "string",
- "valueSource": "saved"
}{- "id": "string",
- "name": "string",
- "description": "string",
- "valueSource": "saved",
- "vaultSecretId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}{- "data": [
- {
- "id": "string",
- "name": "string",
- "modelFamily": "string",
- "releaseDate": "string",
- "externalModelId": "string",
- "contextSize": 0,
- "options": { },
- "isVisible": true,
- "creator": "string",
- "provider": "string",
- "isPrivate": true,
- "usageTier": "string",
- "isDisabled": true,
- "capabilities": { },
- "benchmarks": { }
}
]
}Retrieves available tenant categories for AI assignment.
| orgId | string Optional org ID for superusers. |
[- {
- "id": "string",
- "tenantId": 0,
- "name": "string",
- "description": "string",
- "sortOrder": 0,
- "isActive": true,
- "parentCategoryId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]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.
| publicId required | string non-empty Public subscription identifier. |
{- "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": {
- "tokenLimits": {
- "standard": {
- "input": 0,
- "output": 0
}, - "premium": {
- "input": 0,
- "output": 0
}
}, - "dataUsageLimitInGb": 0,
- "mediaUsageTokenLimit": 0
}, - "externalSubscriptionId": "string",
- "externalCustomerId": "string",
- "processorType": "STRIPE",
- "metadata": {
- "trialEndDate": "2019-08-24T14:15:22Z",
- "promo": "string"
}, - "cancelledAt": "2019-08-24T14:15:22Z",
- "periodStartDate": "2019-08-24T14:15:22Z",
- "balanceAllocationPerUser": "string",
- "storageAllocationGb": 0,
- "enforceBillingSinceCycleStart": "2019-08-24T14:15:22Z"
}Retrieves tool templates available for the organization.
| limit | integer Maximum number of templates to return. |
| offset | integer Offset for pagination. |
{- "orgToolTemplates": [
- {
- "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": {
- "id": "string",
- "name": "string",
- "logoImageUrl": "string",
- "instructions": "string"
}
}
], - "total": 0
}Retrieves details for a specific organization tool template.
| id required | string The template identifier. |
{- "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": {
- "id": "string",
- "name": "string",
- "logoImageUrl": "string",
- "instructions": "string"
}
}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.
[- {
- "id": "string",
- "orgId": "string",
- "userId": "string",
- "provider": "GOOGLE",
- "externalId": "string",
- "label": "string",
- "data": {
- "access_token": "string",
- "expires_in": 0,
- "scope": "string",
- "token_type": "string"
}, - "metadata": { },
- "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "refreshExpiresAt": "2019-08-24T14:15:22Z"
}
]Retrieves OneDrive OAuth accounts for the current user.
[- {
- "id": "string",
- "orgId": "string",
- "userId": "string",
- "provider": "GOOGLE",
- "externalId": "string",
- "label": "string",
- "data": {
- "access_token": "string",
- "expires_in": 0,
- "scope": "string",
- "token_type": "string"
}, - "metadata": { },
- "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "refreshExpiresAt": "2019-08-24T14:15:22Z"
}
]Searches OneDrive files and folders.
| searchTerm required | string |
| oauthTokenId required | string |
{- "searchTerm": "string",
- "oauthTokenId": "string"
}{ }Retrieves child items for a OneDrive folder.
| id required | string |
| oauthTokenId required | string |
{- "id": "string",
- "oauthTokenId": "string"
}{ }Retrieves Confluence OAuth accounts for the current user.
[- {
- "id": "string",
- "orgId": "string",
- "userId": "string",
- "provider": "GOOGLE",
- "externalId": "string",
- "label": "string",
- "data": {
- "access_token": "string",
- "expires_in": 0,
- "scope": "string",
- "token_type": "string"
}, - "metadata": { },
- "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "refreshExpiresAt": "2019-08-24T14:15:22Z"
}
]Searches Confluence content for selection.
| searchTerm required | string |
| oauthTokenId required | string |
{- "searchTerm": "string",
- "oauthTokenId": "string"
}{ }Retrieves Jira OAuth accounts for the current user.
[- {
- "id": "string",
- "orgId": "string",
- "userId": "string",
- "provider": "GOOGLE",
- "externalId": "string",
- "label": "string",
- "data": {
- "access_token": "string",
- "expires_in": 0,
- "scope": "string",
- "token_type": "string"
}, - "metadata": { },
- "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "refreshExpiresAt": "2019-08-24T14:15:22Z"
}
]Searches Jira projects for selection.
| searchTerm required | string |
| oauthTokenId required | string |
{- "searchTerm": "string",
- "oauthTokenId": "string"
}{ }Retrieves GitHub OAuth accounts for the current user.
[- {
- "id": "string",
- "orgId": "string",
- "userId": "string",
- "provider": "GOOGLE",
- "externalId": "string",
- "label": "string",
- "data": {
- "access_token": "string",
- "expires_in": 0,
- "scope": "string",
- "token_type": "string"
}, - "metadata": { },
- "status": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "refreshExpiresAt": "2019-08-24T14:15:22Z"
}
]Retrieves GitHub app installations for the current user.
{- "data": [
- {
- "id": 0,
- "installationId": "string",
- "targetId": "string",
- "targetType": "string",
- "targetLabel": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}Searches GitHub repositories accessible to an installation.
| searchTerm | string |
| gitHubAppInstallationId required | integer |
| limit | integer |
| cursor | string |
{- "searchTerm": "string",
- "gitHubAppInstallationId": 0,
- "limit": 0,
- "cursor": "string"
}{- "data": [
- {
- "id": 0,
- "node_id": "string",
- "name": "string",
- "private": true
}
], - "pagination": {
- "nextCursor": "string"
}
}Previews repository content for selection.
| repo required | string |
| gitHubAppInstallationId required | string |
{- "repo": "string",
- "gitHubAppInstallationId": "string"
}{- "data": [
- {
- "name": "string",
- "path": "string",
- "sha": "string",
- "size": 0,
- "url": "string",
- "html_url": "string",
- "git_url": "string",
- "download_url": "string",
- "type": "string",
- "owner": "string",
- "repo": "string",
- "content": "string"
}
]
}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.
{- "memory": true,
- "pinnedAgentIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "advancedMode": true,
- "camoufoxBrowserEngine": true,
- "showGlobalHeader": true,
- "agentStudioMode": "simple",
- "homePage": "chat",
- "userPromptConfig": { },
- "notificationPreferences": { },
- "locale": "string",
- "contextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "orgContextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "seenAnnouncementIds": [
- "string"
]
}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.
Any subset of the settings fields. Unknown fields, including orgContextBudgetPercentages, are ignored.
{ }{- "memory": true,
- "pinnedAgentIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "advancedMode": true,
- "camoufoxBrowserEngine": true,
- "showGlobalHeader": true,
- "agentStudioMode": "simple",
- "homePage": "chat",
- "userPromptConfig": { },
- "notificationPreferences": { },
- "locale": "string",
- "contextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "orgContextBudgetPercentages": {
- "chat": 30,
- "appBuilder": 30,
- "assistant": 30
}, - "seenAnnouncementIds": [
- "string"
]
}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.
{- "items": [
- "chat"
], - "agentPath": "/ai/new/simple"
}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.
| limit | integer [ 1 .. 100 ] Default: 50 |
| cursor | string |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "nextCursor": "string"
}
}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.
| 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 |
{- "name": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "description": "string"
}{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z",
- "alreadyExists": true
}Returns one service account in the caller organization. A missing or deleted account returns 404.
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}Disables a service account the organization created. A tenant-owned account returns 403. A second disable returns the same account.
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}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.
| serviceAccountId required | string |
| 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. |
{- "name": "string",
- "scopes": [
- "string"
], - "orgId": "string",
- "userId": "string",
- "tenantOwned": false,
- "source": "PLATFORM"
}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.
| serviceAccountId required | string |
| apiKeyId required | string |
Enables a service account the organization created. A tenant-owned account returns 403. A second enable returns the same account.
| serviceAccountId required | string |
{- "id": "string",
- "name": "string",
- "description": "string",
- "roles": [
- {
- "type": "ADMIN"
}
], - "tenantOwned": true,
- "status": "ACTIVE",
- "createdAt": "2019-08-24T14:15:22Z"
}