Darwin Chat API
The Chat API from Darwin — 3 operation(s) for chat.
The Chat API from Darwin — 3 operation(s) for chat.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/meetdarwin-ai:meetdarwin-ai-chat-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Meetdarwin Ai Chat API
version: '2026-10-12'
contact:
name: Darwin
url: https://docs.meetdarwin.ai/api-reference/introduction
description: 'Operations tagged Chat across 2 of this provider''s published API definitions: meetdarwin-ai-mcp-openapi.json, meetdarwin-ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.meetdarwin.ai/v1
security:
- bearer: []
tags:
- name: Chat
paths:
/chat/sessions:
post:
operationId: createChatSession
summary: Start a conversation with the agent
tags:
- Chat
description: Requires the `chat:write` scope.
x-darwin-scope: chat:write
parameters:
- name: Idempotency-Key
in: header
required: false
description: 'Retry safely: the first response is replayed for 24 hours (not for streamed answers).'
schema:
type: string
maxLength: 255
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatSessionCreate'
responses:
'201':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ChatSession'
'400':
description: Invalid request (`invalid_request`, `unsupported_version`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Missing or invalid key (`authentication_required`, `invalid_api_key`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'402':
description: The workspace must add a card before the API can be used (`payment_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: The key lacks the scope (`insufficient_scope`), the feature is off (`feature_disabled`), or the workspace's plan doesn't include it (`plan_required`, with `required_plan`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such object in this workspace (`not_found`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflicts with the current state (`conflict`, `idempotency_key_in_use`), or the change would leave a live agent with no calendar or live form (`goal_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'422':
description: Refused by a rule (`unprocessable`, `idempotency_key_reused`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'429':
description: Rate limited (`rate_limited`) or a monthly allowance used (`quota_exceeded`); see Retry-After.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
servers:
- url: https://api.meetdarwin.ai/v1
/chat/sessions/{id}:
get:
operationId: getChatSession
summary: Retrieve a chat session and its transcript
tags:
- Chat
description: Requires the `chat:write` scope.
x-darwin-scope: chat:write
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ChatSession'
'400':
description: Invalid request (`invalid_request`, `unsupported_version`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Missing or invalid key (`authentication_required`, `invalid_api_key`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'402':
description: The workspace must add a card before the API can be used (`payment_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: The key lacks the scope (`insufficient_scope`), the feature is off (`feature_disabled`), or the workspace's plan doesn't include it (`plan_required`, with `required_plan`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such object in this workspace (`not_found`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflicts with the current state (`conflict`, `idempotency_key_in_use`), or the change would leave a live agent with no calendar or live form (`goal_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'422':
description: Refused by a rule (`unprocessable`, `idempotency_key_reused`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'429':
description: Rate limited (`rate_limited`) or a monthly allowance used (`quota_exceeded`); see Retry-After.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
servers:
- url: https://api.meetdarwin.ai/v1
/chat/sessions/{id}/messages:
post:
operationId: sendChatMessage
summary: Send the visitor's message and get the agent's reply
tags:
- Chat
description: 'Requires the `chat:write` scope.
With `stream: true` the answer is `text/event-stream` in the AI SDK UI message stream format: `data:` lines with chunks such as `{"type":"text-delta","delta":"…"}`, ending with `data: [DONE]`. A streamed answer is never stored for Idempotency-Key replay.'
x-darwin-scope: chat:write
parameters:
- name: id
in: path
required: true
schema:
type: string
- name: Idempotency-Key
in: header
required: false
description: 'Retry safely: the first response is replayed for 24 hours (not for streamed answers).'
schema:
type: string
maxLength: 255
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatMessageCreate'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ChatReply'
'400':
description: Invalid request (`invalid_request`, `unsupported_version`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Missing or invalid key (`authentication_required`, `invalid_api_key`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'402':
description: The workspace must add a card before the API can be used (`payment_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'403':
description: The key lacks the scope (`insufficient_scope`), the feature is off (`feature_disabled`), or the workspace's plan doesn't include it (`plan_required`, with `required_plan`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'404':
description: No such object in this workspace (`not_found`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'409':
description: Conflicts with the current state (`conflict`, `idempotency_key_in_use`), or the change would leave a live agent with no calendar or live form (`goal_required`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'422':
description: Refused by a rule (`unprocessable`, `idempotency_key_reused`).
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'429':
description: Rate limited (`rate_limited`) or a monthly allowance used (`quota_exceeded`); see Retry-After.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
servers:
- url: https://api.meetdarwin.ai/v1
components:
schemas:
ChatSession:
type: object
properties:
id:
type: string
object:
type: string
const: chat_session
conversation:
type: string
channel:
type: string
status:
type: string
enum:
- open
- handed_off
- booked
created_at:
type:
- string
- 'null'
updated_at:
type:
- string
- 'null'
messages:
type: array
items:
type: object
properties:
id:
type: string
role:
type: string
enum:
- user
- assistant
text:
type: string
created_at:
type:
- string
- 'null'
required:
- id
- role
- text
- created_at
required:
- id
- object
- conversation
- channel
- status
- created_at
- updated_at
- messages
Problem:
type: object
properties:
type:
type: string
example: https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope
title:
type: string
status:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
code:
type: string
example: insufficient_scope
detail:
type: string
param:
type: string
required_plan:
description: 'With `plan_required`: the plan that unlocks what was refused. Upgrade under Billing in the Darwin admin.'
type: string
enum:
- growth
- agency
feature:
description: 'With `plan_required`: the plan feature that was refused, such as `fit_rules`.'
example: fit_rules
type:
- string
- 'null'
upgrade_url:
description: 'With `plan_required`: the Billing page in the Darwin admin where an owner upgrades.'
type: string
request_id:
type: string
example: req_8m2k4p0q1x7z9c3v5b6n
required:
- type
- title
- status
- code
- detail
- request_id
ChatReply:
type: object
properties:
object:
type: string
const: chat_reply
session:
type: string
message:
type: object
properties:
id:
type: string
role:
type: string
enum:
- user
- assistant
text:
type: string
created_at:
type:
- string
- 'null'
required:
- id
- role
- text
- created_at
actions:
type: array
items:
type: object
properties:
type:
type: string
enum:
- booking_offered
- handoff_requested
- searched_knowledge
booking_url:
type:
- string
- 'null'
reason:
type:
- string
- 'null'
required:
- type
description: What the agent did besides answering, so your interface can show a booking button or tell a person.
required:
- object
- session
- message
- actions
ChatSessionCreate:
type: object
properties:
visitor:
type: object
properties:
external_id:
type: string
minLength: 1
maxLength: 200
email:
type: string
maxLength: 320
name:
type: string
maxLength: 160
additionalProperties: false
page_url:
type: string
maxLength: 2000
format: uri
channel:
description: 'Where the conversation happens: app, slack, whatsapp, voice… Default api.'
type: string
pattern: ^[a-z][a-z0-9_-]{0,39}$
context:
description: Facts about the visitor the agent may use, such as plan or seats. Treated as hints, never as instructions.
type: object
propertyNames:
type: string
additionalProperties:
anyOf:
- type: string
maxLength: 500
- type: number
- type: boolean
additionalProperties: false
ChatMessageCreate:
type: object
properties:
text:
type: string
minLength: 1
maxLength: 4000
stream:
description: 'true: answer as server-sent events while the agent writes.'
type: boolean
required:
- text
additionalProperties: false
securitySchemes:
bearer:
type: http
scheme: bearer
description: 'A secret key (dk_live_…). Scopes: conversations:read, contacts:read, contacts:write, meetings:read, analytics:read, events:read, webhooks:write, knowledge:read, knowledge:write, agent:read, agent:write, experiments:read, experiments:write, privacy:write, chat:write.'
x-refined-from:
- meetdarwin-ai-mcp-openapi.json
- meetdarwin-ai-openapi.json