Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.
中文简介正在准备中。当前显示原文说明。
Create and manage Telnyx Missions — automated workflows, tasks, and sub-resources for AI-driven telecom operations. This skill provides REST API (curl) examples.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
# curl is pre-installed on macOS, Linux, and Windows 10+
export 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:
# 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.Returns a paginated list of all mission definitions in your organization. Missions describe a goal and the tools, knowledge bases, and MCP servers agents may use to accomplish it.
GET /ai/missions
curl -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)
Creates a new mission definition from the provided configuration and returns the created mission. Execute the mission by starting runs against it.
POST /ai/missions — Required: name
Optional: description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), model (string)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Name",
"description": "Description",
"model": "Model",
"instructions": "Instructions",
"execution_mode": "external"
}' \
"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)
Returns a paginated list of recent events across every mission in your organization, optionally filtered by event type. Useful for building activity feeds or monitoring dashboards.
GET /ai/missions/events
curl -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)
Returns a paginated list of recent runs across every mission in your organization, optionally filtered by run status. Useful for monitoring overall mission activity without querying each mission individually.
GET /ai/missions/runs
curl -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}
curl -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)
Replaces the specified mission's definition with the provided configuration and returns the updated mission.
PUT /ai/missions/{mission_id}
Optional: description (string), execution_mode (enum: external, managed), instructions (string), metadata (object), model (string), name (string)
curl \
-X PUT \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Name",
"description": "Description",
"model": "Model",
"instructions": "Instructions",
"execution_mode": "external"
}' \
"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)
Permanently deletes the specified mission definition and returns no content on success.
DELETE /ai/missions/{mission_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}"
Creates a copy of the specified mission as a new mission definition, so you can iterate on its configuration without modifying the original.
POST /ai/missions/{mission_id}/clone
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/clone"
Returns the knowledge bases attached to the specified mission. Knowledge bases provide reference content agents can draw on during runs.
GET /ai/missions/{mission_id}/knowledge-bases
curl -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
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases"
Returns the details of a single knowledge base attached to the specified mission.
GET /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}"
Replaces the definition of the specified knowledge base on this mission.
PUT /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
curl \
-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}"
Detaches the specified knowledge base from the mission so its content is no longer available to agents in subsequent runs.
DELETE /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}"
Returns the MCP servers configured on the specified mission. MCP servers expose external tools and data sources agents can use during runs.
GET /ai/missions/{mission_id}/mcp-servers
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers"
Adds an MCP server to the specified mission, making the server's tools available to agents during runs of this mission.
POST /ai/missions/{mission_id}/mcp-servers
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers"
Returns the configuration of a single MCP server attached to the specified mission.
GET /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers/{mcp_server_id}"
Replaces the configuration of the specified MCP server on this mission.
PUT /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
curl \
-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}"
Removes the specified MCP server from the mission, revoking agent access to its tools in subsequent runs.
DELETE /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/mcp-servers/{mcp_server_id}"
Returns a paginated list of runs for the specified mission, optionally filtered by run status, so you can track the mission's execution history over time.
GET /ai/missions/{mission_id}/runs
curl -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)
Starts a new run of the specified mission and returns the created run object. Track its progress through the run detail, plan, and events endpoints.
POST /ai/missions/{mission_id}/runs
Optional: input (object), metadata (object)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"objective": "Summarize yesterday's failed call attempts"
},
"metadata": {
"requested_by": "docs-example"
}
}' \
"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)
Returns the full details of a single run, including its current status. Use this to poll an in-flight run or inspect the outcome of a completed one.
GET /ai/missions/{mission_id}/runs/{run_id}
curl -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)
Updates a run's status and/or result and returns the updated run object. Typically used by executing agents to report progress or record the final outcome.
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)
curl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "succeeded",
"result_summary": "Processed 24 customer records successfully."
}' \
"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)
Cancels a running or paused run and returns the updated run object. A cancelled run stops executing; start a new run to execute the mission again.
POST /ai/missions/{mission_id}/runs/{run_id}/cancel
curl \
-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)
Returns a paginated list of events logged for the specified run, filterable by event type, plan step, and agent, so you can reconstruct exactly what happened during execution.
GET /ai/missions/{mission_id}/runs/{run_id}/events
curl -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)
Logs a new event against the specified run and returns the created event. Events form the run's audit trail and can reference a plan step or agent.
POST /ai/missions/{mission_id}/runs/{run_id}/events — Required: type, summary
Optional: agent_id (string), idempotency_key (string), payload (object), step_id (string)
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "status_change",
"summary": "Summary",
"step_id": "Step Id",
"agent_id": "Agent Id",
"idempotency_key": "Idempotency 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)
Returns the details of a single event logged for the specified run, including its type and payload.
GET /ai/missions/{mission_id}/runs/{run_id}/events/{event_id}
curl -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)
Pauses a currently running run and returns the updated run object. Execution halts until the run is resumed.
POST /ai/missions/{mission_id}/runs/{run_id}/pause
curl \
-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)
Returns the plan for the specified run, including all plan steps and their statuses, so you can see how the mission was decomposed and how far execution has progressed.
GET /ai/missions/{mission_id}/runs/{run_id}/plan
curl -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)
Creates the initial plan for the specified run from the provided steps and returns the created plan steps. Progress is subsequently reported by updating individual steps.
POST /ai/missions/{mission_id}/runs/{run_id}/plan — Required: steps
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{
"step_id": "Step Id",
"description": "Description",
"sequence": 0,
"parent_step_id": "Parent Step Id"
}
]
}' \
"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
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{
"step_id": "Step Id",
"description": "Description",
"sequence": 0,
"parent_step_id": "Parent Step Id"
}
]
}' \
"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)
Returns the details of a single plan step within a run's plan, including its status.
GET /ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}
curl -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)
Updates the status of a single plan step and returns the updated step. Typically called by the executing agent as it works through the plan.
PATCH /ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}
Optional: metadata (object), status (enum: pending, in_progress, completed, skipped, failed)
curl \
-X PATCH \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "pending"
}' \
"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)
Resumes a previously paused run and returns the updated run object, letting execution continue from where it was paused.
POST /ai/missions/{mission_id}/runs/{run_id}/resume
curl \
-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)
Returns the Telnyx agents currently linked to the specified run. Linked agents participate in executing the run's plan.
GET /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents
curl -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
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"telnyx_agent_id": "Telnyx Agent Id"
}' \
"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)
Unlinks the specified Telnyx agent from the run so it no longer participates in execution. The run itself and its history are unaffected.
DELETE /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents/{telnyx_agent_id}
curl \
-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}"
Returns the tools configured on the specified mission. Tools define the actions agents may invoke while executing the mission's runs.
GET /ai/missions/{mission_id}/tools
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools"
Adds a new tool to the specified mission, defining an action agents can invoke during runs of this mission.
POST /ai/missions/{mission_id}/tools
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/tools"
Returns the definition of a single tool configured on the specified mission.
GET /ai/missions/{mission_id}/tools/{tool_id}
curl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/ai/missions/{mission_id}/tools/{tool_id}"
Replaces the definition of the specified tool on this mission.
PUT /ai/missions/{mission_id}/tools/{tool_id}
curl \
-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}"
Removes the specified tool from the mission so agents can no longer invoke it in subsequent runs.
DELETE /ai/missions/{mission_id}/tools/{tool_id}
curl \
-X DELETE \
-H "Authorization: Bearer $TELNYX_API_KEY" \
"https://api.telnyx.com/v2/ai/missions/{mission_id}/tools/{tool_id}"
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Test VoIP push notifications for Telnyx WebRTC iOS (APNs) and Android (FCM) apps. Use when debugging push notification delivery, validating certificate/credential setup, or testing that a device receives VoIP pushes correctly.
中文简介正在准备中。当前显示原文说明。
10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.
中文简介正在准备中。当前显示原文说明。
10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.
中文简介正在准备中。当前显示原文说明。
10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.
中文简介正在准备中。当前显示原文说明。
10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.
中文简介正在准备中。当前显示原文说明。
10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.
中文简介正在准备中。当前显示原文说明。