telnyx-missions-go
Create and manage Telnyx Missions — automated workflows, tasks, and sub-resources for AI-driven telecom operations. This skill provides Go SDK examples.
Best use case
telnyx-missions-go is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create and manage Telnyx Missions — automated workflows, tasks, and sub-resources for AI-driven telecom operations. This skill provides Go SDK examples.
Teams using telnyx-missions-go should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/telnyx-missions-go/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How telnyx-missions-go Compares
| Feature / Agent | telnyx-missions-go | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create and manage Telnyx Missions — automated workflows, tasks, and sub-resources for AI-driven telecom operations. This skill provides Go SDK examples.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
# Telnyx Missions - Go
## Installation
```bash
go get github.com/team-telnyx/telnyx-go
```
## Setup
```go
import (
"context"
"fmt"
"os"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
client := telnyx.NewClient(
option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)
```
All examples below assume `client` is already initialized as shown above.
## Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
```go
import "errors"
result, err := client.Messages.Send(ctx, params)
if err != nil {
var apiErr *telnyx.Error
if errors.As(err, &apiErr) {
switch apiErr.StatusCode {
case 422:
fmt.Println("Validation error — check required fields and formats")
case 429:
// Rate limited — wait and retry with exponential backoff
fmt.Println("Rate limited, retrying...")
default:
fmt.Printf("API error %d: %s\n", apiErr.StatusCode, apiErr.Error())
}
} else {
fmt.Println("Network error — check connectivity and retry")
}
}
```
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).
## Important Notes
- **Pagination:** Use `ListAutoPaging()` for automatic iteration: `iter := client.Resource.ListAutoPaging(ctx, params); for iter.Next() { item := iter.Current() }`.
## List missions
List all missions for the organization
`GET /ai/missions`
```go
page, err := client.AI.Missions.List(context.Background(), telnyx.AIMissionListParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)
```
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 mission
Create a new mission definition
`POST /ai/missions` — Required: `name`
Optional: `description` (string), `execution_mode` (enum: external, managed), `instructions` (string), `metadata` (object), `model` (string)
```go
mission, err := client.AI.Missions.New(context.Background(), telnyx.AIMissionNewParams{
Name: "my-resource",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", mission.Data)
```
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
List recent events across all missions
`GET /ai/missions/events`
```go
page, err := client.AI.Missions.ListEvents(context.Background(), telnyx.AIMissionListEventsParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)
```
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
List recent runs across all missions
`GET /ai/missions/runs`
```go
page, err := client.AI.Missions.Runs.ListRuns(context.Background(), telnyx.AIMissionRunListRunsParams{})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)
```
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 mission
Get a mission by ID (includes tools, knowledge_bases, mcp_servers)
`GET /ai/missions/{mission_id}`
```go
mission, err := client.AI.Missions.Get(context.Background(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", mission.Data)
```
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 mission
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)
```go
response, err := client.AI.Missions.UpdateMission(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionUpdateMissionParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 mission
Delete a mission
`DELETE /ai/missions/{mission_id}`
```go
err := client.AI.Missions.DeleteMission(context.Background(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
log.Fatal(err)
}
```
## Clone mission
Clone an existing mission
`POST /ai/missions/{mission_id}/clone`
```go
response, err := client.AI.Missions.CloneMission(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## List knowledge bases
List all knowledge bases for a mission
`GET /ai/missions/{mission_id}/knowledge-bases`
```go
response, err := client.AI.Missions.KnowledgeBases.ListKnowledgeBases(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Create knowledge base
Create a new knowledge base for a mission
`POST /ai/missions/{mission_id}/knowledge-bases`
```go
response, err := client.AI.Missions.KnowledgeBases.NewKnowledgeBase(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Get knowledge base
Get a specific knowledge base by ID
`GET /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}`
```go
response, err := client.AI.Missions.KnowledgeBases.GetKnowledgeBase(
context.Background(),
"knowledge_base_id",
telnyx.AIMissionKnowledgeBaseGetKnowledgeBaseParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Update knowledge base
Update a knowledge base definition
`PUT /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}`
```go
response, err := client.AI.Missions.KnowledgeBases.UpdateKnowledgeBase(
context.Background(),
"knowledge_base_id",
telnyx.AIMissionKnowledgeBaseUpdateKnowledgeBaseParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Delete knowledge base
Delete a knowledge base from a mission
`DELETE /ai/missions/{mission_id}/knowledge-bases/{knowledge_base_id}`
```go
err := client.AI.Missions.KnowledgeBases.DeleteKnowledgeBase(
context.Background(),
"knowledge_base_id",
telnyx.AIMissionKnowledgeBaseDeleteKnowledgeBaseParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
```
## List MCP servers
List all MCP servers for a mission
`GET /ai/missions/{mission_id}/mcp-servers`
```go
response, err := client.AI.Missions.McpServers.ListMcpServers(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Create MCP server
Create a new MCP server for a mission
`POST /ai/missions/{mission_id}/mcp-servers`
```go
response, err := client.AI.Missions.McpServers.NewMcpServer(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Get MCP server
Get a specific MCP server by ID
`GET /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}`
```go
response, err := client.AI.Missions.McpServers.GetMcpServer(
context.Background(),
"mcp_server_id",
telnyx.AIMissionMcpServerGetMcpServerParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Update MCP server
Update an MCP server definition
`PUT /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}`
```go
response, err := client.AI.Missions.McpServers.UpdateMcpServer(
context.Background(),
"mcp_server_id",
telnyx.AIMissionMcpServerUpdateMcpServerParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Delete MCP server
Delete an MCP server from a mission
`DELETE /ai/missions/{mission_id}/mcp-servers/{mcp_server_id}`
```go
err := client.AI.Missions.McpServers.DeleteMcpServer(
context.Background(),
"mcp_server_id",
telnyx.AIMissionMcpServerDeleteMcpServerParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
```
## List runs for mission
List all runs for a specific mission
`GET /ai/missions/{mission_id}/runs`
```go
page, err := client.AI.Missions.Runs.List(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunListParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)
```
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 run
Start a new run for a mission
`POST /ai/missions/{mission_id}/runs`
Optional: `input` (object), `metadata` (object)
```go
run, err := client.AI.Missions.Runs.New(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunNewParams{},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", run.Data)
```
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 run details
Get details of a specific run
`GET /ai/missions/{mission_id}/runs/{run_id}`
```go
run, err := client.AI.Missions.Runs.Get(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunGetParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", run.Data)
```
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
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)
```go
run, err := client.AI.Missions.Runs.Update(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunUpdateParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", run.Data)
```
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 run
Cancel a running or paused run
`POST /ai/missions/{mission_id}/runs/{run_id}/cancel`
```go
response, err := client.AI.Missions.Runs.CancelRun(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunCancelRunParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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
List events for a run (paginated)
`GET /ai/missions/{mission_id}/runs/{run_id}/events`
```go
page, err := client.AI.Missions.Runs.Events.List(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunEventListParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", page)
```
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 event
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)
```go
response, err := client.AI.Missions.Runs.Events.Log(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunEventLogParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
Summary: "Brief task summary",
Type: telnyx.AIMissionRunEventLogParamsTypeStatusChange,
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 event details
Get details of a specific event
`GET /ai/missions/{mission_id}/runs/{run_id}/events/{event_id}`
```go
response, err := client.AI.Missions.Runs.Events.GetEventDetails(
context.Background(),
"event_id",
telnyx.AIMissionRunEventGetEventDetailsParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
RunID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 run
Pause a running run
`POST /ai/missions/{mission_id}/runs/{run_id}/pause`
```go
response, err := client.AI.Missions.Runs.PauseRun(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunPauseRunParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 plan
Get the plan (all steps) for a run
`GET /ai/missions/{mission_id}/runs/{run_id}/plan`
```go
plan, err := client.AI.Missions.Runs.Plan.Get(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunPlanGetParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", plan.Data)
```
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 initial plan
Create the initial plan for a run
`POST /ai/missions/{mission_id}/runs/{run_id}/plan` — Required: `steps`
```go
plan, err := client.AI.Missions.Runs.Plan.New(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunPlanNewParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
Steps: []telnyx.AIMissionRunPlanNewParamsStep{{
Description: "description",
Sequence: 0,
StepID: "550e8400-e29b-41d4-a716-446655440000",
}},
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", plan.Data)
```
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 step(s) to plan
Add one or more steps to an existing plan
`POST /ai/missions/{mission_id}/runs/{run_id}/plan/steps` — Required: `steps`
```go
response, err := client.AI.Missions.Runs.Plan.AddStepsToPlan(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunPlanAddStepsToPlanParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
Steps: []telnyx.AIMissionRunPlanAddStepsToPlanParamsStep{{
Description: "description",
Sequence: 0,
StepID: "550e8400-e29b-41d4-a716-446655440000",
}},
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 step details
Get details of a specific plan step
`GET /ai/missions/{mission_id}/runs/{run_id}/plan/steps/{step_id}`
```go
response, err := client.AI.Missions.Runs.Plan.GetStepDetails(
context.Background(),
"step_id",
telnyx.AIMissionRunPlanGetStepDetailsParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
RunID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 step status
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)
```go
response, err := client.AI.Missions.Runs.Plan.UpdateStep(
context.Background(),
"step_id",
telnyx.AIMissionRunPlanUpdateStepParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
RunID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 run
Resume a paused run
`POST /ai/missions/{mission_id}/runs/{run_id}/resume`
```go
response, err := client.AI.Missions.Runs.ResumeRun(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunResumeRunParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
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 linked Telnyx agents
List all Telnyx agents linked to a run
`GET /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents`
```go
telnyxAgents, err := client.AI.Missions.Runs.TelnyxAgents.List(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunTelnyxAgentListParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", telnyxAgents.Data)
```
Returns: `created_at` (date-time), `run_id` (string), `telnyx_agent_id` (string)
## Link Telnyx agent to run
Link a Telnyx AI agent (voice/messaging) to a run
`POST /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents` — Required: `telnyx_agent_id`
```go
response, err := client.AI.Missions.Runs.TelnyxAgents.Link(
context.Background(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.AIMissionRunTelnyxAgentLinkParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
TelnyxAgentID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response.Data)
```
Returns: `created_at` (date-time), `run_id` (string), `telnyx_agent_id` (string)
## Unlink Telnyx agent
Unlink a Telnyx agent from a run
`DELETE /ai/missions/{mission_id}/runs/{run_id}/telnyx-agents/{telnyx_agent_id}`
```go
err := client.AI.Missions.Runs.TelnyxAgents.Unlink(
context.Background(),
"telnyx_agent_id",
telnyx.AIMissionRunTelnyxAgentUnlinkParams{
MissionID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
RunID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
log.Fatal(err)
}
```
## List tools
List all tools for a mission
`GET /ai/missions/{mission_id}/tools`
```go
response, err := client.AI.Missions.Tools.ListTools(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Create tool
Create a new tool for a mission
`POST /ai/missions/{mission_id}/tools`
```go
response, err := client.AI.Missions.Tools.NewTool(context.Background(), "mission_id")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Get tool
Get a specific tool by ID
`GET /ai/missions/{mission_id}/tools/{tool_id}`
```go
response, err := client.AI.Missions.Tools.GetTool(
context.Background(),
"tool_id",
telnyx.AIMissionToolGetToolParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Update tool
Update a tool definition
`PUT /ai/missions/{mission_id}/tools/{tool_id}`
```go
response, err := client.AI.Missions.Tools.UpdateTool(
context.Background(),
"tool_id",
telnyx.AIMissionToolUpdateToolParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", response)
```
## Delete tool
Delete a tool from a mission
`DELETE /ai/missions/{mission_id}/tools/{tool_id}`
```go
err := client.AI.Missions.Tools.DeleteTool(
context.Background(),
"tool_id",
telnyx.AIMissionToolDeleteToolParams{
MissionID: "550e8400-e29b-41d4-a716-446655440000",
},
)
if err != nil {
log.Fatal(err)
}
```Related Skills
telnyx-whatsapp-ruby
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-whatsapp-python
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-whatsapp-javascript
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-whatsapp-java
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-whatsapp-go
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-whatsapp-curl
Send WhatsApp messages, manage templates, WABAs, and phone numbers via the Telnyx WhatsApp Business API.
telnyx-webrtc-ruby
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides Ruby SDK examples.
telnyx-webrtc-python
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides Python SDK examples.
telnyx-webrtc-javascript
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides JavaScript SDK examples.
telnyx-webrtc-java
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides Java SDK examples.
telnyx-webrtc-go
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides Go SDK examples.
telnyx-webrtc-curl
Manage WebRTC credentials and mobile push notification settings. Use when building browser-based or mobile softphone applications. This skill provides REST API (curl) examples.