Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage Telnyx Missions — automated workflows, tasks, and sub-resources for AI-driven telecom operations. This skill provides REST API (curl) examples.
.claude/skills/team-telnyx-telnyx-missions-curl/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 633% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 513% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 440% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 480% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 480% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
text# curl is pre-installed on macOS, Linux, and Windows 10+
bashexport TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use $TELNYX_API_KEY for authentication.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
bash# Check HTTP status code in response response=$(curl -s -w "\n%{http_code}" \ -X POST "https://api.telnyx.com/v2/messages" \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"to": "+13125550001", "from": "+13125550002", "text": "Hello"}') http_code=$(echo "$response" | tail -1) body=$(echo "$response" | sed '$d') case $http_code in 2*) echo "Success: $body" ;; 422) echo "Validation error — check required fields and formats" ;; 429) echo "Rate limited — retry after delay"; sleep 1 ;; 401) echo "Authentication failed — check TELNYX_API_KEY" ;; *) echo "Error $http_code: $body" ;; esac
Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).
page[number] and page[size] query parameters to navigate pages. Check meta.total_pages in the response.List all missions for the organization
GET /ai/missions
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions"
Returns: created_at (date-time), description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), mission_id (uuid), model (string), name (string), updated_at (date-time)
Create a new mission definition
POST /ai/missions — Required: name
Optional: description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), model (string)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "my-resource" }' \ "https://api.telnyx.com/v2/ai/missions"
Returns: created_at (date-time), description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), mission_id (uuid), model (string), name (string), updated_at (date-time)
List recent events across all missions
GET /ai/missions/events
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/events"
Returns: agent_id (string), event_id (string), idempotency_key (string), payload (object), run_id (string), step_id (string), summary (string), timestamp (date-time), type (enum: status_change, step_started, step_completed, step_failed, tool_call, tool_result, message, error, custom)
List recent runs across all missions
GET /ai/missions/runs
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/runs"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Get a mission by ID (includes tools, knowledge_bases, mcp_servers)
GET /ai/missions/{mission_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}"
Returns: created_at (date-time), description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), mission_id (uuid), model (string), name (string), updated_at (date-time)
Update a mission definition
PUT /ai/missions/{mission_id}
Optional: description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), model (string), name (string)
bashcurl \ -X PUT \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}"
Returns: created_at (date-time), description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), mission_id (uuid), model (string), name (string), updated_at (date-time)
Delete a mission
DELETE /ai/missions/{mission_id}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}"
Clone an existing mission
POST /ai/missions/{mission_id}/clone
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/clone"
List all knowledge bases for a mission
GET /ai/missions/{mission_id}/knowledge-bases
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases"
Create a new knowledge base for a mission
POST /ai/missions/{mission_id}/knowledge-bases
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases"
Get a specific knowledge base by ID
GET /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}"
Update a knowledge base definition
PUT /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
bashcurl \ -X PUT \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}"
Delete a knowledge base from a mission
DELETE /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}"
List all MCP servers for a mission
GET /ai/missions/{mission_id}/mcp-servers
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers"
Create a new MCP server for a mission
POST /ai/missions/{mission_id}/mcp-servers
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers"
Get a specific MCP server by ID
GET /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers/{mcp_server_id}"
Update an MCP server definition
PUT /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
bashcurl \ -X PUT \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers/{mcp_server_id}"
Delete an MCP server from a mission
DELETE /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers/{mcp_server_id}"
List all runs for a specific mission
GET /ai/missions/{mission_id}/runs
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Start a new run for a mission
POST /ai/missions/{mission_id}/runs
Optional: input (object), metadata (object)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Get details of a specific run
GET /ai/missions/{mission_id}/runs/{run_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Update run status and/or result
PATCH /ai/missions/{mission_id}/runs/{run_id}
Optional: error (string), metadata (object), result_payload (object), result_summary (string), status (enum: pending, running, paused, succeeded, failed, cancelled)
bashcurl \ -X PATCH \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Cancel a running or paused run
POST /ai/missions/{mission_id}/runs/{run_id}/cancel
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/cancel"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
List events for a run (paginated)
GET /ai/missions/{mission_id}/runs/{run_id}/events
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/events"
Returns: agent_id (string), event_id (string), idempotency_key (string), payload (object), run_id (string), step_id (string), summary (string), timestamp (date-time), type (enum: status_change, step_started, step_completed, step_failed, tool_call, tool_result, message, error, custom)
Log an event for a run
POST /ai/missions/{mission_id}/runs/{run_id}/events — Required: type, summary
Optional: agent_id (string), idempotency_key (string), payload (object), step_id (string)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "status_change", "summary": "Brief task summary" }' \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/events"
Returns: agent_id (string), event_id (string), idempotency_key (string), payload (object), run_id (string), step_id (string), summary (string), timestamp (date-time), type (enum: status_change, step_started, step_completed, step_failed, tool_call, tool_result, message, error, custom)
Get details of a specific event
GET /ai/missions/{mission_id}/runs/{run_id}/events/{event_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/events/{event_id}"
Returns: agent_id (string), event_id (string), idempotency_key (string), payload (object), run_id (string), step_id (string), summary (string), timestamp (date-time), type (enum: status_change, step_started, step_completed, step_failed, tool_call, tool_result, message, error, custom)
Pause a running run
POST /ai/missions/{mission_id}/runs/{run_id}/pause
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/pause"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
Get the plan (all steps) for a run
GET /ai/missions/{mission_id}/runs/{run_id}/plan
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/plan"
Returns: completed_at (date-time), description (string), metadata (object), parent_step_id (string), run_id (uuid), sequence (integer), started_at (date-time), status (enum: pending, in_progress, completed, skipped, failed), step_id (string)
Create the initial plan for a run
POST /ai/missions/{mission_id}/runs/{run_id}/plan — Required: steps
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "steps": [ "Initiate the task" ] }' \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/plan"
Returns: completed_at (date-time), description (string), metadata (object), parent_step_id (string), run_id (uuid), sequence (integer), started_at (date-time), status (enum: pending, in_progress, completed, skipped, failed), step_id (string)
Add one or more steps to an existing plan
POST /ai/missions/{mission_id}/runs/{run_id}/plan/steps — Required: steps
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "steps": [ "Initiate the task" ] }' \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/plan/steps"
Returns: completed_at (date-time), description (string), metadata (object), parent_step_id (string), run_id (uuid), sequence (integer), started_at (date-time), status (enum: pending, in_progress, completed, skipped, failed), step_id (string)
Get details of a specific plan step
GET /ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}"
Returns: completed_at (date-time), description (string), metadata (object), parent_step_id (string), run_id (uuid), sequence (integer), started_at (date-time), status (enum: pending, in_progress, completed, skipped, failed), step_id (string)
Update the status of a plan step
PATCH /ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}
Optional: metadata (object), status (enum: pending, in_progress, completed, skipped, failed)
bashcurl \ -X PATCH \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}"
Returns: completed_at (date-time), description (string), metadata (object), parent_step_id (string), run_id (uuid), sequence (integer), started_at (date-time), status (enum: pending, in_progress, completed, skipped, failed), step_id (string)
Resume a paused run
POST /ai/missions/{mission_id}/runs/{run_id}/resume
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/resume"
Returns: error (string), finished_at (date-time), input (object), metadata (object), mission_id (uuid), result_payload (object), result_summary (string), run_id (uuid), started_at (date-time), status (enum: pending, running, paused, succeeded, failed, cancelled), updated_at (date-time)
List all Telnyx agents linked to a run
GET /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/telnyx-agents"
Returns: created_at (date-time), run_id (string), telnyx_agent_id (string)
Link a Telnyx AI agent (voice/messaging) to a run
POST /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents — Required: telnyx_agent_id
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "telnyx_agent_id": "550e8400-e29b-41d4-a716-446655440000" }' \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/telnyx-agents"
Returns: created_at (date-time), run_id (string), telnyx_agent_id (string)
Unlink a Telnyx agent from a run
DELETE /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents/{telnyx_agent_id}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/runs/{run_id}/telnyx-agents/{telnyx_agent_id}"
List all tools for a mission
GET /ai/missions/{mission_id}/tools
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools"
Create a new tool for a mission
POST /ai/missions/{mission_id}/tools
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools"
Get a specific tool by ID
GET /ai/missions/{mission_id}/tools/{tool_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools/{tool_id}"
Update a tool definition
PUT /ai/missions/{mission_id}/tools/{tool_id}
bashcurl \ -X PUT \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools/{tool_id}"
Delete a tool from a mission
DELETE /ai/missions/{mission_id}/tools/{tool_id}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools/{tool_id}"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 5,337 | 2,917 | -45% | 1 | 1 | 0% | 1,002 | 7,340 | +633% | 0 | 0 | — |
case-02 | fail→pass | 6,217 | 2,776 | -55% | 1 | 1 | 0% | 1,196 | 7,335 | +513% | 0 | 0 | — |
case-03 | fail→pass | 7,265 | 3,268 | -55% | 1 | 1 | 0% | 1,377 | 7,434 | +440% | 0 | 0 | — |
case-04 | fail→pass | 7,596 | 1,911 | -75% | 1 | 1 | 0% | 1,218 | 7,063 | +480% | 0 | 0 | — |
case-05 | fail→pass | 6,753 | 2,116 | -69% | 1 | 1 | 0% | 1,235 | 7,163 | +480% | 0 | 0 | — |
case-06 | fail→pass | 5,322 | 3,413 | -36% | 1 | 1 | 0% | 1,086 | 7,531 | +593% | 0 | 0 | — |
case-07 | fail→pass | 6,793 | 2,610 | -62% | 1 | 1 | 0% | 1,262 | 7,340 | +482% | 0 | 0 | — |
case-08 | fail→pass | 5,091 | 2,961 | -42% | 1 | 1 | 0% | 901 | 7,406 | +722% | 0 | 0 | — |
case-09 | fail→pass | 7,169 | 2,596 | -64% | 1 | 1 | 0% | 1,212 | 7,271 | +500% | 0 | 0 | — |
case-10 | fail→pass | 6,050 | 3,095 | -49% | 1 | 1 | 0% | 1,064 | 7,416 | +597% | 0 | 0 | — |
case-11 | fail→pass | 5,897 | 4,152 | -30% | 1 | 1 | 0% | 1,083 | 7,639 | +605% | 0 | 0 | — |
case-12 | fail→pass | 8,383 | 3,152 | -62% | 1 | 1 | 0% | 1,415 | 7,430 | +425% | 0 | 0 | — |
case-18 | fail→pass | 4,184 | 1,901 | -55% | 1 | 1 | 0% | 688 | 7,104 | +933% | 0 | 0 | — |
case-13 | fail→pass | 5,577 | 2,291 | -59% | 1 | 1 | 0% | 972 | 7,191 | +640% | 0 | 0 | — |
case-14 | fail→pass | 7,290 | 2,312 | -68% | 1 | 1 | 0% | 1,289 | 7,214 | +460% | 0 | 0 | — |
case-15 | fail→pass | 8,168 | 3,001 | -63% | 1 | 1 | 0% | 1,612 | 7,335 | +355% | 0 | 0 | — |
case-16 | fail→pass | 5,019 | 2,160 | -57% | 1 | 1 | 0% | 810 | 7,197 | +789% | 0 | 0 | — |
case-17 | fail→pass | 5,607 | 2,337 | -58% | 1 | 1 | 0% | 993 | 7,245 | +630% | 0 | 0 | — |
case-19 | fail→pass | 4,144 | 2,328 | -44% | 1 | 1 | 0% | 714 | 7,216 | +911% | 0 | 0 | — |
case-20 | pass→pass | 3,340 | 2,741 | -18% | 1 | 1 | 0% | 726 | 7,313 | +907% | 0 | 0 | — |
case-21 | pass→pass | 3,898 | 3,887 | -0% | 1 | 1 | 0% | 803 | 7,588 | +845% | 0 | 0 | — |
case-22 | pass→pass | 10,095 | 6,216 | -38% | 1 | 1 | 0% | 1,961 | 7,938 | +305% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +86 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.