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.
openapi: 3.2.0
info:
title: Amigo Account Conversations API
version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
Bearer-Authorization-Organization: []
Basic: []
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 self-approval)
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:
ExitCondition:
properties:
description:
type: string
title: Description
next_state:
type: string
title: Next State
filler_hint:
anyOf:
- type: string
- type: 'null'
title: Filler Hint
type: object
required:
- description
- next_state
title: ExitCondition
ConversationToolCallDetail:
properties:
tool_name:
type: string
title: Tool Name
call_id:
type: string
title: Call Id
input:
additionalProperties: true
type: object
title: Input
result:
type: string
title: Result
default: ''
succeeded:
type: boolean
title: Succeeded
default: true
duration_ms:
anyOf:
- type: number
maximum: 3600000.0
minimum: 0.0
- type: 'null'
title: Duration Ms
description: Wall-clock tool execution time in milliseconds, measured at the engage_step call site. Omitted (null) on legacy turns that did not capture timing.
error_message:
anyOf:
- type: string
- type: 'null'
title: Error Message
description: Failure detail recorded for the tool call when ``succeeded`` is false. Null on successful calls or when no message was captured.
type: object
required:
- tool_name
- call_id
title: ConversationToolCallDetail
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
DecisionState-Output:
properties:
type:
type: string
const: decision
title: Type
name:
type: string
title: Name
objective:
type: string
title: Objective
exit_conditions:
items:
$ref: '#/components/schemas/ExitCondition'
type: array
title: Exit Conditions
decision_guidelines:
items:
type: string
type: array
title: Decision Guidelines
default: []
tool_call_specs:
items:
$ref: '#/components/schemas/ToolCallSpec'
type: array
title: Tool Call Specs
default: []
wait_for:
anyOf:
- type: string
enum:
- surface_submission
- human_approval
- type: 'null'
title: Wait For
guardrails:
items:
$ref: '#/components/schemas/Guardrail'
type: array
title: Guardrails
default: []
channel_overrides:
additionalProperties:
$ref: '#/components/schemas/ChannelOverride'
type: object
title: Channel Overrides
turn_policy:
anyOf:
- $ref: '#/components/schemas/TurnPolicy'
- type: 'null'
type: object
required:
- type
- name
- objective
- exit_conditions
title: DecisionState
description: Passthrough routing state — Agent picks an exit condition, no user interaction.
TurnConversationSnapshot:
properties:
id:
type: string
format: uuid
title: Id
status:
type: string
enum:
- active
- closed
- completed
- in-progress
- failed
- paused
title: Status
turn_count:
type: integer
title: Turn Count
default: 0
updated_at:
type: string
title: Updated At
context_graph_state:
anyOf:
- $ref: '#/components/schemas/ContextGraphState-Output'
- type: 'null'
type: object
required:
- id
- status
- updated_at
title: TurnConversationSnapshot
ConversationTurnAvailableAction:
properties:
description:
type: string
title: Description
description: Human-readable description of an action available in the turn's state.
type: object
required:
- description
title: ConversationTurnAvailableAction
ConversationTurn:
properties:
turn_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Turn Id
description: Stable identifier of the user exchange this message belongs to, derived deterministically from (conversation_id, turn_index) — identical across ``POST /turns`` responses and re-reads of the conversation history. User and agent messages from the same exchange share this value. Null on messages that precede the first user turn (proactive greetings, channel-event preludes).
turn_index:
anyOf:
- type: integer
minimum: 0.0
- type: 'null'
title: Turn Index
description: Zero-based ordinal of the user exchange this message belongs to (0 = first user turn). Derived server-side from the conversation's user-turn count — never stored. Null exactly when ``turn_id`` is null.
role:
type: string
enum:
- agent
- user
- system
title: Role
text:
type: string
title: Text
timestamp:
anyOf:
- type: string
- type: 'null'
title: Timestamp
channel:
anyOf:
- $ref: '#/components/schemas/ChannelKind'
- type: 'null'
description: Channel this turn occurred on. A conversation that switched channels has a self-describing per-turn history; null on turns written before per-turn attribution or on channel-less internal turns.
content:
items:
$ref: '#/components/schemas/ContentPartPayload'
type: array
title: Content
default: []
tool_calls:
items:
$ref: '#/components/schemas/ConversationToolCallDetail'
type: array
title: Tool Calls
description: Tool calls executed during this (agent) turn. Populated only when the request opts in via ``include_tool_calls=true``; empty otherwise and on turns that did not invoke tools.
default: []
selected_action_description:
anyOf:
- type: string
- type: 'null'
title: Selected Action Description
description: Description of the context-graph action selected for this turn. Null means no action was selected or no selected action was recorded.
state_transition:
anyOf:
- $ref: '#/components/schemas/ConversationTurnStateTransition'
- type: 'null'
description: 'Context-graph state transition that occurred during this turn. Null means no transition took place or no transition was recorded. Deprecated: use state_transitions instead. If multiple transitions were recorded, this field reports the first source state and final destination state.'
deprecated: true
state_transitions:
items:
$ref: '#/components/schemas/ConversationTurnStateTransition'
type: array
title: State Transitions
description: Ordered context-graph state transitions that occurred during this turn.
default: []
available_actions:
items:
$ref: '#/components/schemas/ConversationTurnAvailableAction'
type: array
title: Available Actions
description: Action choices available in the turn's resolved context-graph state. Empty when actions cannot be resolved or the resolved state is not an action state.
default: []
type: object
required:
- role
- text
title: ConversationTurn
PhoneE164:
type: string
maxLength: 16
minLength: 2
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
TurnTokenEvent:
properties:
event:
const: token
default: token
title: Event
type: string
text:
title: Text
type: string
required:
- text
title: TurnTokenEvent
type: object
ProgressHint:
properties:
deterministic:
type: boolean
title: Deterministic
default: false
phrases:
anyOf:
- items:
type: string
type: array
maxItems: 10
minItems: 1
description: 'Filler phrases. deterministic=true: played verbatim in order. deterministic=false: used as hints for early attempts.'
- type: 'null'
title: Phrases
trigger_delay_ms:
anyOf:
- type: integer
maximum: 30000.0
minimum: 0.0
- type: 'null'
title: Trigger Delay Ms
interval_ms:
anyOf:
- type: integer
maximum: 30000.0
minimum: 100.0
- type: 'null'
title: Interval Ms
mode:
type: string
enum:
- auto
- silent
- backchannel
- verbal
title: Mode
default: auto
progress_class:
anyOf:
- type: string
enum:
- lookup
- write
- external_call
- compute
- multi_step
- type: 'null'
title: Progress Class
expected_latency_ms:
anyOf:
- type: integer
maximum: 60000.0
minimum: 0.0
- type: 'null'
title: Expected Latency Ms
custom_phrase:
anyOf:
- type: string
maxLength: 500
description: 'Legacy: use phrases instead.'
- type: 'null'
title: Custom Phrase
additionalProperties: false
type: object
title: ProgressHint
description: 'How the agent narrates waiting on a tool.
``deterministic=true``: scripted — ``phrases`` play verbatim in order.
``deterministic=false``: engine picks — ``phrases`` are hints.
``trigger_delay_ms``: milliseconds before first filler (0 = immediate).
``interval_ms``: milliseconds between subsequent fillers.'
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.'
NameString:
type: string
maxLength: 256
minLength: 1
BackgroundString:
type: string
maxLength: 10000
SwitchChannelRequest:
properties:
channel:
$ref: '#/components/schemas/ChannelKind'
description: Target channel to move the conversation to (sms or imessage).
recipient:
anyOf:
- $ref: '#/components/schemas/PhoneE164'
- type: 'null'
description: Recipient address on the new channel (E.164). Required for sms/imessage.
use_case_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Use Case Id
description: Channel-manager use case for the new channel (resolves the sender). Required for sms/imessage.
reason:
$ref: '#/components/schemas/NameString'
description: Why the conversation is being moved (e.g. escalation, customer_request).
dispatch_opener:
type: boolean
title: Dispatch Opener
description: If true, immediately drive one agent turn on the new channel (e.g. 'I'll text you now').
default: false
instruction:
anyOf:
- $ref: '#/components/schemas/BackgroundString'
- type: 'null'
description: Optional context steering the opener when dispatch_opener=true.
type: object
required:
- channel
- reason
title: SwitchChannelRequest
TurnPolicy:
properties:
barge_in_enabled:
type: boolean
title: Barge In Enabled
default: true
greeting_shield_s:
type: number
title: Greeting Shield S
default: 0.0
safety_response:
type: string
enum:
- suspend_forward
- stay_empathize
- alert
title: Safety Response
default: stay_empathize
context_strategy:
type: string
enum:
- full
- compact
title: Context Strategy
default: full
degradation_threshold:
type: integer
minimum: -1.0
title: Degradation Threshold
default: -1
block_forward_call:
type: boolean
title: Block Forward Call
default: false
block_forward_call_after_turns:
type: integer
minimum: -1.0
title: Block Forward Call After Turns
default: -1
stt_eot_threshold:
anyOf:
- type: number
- type: 'null'
title: Stt Eot Threshold
stt_eager_eot_threshold:
anyOf:
- type: number
- type: 'null'
title: Stt Eager Eot Threshold
stt_eot_timeout_ms:
anyOf:
- type: integer
- type: 'null'
title: Stt Eot Timeout Ms
type: object
title: TurnPolicy
description: 'Voice pipeline parameters declared per HSM state.
Lives on ActionState/DecisionState alongside guardrails, wait_for, and
channel_overrides. The HSM state IS the policy — no shadow state machine.
All fields optional with safe defaults (production behavior unchanged
when no turn_policy is set).'
TurnToolCallCompletedEvent:
properties:
event:
const: tool_call_completed
default: tool_call_completed
title: Event
type: string
tool_name:
maxLength: 256
title: Tool Name
type: string
call_id:
maxLength: 256
title: Call Id
type: string
result:
title: Result
type: string
succeeded:
title: Succeeded
type: boolean
duration_ms:
anyOf:
- maximum: 3600000.0
minimum: 0.0
type: number
- type: 'null'
default: null
description: Wall-clock tool execution time in milliseconds, measured at the engage_step call site. Null when the upstream did not report timing (legacy/test paths).
title: Duration Ms
required:
- tool_name
- call_id
- result
- succeeded
title: TurnToolCallCompletedEvent
type: object
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.
Guardrail:
properties:
name:
type: string
maxLength: 128
title: Name
description:
type: string
maxLength: 1000
title: Description
enforcement:
type: string
enum:
- hard
- soft
title: Enforcement
default: hard
type: object
required:
- name
- description
title: Guardrail
description: Typed safety rule enforced per-state (not just global freetext guidelines).
ConversationTurnStateTransition:
properties:
from:
type: string
title: From
description: Source context-graph state before the turn's state transition.
to:
type: string
title: To
description: Destination context-graph state after the turn's state transition.
type: object
required:
- from
- to
title: ConversationTurnStateTransition
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: t
# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amigo/refs/heads/main/openapi/amigo-conversations-api-openapi.yml