Amigo conversations API
The conversations API from Amigo — 6 operation(s) for conversations.
The conversations API from Amigo — 6 operation(s) for conversations.
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/amigo-conversations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. 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: Platform Conversations API
description: Management API for the Amigo platform. Provides CRUD operations for workspaces, API keys, and resources.
version: 1.0.0
servers:
- url: https://api.platform.amigo.ai
description: Production
security:
- BearerAuth: []
tags:
- name: Conversations
paths:
/v1/{workspace_id}/conversations:
post:
tags:
- Conversations
summary: Create or start a conversation (web inbound, or outbound on a channel)
operationId: create_conversation_v1__workspace_id__conversations_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateConversationRequest'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationDetail'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
/v1/{workspace_id}/conversations/{conversation_id}/channel:
post:
tags:
- Conversations
summary: Switch a conversation to another channel
description: Move an active conversation onto a different channel (sms/imessage today). The durable conversation id is preserved — the same conversation continues; only its routing changes. Optionally dispatch a first agent turn on the new channel.
operationId: switch_conversation_channel_v1__workspace_id__conversations__conversation_id__channel_post
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SwitchChannelRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationDetail'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/conversations/{conversation_id}:
get:
tags:
- Conversations
summary: Get conversation detail (voice or text)
operationId: get_conversation_v1__workspace_id__conversations__conversation_id__get
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
- name: include_tool_calls
in: query
required: false
schema:
type: boolean
description: Include per-turn tool_calls[] in the returned turns. Off by default so the payload stays small and (potentially PHI-bearing) tool output is opt-in, matching POST /turns?include_tool_calls=true.
default: false
title: Include Tool Calls
description: Include per-turn tool_calls[] in the returned turns. Off by default so the payload stays small and (potentially PHI-bearing) tool output is opt-in, matching POST /turns?include_tool_calls=true.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationDetail'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Conversations
summary: Close a conversation
operationId: close_conversation_v1__workspace_id__conversations__conversation_id__delete
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/conversations/{conversation_id}/turns:
post:
tags:
- Conversations
summary: Send a message and get the agent's response
description: 'Send a user message and receive the agent''s response. Set `Accept: text/event-stream` to receive an SSE stream of typed `TurnStreamEvent` frames (token, tool_call_started, tool_call_completed, thinking, message, done, error) instead of the synchronous JSON response. For new integrations prefer `POST /turns/stream`, which is always SSE.'
operationId: create_turn_v1__workspace_id__conversations__conversation_id__turns_post
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
- name: include_tool_calls
in: query
required: false
schema:
type: boolean
description: Include tool call details in response
default: false
title: Include Tool Calls
description: Include tool call details in response
- name: poll
in: query
required: false
schema:
type: boolean
description: Poll for background results without sending a user message. Drains any background tool calls that completed since the last turn and reports them; returns empty output when nothing is pending. Must NOT be combined with a request-body ``message`` (422) or SSE streaming (422). Poll no more than once every ~5s per conversation — each poll loads session state.
default: false
title: Poll
description: Poll for background results without sending a user message. Drains any background tool calls that completed since the last turn and reports them; returns empty output when nothing is pending. Must NOT be combined with a request-body ``message`` (422) or SSE streaming (422). Poll no more than once every ~5s per conversation — each poll loads session state.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TurnRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TurnResponse'
text/event-stream:
schema:
$ref: '#/components/schemas/TurnStreamEvent'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/conversations/{conversation_id}/turns/stream:
post:
tags:
- Conversations
summary: Send a message and receive a streamed agent response
description: Streaming variant of `POST /turns`. Always returns `text/event-stream` regardless of the `Accept` header — no JSON fallback. Each frame is a `TurnStreamEvent` discriminated by the `event` field (token, tool_call_started, tool_call_completed, thinking, message, done, error). Use this endpoint for new integrations; the `Accept`-sniffing variant remains for backward compatibility.
operationId: create_turn_stream_v1__workspace_id__conversations__conversation_id__turns_stream_post
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
- name: include_tool_calls
in: query
required: false
schema:
type: boolean
description: Include tool_call_started / tool_call_completed frames in the stream
default: false
title: Include Tool Calls
description: Include tool_call_started / tool_call_completed frames in the stream
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TurnRequest'
responses:
'200':
description: SSE stream of TurnStreamEvent frames
content:
application/json:
schema: {}
text/event-stream:
schema:
$ref: '#/components/schemas/TurnStreamEvent'
'404':
description: Conversation or service not found
'409':
description: Conversation is closed
'422':
description: Conversation is missing or has corrupt service binding
'503':
description: Agent service unavailable
/v1/{workspace_id}/conversations/{conversation_id}/approval:
post:
tags:
- Conversations
summary: Approve or reject a parked write in your own conversation (external-user…
description: Lets the external user who owns a conversation approve or reject a write that the agent paused for their confirmation. Only the conversation's own external user may call this; it requires the `conversations:approve_own` scope.
operationId: decide_conversation_approval_v1__workspace_id__conversations__conversation_id__approval_post
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: conversation_id
in: path
required: true
schema:
type: string
format: uuid
title: Conversation Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConversationApprovalRequest'
responses:
'204':
description: Successful Response
'403':
description: Not an external_user token, or missing conversations:approve_own scope
'404':
description: Conversation not found or not owned by the caller
'503':
description: Decision store temporarily unavailable — safe to retry
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
BackgroundString:
type: string
maxLength: 10000
ToolCallSpec:
properties:
tool_id:
type: string
title: Tool Id
additional_instruction:
type: string
title: Additional Instruction
default: ''
navigate_on_completion:
type: boolean
title: Navigate On Completion
default: false
progress:
anyOf:
- $ref: '#/components/schemas/ProgressHint'
- type: 'null'
result_persistence:
type: string
enum:
- accumulate
- override
title: Result Persistence
default: accumulate
delivery:
type: string
enum:
- interrupt
- queue
title: Delivery
default: interrupt
failure_delivery:
anyOf:
- type: string
enum:
- interrupt
- queue
- type: 'null'
title: Failure Delivery
failure_delivery_by_class:
anyOf:
- additionalProperties:
type: string
enum:
- interrupt
- queue
propertyNames:
$ref: '#/components/schemas/FailureClass'
type: object
- type: 'null'
title: Failure Delivery By Class
execution:
type: string
enum:
- blocking
- background
title: Execution
default: blocking
lifecycle:
type: string
enum:
- coupled
- independent
title: Lifecycle
default: independent
audio_fillers:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Audio Fillers
audio_filler_triggered_after:
anyOf:
- type: number
- type: 'null'
title: Audio Filler Triggered After
type: object
required:
- tool_id
title: ToolCallSpec
description: A tool call that the agent can make in a state.
TurnToolCallStartedEvent:
properties:
event:
const: tool_call_started
default: tool_call_started
title: Event
type: string
tool_name:
maxLength: 256
title: Tool Name
type: string
call_id:
maxLength: 256
title: Call Id
type: string
input:
title: Input
type: string
required:
- tool_name
- call_id
- input
title: TurnToolCallStartedEvent
type: object
TurnStreamEvent:
discriminator:
mapping:
done: '#/components/schemas/TurnDoneEvent'
error: '#/components/schemas/TurnErrorEvent'
message: '#/components/schemas/TurnMessageEvent'
thinking: '#/components/schemas/TurnThinkingEvent'
token: '#/components/schemas/TurnTokenEvent'
tool_call_completed: '#/components/schemas/TurnToolCallCompletedEvent'
tool_call_started: '#/components/schemas/TurnToolCallStartedEvent'
propertyName: event
oneOf:
- $ref: '#/components/schemas/TurnTokenEvent'
- $ref: '#/components/schemas/TurnToolCallStartedEvent'
- $ref: '#/components/schemas/TurnToolCallCompletedEvent'
- $ref: '#/components/schemas/TurnThinkingEvent'
- $ref: '#/components/schemas/TurnMessageEvent'
- $ref: '#/components/schemas/TurnDoneEvent'
- $ref: '#/components/schemas/TurnErrorEvent'
CollectionField:
properties:
key:
type: string
title: Key
type:
type: string
title: Type
label:
type: string
title: Label
required:
type: boolean
title: Required
default: true
options:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Options
validation:
anyOf:
- type: string
- type: 'null'
title: Validation
ask_prompt:
anyOf:
- type: string
- type: 'null'
title: Ask Prompt
fhir_path:
anyOf:
- type: string
- type: 'null'
title: Fhir Path
type: object
required:
- key
- type
- label
title: CollectionField
description: A single field to collect during a data collection state.
ChannelKind:
type: string
enum:
- voice
- sms
- whatsapp
- email
- web
- imessage
title: ChannelKind
description: 'HSM execution channel type.
Determines how the HSM engine communicates with end users.
Each kind maps to one or more providers.'
CreateConversationRequest:
properties:
service_id:
type: string
format: uuid
title: Service Id
entity_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Entity Id
channel:
$ref: '#/components/schemas/ChannelKind'
default: web
recipient:
anyOf:
- $ref: '#/components/schemas/PhoneE164'
- type: 'null'
description: Destination address for an outbound conversation (E.164 for sms/imessage). Required for non-web.
use_case_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Use Case Id
description: Channel-manager use case the outbound conversation is sent through. Required for non-web; channel-manager resolves the sender (FROM) from it (never caller-supplied). Must be owned by this workspace.
instruction:
anyOf:
- $ref: '#/components/schemas/BackgroundString'
- type: 'null'
description: Optional context steering what the agent opens with on an outbound conversation.
force_new:
type: boolean
title: Force New
description: 'Outbound thread-keyed channels (sms/imessage) only: close any existing ACTIVE conversation on the computed provider thread (recipient + use case) before dispatching, so the opener materializes a brand-new conversation instead of continuing the old thread. Rejected with 422 on channel=web — every web create already starts a new conversation, so force_new is meaningless there.'
default: false
type: object
required:
- service_id
title: CreateConversationRequest
TurnDoneEvent:
properties:
event:
const: done
default: done
title: Event
type: string
conversation_id:
format: uuid
title: Conversation Id
type: string
status:
title: Status
type: string
turn_count:
title: Turn Count
type: integer
background_pending:
default: false
description: True when the streamed response is only an acknowledgement and the final assistant answer must be collected with the durable background-delivery protocol.
title: Background Pending
type: boolean
delivery_protocol_version:
anyOf:
- const: 2
type: integer
- type: 'null'
default: null
description: Version of the durable background-delivery protocol supported by the serving agent. Clients may retry receipt-backed polls only after observing version 2.
title: Delivery Protocol Version
turn_id:
anyOf:
- format: uuid
type: string
- type: 'null'
default: null
description: Identifier of the user exchange this turn belongs to — identical to the ``turn_id`` on the non-streaming ``POST /turns`` response and on this conversation's history turns, so a streaming client can anchor durable per-turn artifacts (e.g. feedback) without a follow-up read. Stamped by platform-api at the proxy boundary (agent-engine frames do not carry it). Null when the conversation has no user exchange yet (a greeting kickoff stream on a fresh conversation).
title: Turn Id
turn_index:
anyOf:
- minimum: 0
type: integer
- type: 'null'
default: null
description: Zero-based ordinal of the user exchange (0 = first user turn). Derived server-side; null exactly when ``turn_id`` is null.
title: Turn Index
required:
- conversation_id
- status
- turn_count
title: TurnDoneEvent
type: object
ConversationDetail:
properties:
id:
type: string
format: uuid
title: Id
channel_kind:
$ref: '#/components/schemas/ChannelKind'
status:
type: string
enum:
- active
- closed
- completed
- in-progress
- failed
- paused
title: Status
lifecycle:
type: string
enum:
- active
- dormant
- closed
title: Lifecycle
entity_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Entity Id
service_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Service Id
direction:
anyOf:
- type: string
- type: 'null'
title: Direction
turn_count:
type: integer
title: Turn Count
default: 0
duration_seconds:
anyOf:
- type: number
- type: 'null'
title: Duration Seconds
created_at:
type: string
title: Created At
updated_at:
type: string
title: Updated At
call_sid:
anyOf:
- type: string
- type: 'null'
title: Call Sid
caller_id:
anyOf:
- type: string
- type: 'null'
title: Caller Id
phone_number:
anyOf:
- type: string
- type: 'null'
title: Phone Number
quality_score:
anyOf:
- type: number
- type: 'null'
title: Quality Score
has_recording:
anyOf:
- type: boolean
- type: 'null'
title: Has Recording
completion_reason:
anyOf:
- type: string
- type: 'null'
title: Completion Reason
escalation_status:
anyOf:
- type: string
- type: 'null'
title: Escalation Status
final_state:
anyOf:
- type: string
- type: 'null'
title: Final State
source:
anyOf:
- type: string
- type: 'null'
title: Source
turns:
items:
$ref: '#/components/schemas/ConversationTurn'
type: array
title: Turns
default: []
plan:
anyOf:
- type: string
- type: 'null'
title: Plan
voice:
anyOf:
- $ref: '#/components/schemas/VoiceDetail'
- type: 'null'
type: object
required:
- id
- channel_kind
- status
- lifecycle
- created_at
- updated_at
title: ConversationDetail
TurnThinkingEvent:
properties:
event:
const: thinking
default: thinking
title: Event
type: string
tier:
title: Tier
type: integer
tier_name:
title: Tier Name
type: string
required:
- tier
- tier_name
title: TurnThinkingEvent
type: object
TurnErrorEvent:
description: 'Terminal error frame on the turn stream.
Carries a stable ``code`` so SDK consumers can branch deterministically
without parsing free-form ``message`` text. ``retryable`` tells the
consumer whether issuing the same turn again is likely to succeed.
``status_code`` is the upstream HTTP status when the error originated
from a downstream service (agent-engine), and is otherwise omitted.'
properties:
event:
const: error
default: error
title: Event
type: string
message:
title: Message
type: string
code:
default: unknown
enum:
- upstream_error
- stream_interrupted
- client_error
- unknown
title: Code
type: string
retryable:
default: false
title: Retryable
type: boolean
status_code:
anyOf:
- type: integer
- type: 'null'
default: null
title: Status Code
required:
- message
title: TurnErrorEvent
type: object
ContentPartPayload:
properties:
type:
type: string
maxLength: 64
minLength: 1
pattern: ^[a-z][a-z0-9._-]*$
title: Type
default: text
text:
anyOf:
- type: string
maxLength: 10000
- type: 'null'
title: Text
url:
anyOf:
- type: string
maxLength: 2048
- type: 'null'
title: Url
media_type:
anyOf:
- type: string
maxLength: 128
- type: 'null'
title: Media Type
provider_id:
anyOf:
- type: string
maxLength: 256
- type: 'null'
title: Provider Id
metadata:
additionalProperties: true
type: object
maxProperties: 50
title: Metadata
type: object
title: ContentPartPayload
description: HTTP/WebSocket shape for a modality-neutral conversation content part.
TurnResponse:
properties:
turn_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Turn Id
description: 'Identifier of the user exchange this turn created — or, for ``poll=true`` and greeting-kickoff turns (empty ``message``), the latest exchange the returned messages attach to. Deterministic: matches the ``turn_id`` on this conversation''s history turns, so it can anchor durable per-turn artifacts (e.g. feedback) across page reloads. Null only when the conversation has no user exchange yet (a poll or kickoff before the first user message).'
input:
$ref: '#/components/schemas/ConversationTurn'
output:
items:
$ref: '#/components/schemas/ConversationTurn'
type: array
title: Output
tool_calls:
items:
$ref: '#/components/schemas/ConversationToolCallDetail'
type: array
title: Tool Calls
default: []
conversation:
$ref: '#/components/schemas/TurnConversationSnapshot'
background_pending:
type: boolean
title: Background Pending
description: 'Whether this turn''s ``output`` is the final answer, or only an acknowledgement that
work is still running in the background.
``false`` (default): ``output`` is the complete agent response for this turn.
``true``: a tool crossed the server''s blocking window and was handed to a background
task, so ``output`` is NOT the final answer — the definitive assistant answer is
produced later, out-of-band. It is **durable on the conversation**: drain it by
re-issuing ``POST …/turns`` with ``poll=true`` (a no-message drain-and-report), by
sending the next user turn, or by reading the conversation back
(``GET …/conversations/{id}``). This is the per-conversation delivery contract — see
the web-integration paved path. (The workspace observer bus,
``GET /v1/{workspace_id}/events/stream``, mirrors this activity as ``text.agent_message``
/ ``text.tool_started`` / ``text.background_result`` for *dashboards* watching many
conversations, but is not the per-chat delivery path.) A client that treats a
``background_pending=true`` turn as complete without draining will miss the final answer.'
default: false
type: object
required:
- turn_id
- input
- output
- conversation
title: TurnResponse
VoiceDetail:
properties:
recording_path:
anyOf:
- type: string
- type: 'null'
title: Recording Path
twilio_recording_sid:
anyOf:
- type: string
- type: 'null'
title: Twilio Recording Sid
twilio_recording_duration:
anyOf:
- type: number
- type: 'null'
title: Twilio Recording Duration
has_recording:
type: boolean
title: Has Recording
default: false
verified_transcript:
anyOf:
- type: string
- type: 'null'
title: Verified Transcript
transcript_accuracy:
anyOf:
- type: number
- type: 'null'
title: Transcript Accuracy
emotional_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Emotional Summary
barge_in_events:
items:
additionalProperties: true
type: object
type: array
title: Barge In Events
default: []
states_visited:
items:
type: string
type: array
title: States Visited
default: []
participants:
items:
additionalProperties: true
type: object
type: array
title: Participants
default: []
config:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Config
call_analysis:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Call Analysis
forwarding:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Forwarding
escalation:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Escalation
safety:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Safety
quality_breakdown:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Quality Breakdown
risk_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Risk Summary
latency_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Latency Summary
conversation_metrics:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Conversation Metrics
tool_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Tool Summary
safety_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Safety Summary
operator_summary:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Operator Summary
type: object
title: VoiceDetail
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
NameString:
type: string
maxLength: 256
# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amigo/refs/heads/main/openapi/amigo-conversations-api-openapi.yml