Skip to content

Conversation API

Public API · Enterprise Edition

The Conversation API is part of Studio's public, versioned API (/api/conversation/v1/), authenticated with a crn_conv_ Bearer key. It is an Enterprise-Edition feature available on Pro and above.

The Conversation API allows external applications to interact with the Studio AI agent programmatically. It provides the same content management capabilities as the chat UI but through a REST API authenticated with project-scoped API keys.

Authentication

Conversation API endpoints use API key authentication, not session cookies:

http
Authorization: Bearer crn_conv_your-conversation-api-key

Send Message

Send a message to the AI agent and receive a response.

POST /api/conversation/v1/:projectId/message

Request Body

FieldTypeRequiredDescription
messagestringYesUser message text
conversationIdstringNoExisting conversation ID for multi-turn
localestringNoDefault locale for operations

Response

The response format depends on the API key configuration. The agent executes tools, performs content operations, and returns the final result.

Example

bash
curl -X POST https://studio.example.com/api/conversation/v1/{projectId}/message \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer crn_conv_your-api-key" \
  -d '{
    "message": "Create a blog post titled Getting Started with content about onboarding",
    "locale": "en"
  }'

Conversation History

Get the message history for a conversation.

GET /api/conversation/v1/:projectId/history

Query Parameters

ParameterTypeDescription
conversationIdstringConversation ID

Example

bash
curl https://studio.example.com/api/conversation/v1/{projectId}/history?conversationId=uuid \
  -H "Authorization: Bearer crn_conv_your-api-key"

API Key Management

Conversation API keys are managed through the project settings:

List Keys

GET /api/workspaces/:workspaceId/projects/:projectId/conversation-keys

Create Key

POST /api/workspaces/:workspaceId/projects/:projectId/conversation-keys
FieldTypeRequiredDescription
namestringYesKey display name
role'viewer' | 'editor' | 'admin'NoKey role (defaults to editor) — Conversation API keys use this 3-role model, not the internal agent's workspace/project roles
allowedModelsstring[]NoRestrict to specific models
allowedLocalesstring[]NoRestrict to specific locales
customInstructionsstringNoCustom system prompt instructions

Update Key

PATCH /api/workspaces/:workspaceId/projects/:projectId/conversation-keys/:keyId

Revoke Key

DELETE /api/workspaces/:workspaceId/projects/:projectId/conversation-keys/:keyId

Plan Limits

PlanConversation KeysMessages/Month
Free00
Starter00
Pro153,000
EnterpriseUnlimitedUnlimited

The Conversation API requires Pro or above (Enterprise Edition); Free and Starter workspaces cannot create conversation keys.

Custom Instructions

Each API key can include custom instructions that are appended to the agent's system prompt. This allows project admins to constrain the agent's behavior for specific integrations:

json
{
  "name": "Blog Integration Key",
  "customInstructions": "Only create content in the blog-post model. Always set status to draft. Do not delete any content.",
  "allowedModels": ["blog-post"],
  "allowedLocales": ["en", "tr"]
}

Enterprise Feature

The Conversation API routes through the enterprise bridge. If ee/ is not loaded, these endpoints return 403.

Released under the AGPL-3.0 License.