Skip to content

REST API Reference

Marcello Marchetti edited this page Jul 20, 2026 · 5 revisions

XRCopilot REST API Reference

This document provides comprehensive documentation for the XRCopilot Public REST API, including all available endpoints, request/response formats, and usage examples.

Table of Contents


Overview

The XRCopilotLab REST API enables you to programmatically manage topics, profiles, agents, and conduct AI-powered conversations. The API follows RESTful conventions and uses JSON for request and response bodies.


Authentication

All API requests require authentication using a subscription key passed in the header.

Header:

Ocp-Apim-Subscription-Key: <YOUR_API_KEY>

Example:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/company-123?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Base URL

https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/

API Versioning

Include the API version as a query parameter in all requests:

Environment Version Parameter
Production api-version=2025-05-01

Topics API

Topics are containers that organize profiles, agents, and files within a company.

List Topics

Retrieves all topics for a company.

Endpoint:

GET /topics/{companyId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
filter string No Filter string to search topics by name
list boolean No If true, returns lightweight list without nested entities

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/company-123?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

[
  {
    "companyId": "company-123",
    "topicId": "sales-kb",
    "topicName": "Sales Knowledge Base",
    "description": "Sales documentation and FAQs",
    "profileNumber": 2,
    "fileNumber": 15,
    "targetNumber": 0,
    "agentNumber": 3,
    "endpointNumber": 1,
    "contributorNumber": 0
  }
]

Get Topic

Retrieves a specific topic.

Endpoint:

GET /topics/{companyId}/{topicId}/pub

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/company-123/sales-kb/pub?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "topicName": "Sales Knowledge Base",
  "description": "Sales documentation and FAQs",
  "profileNumber": 2,
  "fileNumber": 15,
  "agentNumber": 3,
  "topicFiles": [],
  "profiles": [],
  "agents": [],
  "topicTargets": []
}

Create/Update Topic

Creates a new topic or updates an existing one.

Endpoint:

POST /topics

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "topicName": "Sales Knowledge Base",
  "description": "Sales documentation and FAQs"
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company-123",
    "topicId": "sales-kb",
    "topicName": "Sales Knowledge Base",
    "description": "Sales documentation and FAQs"
  }'

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "topicName": "Sales Knowledge Base",
  "description": "Sales documentation and FAQs",
  "profileNumber": 0,
  "fileNumber": 0,
  "agentNumber": 0
}

Error Response (403 - License Limit):

"Topics limit reached. No more topics can be created. (Active Topics: 5 of 5)"

Delete Topic

Deletes a topic and all associated resources (profiles, agents, files).

Endpoint:

DELETE /topics/{companyId}/{topicId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X DELETE "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/company-123/sales-kb?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Response: 200 OK on success

Warning: This operation is irreversible and deletes all profiles, agents, and files within the topic.


Files API

Manage files within topics for document indexing and agent knowledge.

Upload File

Uploads a file to a topic. ZIP files are automatically extracted.

Endpoint:

POST /topics/files/{companyId}/{topicId}/{fileName}/{scope}

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
fileName string Yes File name (URL encoded)
scope integer Yes File scope: 0 = Profile, 1 = Agent

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
preserveStructure boolean No For ZIP files: preserve folder structure

Request Body: Binary file content

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/files/company-123/sales-kb/product-manual.pdf/0?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @product-manual.pdf

Response: 201 Created with file path

Supported File Types:

  • Documents: PDF, DOCX, DOC, TXT, MD, CSV, JSON, XLSX, PPTX
  • Media: MP4, AVI, MKV, MOV, WEBM, MP3, WAV (for transcription)
  • Archives: ZIP (automatically extracted)

Get File URL

Gets a temporary SAS URL for downloading a file (valid for 5 hours).

Endpoint:

GET /topics/files/{companyId}/{topicId}/{fileName}/url

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
fileName string Yes File name (URL encoded)

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/files/company-123/sales-kb/product-manual.pdf/url?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

"https://storageaccount.blob.core.windows.net/sales-kb/product-manual.pdf?sv=2021-06-08&se=2024-01-15T15%3A00%3A00Z&sr=b&sp=r&sig=..."

Delete File

Deletes a file from a topic.

Endpoint:

DELETE /topics/files/{companyId}/{topicId}/{fileName}

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
fileName string Yes File name (URL encoded)

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X DELETE "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/files/company-123/sales-kb/product-manual.pdf?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Response: 200 OK on success, 404 Not Found if file doesn't exist


Delete Multiple Files

Deletes multiple files in a single request.

Endpoint:

POST /topics/files/multidelete

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "files": [
    {
      "companyId": "company-123",
      "topicId": "sales-kb",
      "fileName": "file1.pdf"
    },
    {
      "companyId": "company-123",
      "topicId": "sales-kb",
      "fileName": "file2.pdf"
    }
  ]
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/topics/files/multidelete?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {"companyId": "company-123", "topicId": "sales-kb", "fileName": "file1.pdf"},
      {"companyId": "company-123", "topicId": "sales-kb", "fileName": "file2.pdf"}
    ]
  }'

Response: 200 OK on success


Profiles API

Profiles contain indexed documents used for RAG (Retrieval-Augmented Generation) by agents.

List Profiles

Retrieves all profiles for a topic.

Endpoint:

GET /profiles/{companyId}/{topicId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
filter string No Filter string to search profiles
list boolean No If true, returns lightweight ProfileBase objects

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles/company-123/sales-kb?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

[
  {
    "companyId": "company-123",
    "topicId": "sales-kb",
    "profileId": "docs-profile",
    "profileName": "Documentation Profile",
    "description": "Product documentation",
    "isActive": true,
    "documentsLanguage": "en",
    "documentsIndexingStatus": 0,
    "audioIndexingStatus": 0,
    "webScrapingIndexingStatus": 0,
    "documentsIndexingCount": 15,
    "audioIndexingCount": 0,
    "webScrapingIndexingCount": 0,
    "fileNumber": 15,
    "targetNumber": 0,
    "endpointNumber": 1
  }
]

Get Profile

Retrieves a specific profile.

Endpoint:

GET /profiles/{companyId}/{topicId}/{profileId}/pub

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles/company-123/sales-kb/docs-profile/pub?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "profileId": "docs-profile",
  "profileName": "Documentation Profile",
  "description": "Product documentation",
  "isActive": true,
  "documentsLanguage": "en",
  "documentsIndexingStatus": 0,
  "audioIndexingStatus": 0,
  "webScrapingIndexingStatus": 0,
  "documentsIndexingCount": 15,
  "profileFiles": [],
  "profileTargets": []
}

Create/Update Profile

Creates a new profile or updates an existing one.

Endpoint:

POST /profiles

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "profileId": "docs-profile",
  "profileName": "Documentation Profile",
  "description": "Product documentation",
  "documentsLanguage": "en",
  "isActive": false
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company-123",
    "topicId": "sales-kb",
    "profileId": "docs-profile",
    "profileName": "Documentation Profile",
    "description": "Product documentation",
    "documentsLanguage": "en",
    "isActive": false
  }'

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "profileId": "docs-profile",
  "profileName": "Documentation Profile",
  "description": "Product documentation",
  "documentsLanguage": "en",
  "isActive": false,
  "documentsIndexingStatus": 0
}

Delete Profile

Deletes a profile and its search index.

Endpoint:

DELETE /profiles/{companyId}/{topicId}/{profileId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X DELETE "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles/company-123/sales-kb/docs-profile?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Response: 200 OK on success


Activate/Deactivate Profile

Activates or deactivates a profile's search index. Activation triggers document indexing.

Endpoint:

POST /profiles/{companyId}/{topicId}/{profileId}/activateIndex

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "isActive": true
}

Example Request (Activate):

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles/company-123/sales-kb/docs-profile/activateIndex?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"isActive": true}'

Response: 200 OK on success

Error Response (403 - License Limit):

"Active profiles limit reached. No more profiles can be activated. (Active Profiles: 10 of 10)"

Get Indexing Status

Gets the current indexing status of a profile.

Endpoint:

GET /profiles/indexing/{companyId}/{topicId}/{profileId}/check/status

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/profiles/indexing/company-123/sales-kb/docs-profile/check/status?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "documentsIndexingStatus": 0,
  "audioIndexingStatus": 0,
  "webScrapingIndexingStatus": 0,
  "documentsIndexingCount": 15,
  "audioIndexingCount": 0,
  "webScrapingIndexingCount": 0,
  "statistics": [
    {
      "indexName": "docs-profile",
      "documentCount": 150,
      "storageSize": 1048576
    }
  ]
}

Indexing Status Values:

Status Value Description
Ready 0 Indexing complete
IndexingData 1 Currently indexing
ErrorIndexingData 100 Error during indexing

Agents API

Agents are AI assistants that use profiles for knowledge retrieval.

List Agents

Retrieves all agents for a topic.

Endpoint:

GET /agents/{companyId}/{topicId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
filter string No Filter string to search agents
list boolean No If true, returns lightweight AgentBase objects

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

[
  {
    "companyId": "company-123",
    "topicId": "sales-kb",
    "agentId": "sales-assistant",
    "agentName": "Sales Assistant",
    "isActive": true,
    "systemMessage": "You are a helpful sales assistant...",
    "maxTokens": 4096,
    "temperature": 0.7,
    "minRankingScore": 0.5,
    "enableGroundednessDetection": true,
    "fileNumber": 0,
    "targetNumber": 0,
    "endpointNumber": 1,
    "profileNumber": 1
  }
]

Get Agent

Retrieves a specific agent.

Endpoint:

GET /agents/{companyId}/{topicId}/{agentId}/pub

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant/pub?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "agentId": "sales-assistant",
  "agentName": "Sales Assistant",
  "topicName": "Sales Knowledge Base",
  "isActive": true,
  "expirationDate": null,
  "systemMessage": "You are a helpful sales assistant...",
  "maxTokens": 4096,
  "temperature": 0.7,
  "minRankingScore": 0.5,
  "minWordsValidation": null,
  "numberOfInteractions": 5,
  "enableGroundednessDetection": true,
  "agentCustomWords": [],
  "agentProfiles": [
    {
      "profileId": "docs-profile",
      "profileName": "Documentation Profile"
    }
  ],
  "agentFiles": [],
  "agentTargets": [],
  "agentEndpoints": []
}

Create/Update Agent

Creates a new agent or updates an existing one.

Endpoint:

POST /agents

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "agentId": "sales-assistant",
  "agentName": "Sales Assistant",
  "systemMessage": "You are a helpful sales assistant. Answer questions based on the product documentation provided. Be concise and professional.",
  "maxTokens": 4096,
  "temperature": 0.7,
  "minRankingScore": 0.5,
  "numberOfInteractions": 5,
  "enableGroundednessDetection": true,
  "isActive": false
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company-123",
    "topicId": "sales-kb",
    "agentId": "sales-assistant",
    "agentName": "Sales Assistant",
    "systemMessage": "You are a helpful sales assistant...",
    "maxTokens": 4096,
    "temperature": 0.7,
    "minRankingScore": 0.5,
    "enableGroundednessDetection": true,
    "isActive": false
  }'

Example Response:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "agentId": "sales-assistant",
  "agentName": "Sales Assistant",
  "systemMessage": "You are a helpful sales assistant...",
  "maxTokens": 4096,
  "temperature": 0.7,
  "isActive": false
}

Delete Agent

Deletes an agent.

Endpoint:

DELETE /agents/{companyId}/{topicId}/{agentId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X DELETE "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Response: 200 OK on success


Activate/Deactivate Agent

Activates or deactivates an agent.

Endpoint:

POST /agents/{companyId}/{topicId}/{agentId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "isActive": true
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"isActive": true}'

Response: 200 OK on success

Error Response (403 - License Limit):

"Active agents limit reached. No more agents can be activated. (Active Agents: 5 of 5)"

Chat API

Conduct AI-powered conversations with agents.

Get Welcome Message

Gets the welcome message for an agent.

Endpoint:

GET /agents/{companyId}/{topicId}/{agentId}/{endpointId}/welcome/{language}

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
agentId string Yes Agent identifier
endpointId string Yes Endpoint identifier
language string Yes Language code (e.g., en, it, fr)

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant/default/welcome/en?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "responseType": "welcome",
  "message": "Hello! I'm your Sales Assistant. How can I help you today?",
  "conversationId": "550e8400-e29b-41d4-a716-446655440000",
  "answerLanguage": "en"
}

Chat

Sends a message to an agent and receives a response.

Endpoint:

POST /agents/{companyId}/{topicId}/{agentId}/{endpointId}/chat

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
agentId string Yes Agent identifier
endpointId string Yes Endpoint identifier

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "companyId": "company-123",
  "topicId": "sales-kb",
  "agentId": "sales-assistant",
  "endpointId": "default",
  "message": "What products do you offer for enterprise customers?",
  "conversationId": "550e8400-e29b-41d4-a716-446655440000",
  "answerLanguage": "en",
  "enableLogs": false,
  "parameters": null,
  "presets": null
}

Request Body Properties:

Property Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
agentId string Yes Agent identifier
endpointId string Yes Endpoint identifier
message string Yes User's message
conversationId string Yes Unique conversation ID (UUID)
answerLanguage string No Desired response language
enableLogs boolean No Include completion logs in response
parameters object No Override agent parameters
presets array No Available presets for the conversation
signalRConnectionId string No SignalR connection for real-time updates
userId string No End user this request is on behalf of (v3.0.2); partitions per-user history and scopes opted-in MCP data
mcpContext object No Non-secret string key/value pairs forwarded to opted-in MCP servers as X-User-Context-<key> headers (v3.0.2)

Parameters Override Object:

{
  "parameters": {
    "systemMessage": "Custom system message",
    "maxTokens": 2048,
    "temperature": 0.5,
    "minRankingScore": 0.6,
    "minWordsValidation": 10,
    "numberOfInteractions": 5,
    "enableGroundednessDetection": true
  }
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant/default/chat?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "companyId": "company-123",
    "topicId": "sales-kb",
    "agentId": "sales-assistant",
    "endpointId": "default",
    "message": "What products do you offer for enterprise customers?",
    "conversationId": "550e8400-e29b-41d4-a716-446655440000",
    "answerLanguage": "en"
  }'

Example Response:

{
  "responseType": "answer",
  "message": "We offer several enterprise solutions:\n\n1. **Enterprise Platform** - A comprehensive solution for large organizations...\n2. **Professional Suite** - Designed for growing businesses...\n\nWould you like more details about any of these products?",
  "intent": null,
  "conversationId": "550e8400-e29b-41d4-a716-446655440000",
  "answerLanguage": "en",
  "documents": [
    {
      "title": "Enterprise Products Overview",
      "uri": "https://storage.blob.core.windows.net/sales-kb/enterprise-overview.pdf",
      "fileName": "enterprise-overview.pdf",
      "totalPages": 25,
      "relevantPages": [3, 5, 7],
      "relevanceScore": 0.89
    },
    {
      "title": "Pricing Guide 2024",
      "uri": "https://storage.blob.core.windows.net/sales-kb/pricing-2024.pdf",
      "fileName": "pricing-2024.pdf",
      "totalPages": 10,
      "relevantPages": [2],
      "relevanceScore": 0.75
    }
  ],
  "completionLog": null,
  "htmlMessage": "<p>We offer several enterprise solutions:</p><ol><li><strong>Enterprise Platform</strong>...</li></ol>",
  "rawMessage": "We offer several enterprise solutions: 1. Enterprise Platform..."
}

Response Properties:

Property Type Description
responseType string Type of response: answer, welcome, error
message string The assistant's response (markdown)
intent object Detected user intent (if applicable)
conversationId string Conversation identifier
answerLanguage string Language of the response
documents array Source documents used for the answer
completionLog object Detailed completion logs (if enabled)
htmlMessage string Response converted to HTML
rawMessage string Plain text response without formatting
speechMessage string Audio data for text-to-speech (if enabled)

Get Conversation History

Retrieves conversation history.

Endpoint:

GET /agents/{companyId}/{topicId}/{agentId}/conversations/{conversationId}

Path Parameters:

Parameter Type Required Description
companyId string Yes Company identifier
topicId string Yes Topic identifier
agentId string Yes Agent identifier
conversationId string Yes Conversation ID or all for all conversations

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
messages integer Yes Max messages to retrieve (0 for all)
page integer No Page number (default: 1)
pageSize integer No Page size (default: 50, max: 50)
group boolean No Group results by conversation
userId string No Filter by user ID
dateFrom string No Filter from date (ISO 8601)
dateTo string No Filter to date (ISO 8601)

Example Request (Single Conversation):

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant/conversations/550e8400-e29b-41d4-a716-446655440000?messages=50&api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

{
  "conversationId": "550e8400-e29b-41d4-a716-446655440000",
  "messages": [
    {
      "id": "msg-001",
      "conversationId": "550e8400-e29b-41d4-a716-446655440000",
      "companyId": "company-123",
      "topicId": "sales-kb",
      "agentId": "sales-assistant",
      "role": "user",
      "content": "What products do you offer for enterprise customers?",
      "originalContent": "What products do you offer for enterprise customers?",
      "completionTokens": 0,
      "promptTokens": 0,
      "totalTokens": 0,
      "timeStamp": "2024-01-15T10:30:00Z"
    },
    {
      "id": "msg-002",
      "conversationId": "550e8400-e29b-41d4-a716-446655440000",
      "companyId": "company-123",
      "topicId": "sales-kb",
      "agentId": "sales-assistant",
      "role": "assistant",
      "content": "We offer several enterprise solutions...",
      "originalContent": "We offer several enterprise solutions...",
      "completionTokens": 150,
      "promptTokens": 500,
      "totalTokens": 650,
      "timeStamp": "2024-01-15T10:30:05Z"
    }
  ]
}

Example Request (All Conversations):

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/company-123/sales-kb/sales-assistant/conversations/all?messages=100&group=true&api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Delete Conversation History

Deletes a conversation's history.

Endpoint:

DELETE /agents/conversations/{conversationId}

Path Parameters:

Parameter Type Required Description
conversationId string Yes Conversation ID (UUID)

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X DELETE "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/agents/conversations/550e8400-e29b-41d4-a716-446655440000?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Response: 200 OK on success


Orchestrators API

Multi-agent orchestrator workflows. Executions are dispatched asynchronously: POST /execute and POST /resume return immediately with an ExecutionHandle (HTTP 202 Accepted). Live progress is delivered via Server-Sent Events at GET /orchestrations/{executionId}/stream, or polled via GET /orchestrations/{executionId}/status.

List Orchestrators

Retrieves the orchestrators defined for a company.

Endpoint:

GET /orchestrators/{companyId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version
filter string No Filter string to search orchestrators by name
list boolean No If true, returns lightweight summaries (no nested steps/connections)

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/orchestrators/company-123?api-version=2025-05-01&list=true" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

[
  {
    "companyId": "company-123",
    "orchestratorId": "weekly-cost-report",
    "name": "Weekly Cost Variance Report",
    "description": "Generates the weekly motorcycle production cost variance report",
    "isActive": true,
    "stepCount": 8,
    "agentStepCount": 4,
    "createdAt": "2026-04-12T08:30:00Z",
    "updatedAt": "2026-05-04T14:22:11Z"
  }
]

Get Orchestrator

Retrieves the full definition of a single orchestrator (steps, connections, endpoints).

Endpoint:

GET /orchestrators/{companyId}/{orchestratorId}

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Response:

{
  "companyId": "company-123",
  "orchestratorId": "weekly-cost-report",
  "name": "Weekly Cost Variance Report",
  "isActive": true,
  "steps": [
    {
      "stepId": "step-1",
      "stepName": "Country selection",
      "stepType": "UserQuestion",
      "order": 0,
      "displayOutput": false
    }
  ],
  "connections": [],
  "orchestratorEndpoints": []
}

stepType is one of: Agent, Condition, Switch, ParallelGroup, HandoffGroup, UserQuestion, Terminate.


Validate Orchestrator

Validates an orchestrator definition without persisting it.

Endpoint:

POST /orchestrators/validate

Request Body: an Orchestrator object (same shape as the response of GET /orchestrators/{companyId}/{orchestratorId}).

Example Response:

{
  "isValid": false,
  "errors": [
    "Step 'Triage' is an Agent step but has no Agent specified"
  ],
  "warnings": []
}

Start Execution

Dispatches an orchestrator run. The endpoint returns immediately with 202 Accepted and an ExecutionHandle; the orchestrator runs asynchronously. Subscribe to GET /orchestrations/{executionId}/stream (SSE) or poll GET /orchestrations/{executionId}/status to observe progress.

Endpoint:

POST /orchestrators/{companyId}/{orchestratorId}/execute

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body (OrchestrationRequest):

{
  "message": "Generate the weekly cost variance report",
  "executionId": "ECA60D63-9038-4222-B080-FEAE4131EA43",
  "conversationId": "10e60d95-610c-437d-81f2-d3d48b89be7d",
  "answerLanguage": "en",
  "initialContext": { "country": "Bangladesh" },
  "initiatedBy": "user-id",
  "timeoutSeconds": 600,
  "tempFiles": false
}
Field Type Required Description
message string Yes Initial user prompt that initiates the orchestration
executionId string No Pre-allocated id (1-128 chars: A-Z, a-z, 0-9, -, _). Lets the caller join the SSE stream the instant the handle returns. Auto-generated if omitted.
conversationId string No Conversation id to keep history across executions
answerLanguage string No en, it, fr, … or xx for multilingual
initialContext object No Map of context variables seeded into the orchestration state
initiatedBy string No User/system that started the execution
timeoutSeconds integer No Per-execution wall-clock cap
continueOnFailure boolean No For parallel groups — keep going on a step failure
tempFiles boolean No Set true if temp files were uploaded for the run

Success Response (202 Accepted, ExecutionHandle):

{
  "executionId": "ECA60D63-9038-4222-B080-FEAE4131EA43",
  "status": "queued"
}

The Location response header points to the status snapshot:

Location: /api/orchestrations/ECA60D63-9038-4222-B080-FEAE4131EA43/status

Error Responses:

Status Reason
400 executionId malformed, request body invalid, or orchestrator inactive
404 Orchestrator not found
409 An execution with this executionId already exists

Resume Execution

Submits a user response to a paused execution and resumes it. Like execute, this is fire-and-forget and returns 202 Accepted with an ExecutionHandle.

Endpoint:

POST /orchestrations/resume/{interactionId}

Path Parameters:

Parameter Type Required Description
interactionId string Yes The requestId returned in the userInteractionRequired event

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body (ResumeOrchestrationRequest):

{
  "orchestrationState": "{\"OrchestratorId\":\"…\",\"CompanyId\":\"…\",\"CurrentStepId\":\"…\",\"ContextData\":{…},\"StepResults\":{…},\"ExecutionId\":\"…\"}",
  "userResponse": {
    "requestId": "24e51c05-18ce-461d-9755-9a56c364ed32",
    "responseValue": "Sì",
    "wasSkipped": false,
    "responseTimestamp": "2026-05-06T09:20:30Z",
    "answerLanguage": "it"
  }
}
Field Type Required Description
orchestrationState string Yes Opaque serialized state — copy from the userInteractionRequired event payload (or ExecutionStatus.orchestrationState)
userResponse.requestId string Yes Must equal interactionId in the URL
userResponse.responseValue string Yes (unless skipped) The user's reply
userResponse.wasSkipped boolean No true if the user skipped a non-required interaction
userResponse.answerLanguage string No Language to drive the resumed flow

Success Response (202 Accepted):

{
  "executionId": "ECA60D63-9038-4222-B080-FEAE4131EA43",
  "status": "running"
}

Error Responses:

Status Reason
400 Missing/invalid orchestrationState, malformed JSON, or userResponse.requestId doesn't match the path interactionId

Get Execution Status

Returns a snapshot of an orchestration execution. Use this for polling (alternative to SSE) and to recover terminal results after a disconnect.

Endpoint:

GET /orchestrations/{executionId}/status

Query Parameters:

Parameter Type Required Description
companyId string Yes Company id (used as Cosmos partition key)
api-version string Yes API version

Example Response (ExecutionStatus):

{
  "executionId": "ECA60D63-9038-4222-B080-FEAE4131EA43",
  "companyId": "company-123",
  "orchestratorId": "weekly-cost-report",
  "status": "paused",
  "lastSeq": 17,
  "cancelRequested": false,
  "orchestrationState": "{\"OrchestratorId\":\"…\",…}",
  "createdAt": "2026-05-06T09:20:48Z",
  "updatedAt": "2026-05-06T09:20:57Z"
}

status values: queued, running, paused, completed, failed, cancelled.

  • result is included only when status is completed, failed, or cancelled (it is the final OrchestrationResult).
  • orchestrationState is included only when status is paused (pass it back to POST /orchestrations/resume/{interactionId}).

Errors:

Status Reason
400 Missing companyId query parameter
404 Execution not found

Stream Execution Events (SSE)

Server-Sent Events stream of every orchestration event. Auto-reconnect with Last-Event-ID is supported for transparent resume across network drops.

Endpoint:

GET /orchestrations/{executionId}/stream

Query Parameters:

Parameter Type Required Description
companyId string Yes Company id
api-version string Yes API version

Headers:

Header Required Description
Ocp-Apim-Subscription-Key Yes Auth
Accept: text/event-stream Recommended Standard SSE accept header
Last-Event-ID: {executionId}::{seq} No Resume after a disconnect; the stream replays starting from the next seq

Response: 200 OK, Content-Type: text/event-stream; charset=utf-8. Each frame follows the standard SSE format:

id: ECA60D63-9038-4222-B080-FEAE4131EA43::5
event: stepCompleted
data: {"seq":5,"timestamp":"2026-05-06T09:20:50.123Z","stepId":"step-1","payload":{…}}

Wire-format reference for the data: JSON object:

Field Type Description
seq integer Monotonic sequence number within the execution. Echoed in the id: line as {executionId}::{seq} — clients use this to drive Last-Event-ID resume.
timestamp string (ISO-8601 UTC) Server-side time the event was published.
stepId string Present only for step-scoped events (stepStarted, stepCompleted, and the user-interaction events emitted from inside a step).
agentId string Present only for agent-scoped events (agentUpdate, agent-step userInteractionRequired).
payload object Event-specific body. Shape depends on the event type — see below.

The full executionId and eventType are NOT inside data; they come from the SSE id: line ({executionId}::{seq}) and the event: line respectively, per the SSE spec.

Event types (the event: line is the canonical source of the event type):

Event type Meaning Notes
started Execution accepted by the worker First event
stepStarted / stepCompleted Step lifecycle stepId populated
agentUpdate Per-agent progress within a step agentId (and stepId) populated
progress Free-form progress markers payload.output is populated when an agent step completes (payload.agentId, payload.agentName, payload.output, payload.displayInChat)
userInteractionRequired Execution paused waiting for a user response — see field table below stepId populated, agentId populated only for agent-step pauses
paused / resumed Pause / resume lifecycle
completed / failed / cancelled Terminal — the SSE stream closes after these payload is the full OrchestrationResult
heartbeat Keep-alive Ignore in business logic

userInteractionRequired payload fields — use these to drive a UI prompt and to call POST /orchestrations/resume/{interactionId}:

Field Type Description
interactionId string The requestId you must pass as the path parameter when resuming.
message string The question to render to the user.
interactionType string TextInput or Choice.
options array of string Predefined replies for Choice interactions; null / absent for TextInput.
isRequired boolean If false, the user may skip via userResponse.wasSkipped=true on resume.
timeoutSeconds integer 0 or null means no timeout.
orchestrationState string (JSON) Opaque resume token — pass back unchanged in resumeRequest.orchestrationState.
agentId string Populated only when the pause originates from an Agent step.
agentName string Populated only when the pause originates from an Agent step.
stepId string Workflow step that issued the pause (always populated).
stepName string Human-readable step name (always populated).

After a terminal event the server closes the connection. After a soft close (no terminal event), reconnect with the last seen Last-Event-ID to resume seamlessly.


Cancel Execution

Requests cancellation of a running execution. Idempotent — calling it on a terminal or already-cancelling execution returns success.

Endpoint:

POST /orchestrators/{companyId}/{orchestratorId}/executions/{executionId}/cancel

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Response:

{ "success": true, "message": "Cancellation requested" }

The orchestrator polls cancelRequested between steps and emits a terminal cancelled event on the next safe boundary.


Upload Orchestrator File

Uploads a file scoped to an orchestrator. Max 100 MB.

Endpoint:

POST /orchestrators/files/{companyId}/{orchestratorId}/{fileName}/{scope}
Path parameter Description
fileName URL-encoded file name
scope 0 = Profile scope, 1 = Agent scope

Request Body: raw bytes of the file (any content type).

Response: 200 OK on success.


Get Orchestrator File URL

Returns a read-only SAS URL for a file in orchestrator storage.

Endpoint:

GET /orchestrators/files/{companyId}/{orchestratorId}/url

Query Parameters:

Parameter Type Required Description
fileName string Yes URL-encoded file name
api-version string Yes API version

Response: the SAS URL as a plain JSON string.


Delete Orchestrator File

Endpoint:

DELETE /orchestrators/files/{companyId}/{orchestratorId}/{fileName}

Response: 200 OK on success.


Common API

Common utilities for voices and text-to-speech.

Get Voices

Retrieves available voices for text-to-speech.

Endpoint:

GET /common/voices

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Example Request:

curl -X GET "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/common/voices?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>"

Example Response:

[
  {
    "id": "en-US-JennyNeural",
    "voiceName": "Jenny (US English)",
    "voiceGender": 1
  },
  {
    "id": "en-US-GuyNeural",
    "voiceName": "Guy (US English)",
    "voiceGender": 0
  },
  {
    "id": "it-IT-ElsaNeural",
    "voiceName": "Elsa (Italian)",
    "voiceGender": 1
  }
]

Voice Gender Values:

Value Description
0 Male
1 Female

Text-to-Speech

Converts text to speech audio.

Endpoint:

POST /common/speech

Query Parameters:

Parameter Type Required Description
api-version string Yes API version

Request Body:

{
  "text": "Hello, how can I help you today?",
  "language": "en",
  "voiceId": "en-US-JennyNeural"
}

Example Request:

curl -X POST "https://apim-hipexr-prod-italynorth.azure-api.net/api/lab-public/common/speech?api-version=2025-05-01" \
  -H "Ocp-Apim-Subscription-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, how can I help you today?",
    "language": "en",
    "voiceId": "en-US-JennyNeural"
  }'

Example Response:

{
  "voiceData": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA..."
}

The voiceData field contains base64-encoded audio data (WAV format).


Models Reference

Topic

{
  "companyId": "string (required)",
  "topicId": "string (required)",
  "topicName": "string (required)",
  "description": "string (required)",
  "profileNumber": "integer (read-only)",
  "fileNumber": "integer (read-only)",
  "targetNumber": "integer (read-only)",
  "agentNumber": "integer (read-only)",
  "endpointNumber": "integer (read-only)",
  "contributorNumber": "integer (read-only)",
  "topicFiles": "array (read-only)",
  "profiles": "array (read-only)",
  "agents": "array (read-only)",
  "topicTargets": "array (read-only)",
  "endpoints": "array (read-only)"
}

Profile

{
  "companyId": "string (required)",
  "topicId": "string (required)",
  "profileId": "string (required)",
  "profileName": "string (required)",
  "description": "string",
  "isActive": "boolean",
  "documentsLanguage": "string",
  "documentsIndexingStatus": "integer",
  "audioIndexingStatus": "integer",
  "webScrapingIndexingStatus": "integer",
  "documentsIndexingCount": "integer",
  "audioIndexingCount": "integer",
  "webScrapingIndexingCount": "integer",
  "profileFiles": "array",
  "profileTargets": "array",
  "endpoints": "array"
}

Agent

{
  "companyId": "string (required)",
  "topicId": "string (required)",
  "agentId": "string (required)",
  "agentName": "string (required)",
  "topicName": "string (read-only)",
  "isActive": "boolean",
  "expirationDate": "datetime",
  "systemMessage": "string",
  "maxTokens": "integer",
  "temperature": "float (0.0-2.0)",
  "minRankingScore": "float (0.0-1.0)",
  "minWordsValidation": "integer",
  "numberOfInteractions": "integer",
  "enableGroundednessDetection": "boolean",
  "agentCustomWords": "array",
  "agentProfiles": "array",
  "agentFiles": "array",
  "agentTargets": "array",
  "agentEndpoints": "array",
  "endpoints": "array",
  "models": "array"
}

UserPrompt (Chat Request)

{
  "companyId": "string (required)",
  "topicId": "string (required)",
  "agentId": "string (required)",
  "endpointId": "string (required)",
  "message": "string (required)",
  "conversationId": "string (required, UUID)",
  "answerLanguage": "string",
  "presets": "array",
  "parameters": {
    "systemMessage": "string",
    "maxTokens": "integer",
    "temperature": "float",
    "minRankingScore": "float",
    "minWordsValidation": "integer",
    "numberOfInteractions": "integer",
    "enableGroundednessDetection": "boolean"
  },
  "signalRConnectionId": "string",
  "enableLogs": "boolean",
  "userId": "string",
  "mcpContext": { "key": "value" }
}

userId (optional, v3.0.2) — the end user this request is on behalf of; partitions per-user history and, when an MCP server opts in, scopes its data to that user. mcpContext (optional, v3.0.2) — a map of non-secret string key/value pairs forwarded to opted-in MCP servers as X-User-Context-<key> headers.

AssistantResponse (Chat Response)

{
  "responseType": "string (answer|welcome|error)",
  "message": "string",
  "intent": {
    "type": "string",
    "entities": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  },
  "conversationId": "string",
  "answerLanguage": "string",
  "documents": [
    {
      "title": "string",
      "uri": "string",
      "fileName": "string",
      "totalPages": "integer",
      "relevantPages": "array of integers",
      "authors": "array of strings",
      "relevanceScore": "float"
    }
  ],
  "completionLog": {
    "steps": [
      {
        "stepId": "integer",
        "stepType": "string",
        "parameters": "object",
        "duration": "long"
      }
    ]
  },
  "speechMessage": "string (base64 audio)",
  "htmlMessage": "string",
  "rawMessage": "string"
}

History

{
  "conversationId": "string",
  "messages": [
    {
      "id": "string",
      "conversationId": "string",
      "companyId": "string",
      "topicId": "string",
      "agentId": "string",
      "role": "string (user|assistant)",
      "content": "string",
      "originalContent": "string",
      "completionTokens": "integer",
      "promptTokens": "integer",
      "totalTokens": "integer",
      "timeStamp": "datetime"
    }
  ]
}

IndexingStatus

{
  "documentsIndexingStatus": "integer (0=Ready, 1=Indexing, 100=Error)",
  "audioIndexingStatus": "integer",
  "webScrapingIndexingStatus": "integer",
  "documentsIndexingCount": "integer",
  "audioIndexingCount": "integer",
  "webScrapingIndexingCount": "integer",
  "statistics": [
    {
      "indexName": "string",
      "documentCount": "integer",
      "storageSize": "long"
    }
  ]
}

Orchestrator

{
  "companyId": "string (required)",
  "orchestratorId": "string (required)",
  "name": "string (required)",
  "description": "string",
  "isActive": "boolean",
  "createdAt": "datetime",
  "updatedAt": "datetime",
  "createdBy": "string",
  "updatedBy": "string",
  "steps": "array<OrchestratorStep>",
  "connections": "array<OrchestratorConnection>",
  "orchestratorEndpoints": "array<OrchestratorEndpoint>",
  "stepCount": "integer (read-only)",
  "agentStepCount": "integer (read-only)",
  "hasConditionalSteps": "boolean (read-only)"
}

OrchestratorStep.stepType is one of: Agent, Condition, Switch, ParallelGroup, HandoffGroup, UserQuestion, Terminate.

OrchestrationRequest

{
  "message": "string (required)",
  "executionId": "string (optional, 1-128 chars: A-Z, a-z, 0-9, '-', '_')",
  "conversationId": "string (optional)",
  "initiatedBy": "string (optional)",
  "initialContext": "object<string, any> (optional)",
  "answerLanguage": "string (optional, e.g. 'en' / 'it' / 'xx')",
  "enableLogs": "boolean (optional)",
  "timeoutSeconds": "integer (optional)",
  "continueOnFailure": "boolean (optional)",
  "tempFiles": "boolean (optional)"
}

ResumeOrchestrationRequest

{
  "orchestrationState": "string (required, opaque serialized state)",
  "userResponse": "UserInteractionResponse (required)"
}

ExecutionHandle

Returned by POST /execute and POST /resume (HTTP 202 Accepted).

{
  "executionId": "string",
  "status": "string ('queued' | 'running')"
}

ExecutionStatus

{
  "executionId": "string",
  "companyId": "string",
  "orchestratorId": "string",
  "status": "string ('queued' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled')",
  "lastSeq": "integer",
  "cancelRequested": "boolean",
  "result": "OrchestrationResult (only when terminal)",
  "orchestrationState": "string (only when paused)",
  "createdAt": "datetime",
  "updatedAt": "datetime"
}

OrchestrationEvent (assembled by an SSE consumer)

This is the logical shape an SDK reconstructs from each SSE frame — id and eventType come from the id: / event: SSE control lines, the rest is parsed from the data: JSON. (See Stream Execution Events (SSE) above for the on-wire format.)

{
  "id": "string ('{executionId}::{seq}')",
  "executionId": "string",
  "seq": "integer (monotonic per execution)",
  "eventType": "string (see Event Types below)",
  "timestamp": "datetime",
  "stepId": "string (step-scoped events)",
  "agentId": "string (agent-scoped events)",
  "data": "object (event-type-specific payload — see Stream Execution Events for the field tables)"
}

Event Types:

Value Terminal?
started no
stepStarted, stepCompleted no
agentUpdate, progress no
userInteractionRequired, paused, resumed no
completed, failed, cancelled yes
heartbeat no (keep-alive only)

UserInteractionRequest

{
  "requestId": "string",
  "agentId": "string",
  "agentName": "string",
  "interactionType": "string ('TextInput' | 'Choice')",
  "message": "string",
  "promptHint": "string",
  "options": ["string"],
  "isRequired": "boolean",
  "defaultValue": "string",
  "timeoutSeconds": "integer (0 = no timeout)"
}

UserInteractionResponse

{
  "requestId": "string (required, must match the request)",
  "responseValue": "string",
  "wasSkipped": "boolean",
  "responseTimestamp": "datetime",
  "answerLanguage": "string",
  "metadata": "object<string, any>"
}

OrchestrationResult

{
  "executionId": "string",
  "conversationId": "string",
  "success": "boolean",
  "status": "integer (OrchestrationStatus enum)",
  "finalOutput": "string",
  "error": "string",
  "duration": "duration",
  "startedAt": "datetime",
  "completedAt": "datetime",
  "stepResults": "array<StepResult>",
  "finalContext": "object<string, any>",
  "metrics": "OrchestrationMetrics",
  "documents": "array",
  "documentImages": "array",
  "files": "array",
  "isPausedForUserInteraction": "boolean",
  "pendingUserInteraction": "UserInteractionRequest",
  "orchestrationState": "string"
}

OrchestrationStatus enum (numeric values used inside OrchestrationResult.status):

Value Name Notes
0 Running In progress
1 Completed Terminal
2 Failed Terminal
3 Cancelled Terminal
4 Skipped Step-only — not used at execution level
5 PausedForUserInteraction Pass orchestrationState to POST /orchestrations/resume/{interactionId}

Note. The string statuses returned by GET /orchestrations/{executionId}/status (queued, running, paused, completed, failed, cancelled) and the numeric OrchestrationStatus enum inside OrchestrationResult.status describe the same lifecycle — strings on the wire for the lightweight snapshot, numeric values inside the final result payload for SDK consumers.


Error Handling

HTTP Status Codes

Code Description
200 Success
201 Created
202 Accepted — fire-and-forget dispatch (orchestrator execute / resume); the body carries an ExecutionHandle
400 Bad Request - Invalid parameters or request body
403 Forbidden - License limit reached or unauthorized
404 Not Found - Resource doesn't exist
409 Conflict - Resource already exists (e.g. duplicate executionId)
500 Internal Server Error

Error Response Format

"Error message describing what went wrong"

Common Errors

Invalid Request Body:

"Invalid agent data"

Resource Not Found:

"Agent not found"

License Limit Reached:

"Active agents limit reached. No more agents can be activated. (Active Agents: 5 of 5)"

Duplicate Name:

"An agent with the same name already exists in this topic"

Rate Limits

Contact your account manager for information about rate limits specific to your subscription tier.


Supported Languages

Code Language
xx Multilingual
en English
it Italian
fr French
de German
es Spanish
pt Portuguese
zh Chinese
ja Japanese
ko Korean
ru Russian
ar Arabic
hi Hindi
tr Turkish
nl Dutch
pl Polish
sv Swedish
cs Czech
da Danish
fi Finnish
el Greek
hu Hungarian
id Indonesian
ms Malay
nb Norwegian Bokmal
sk Slovak
th Thai
uk Ukrainian
vi Vietnamese
ro Romanian

Last updated: May 2026

Clone this wiki locally