/telnyx-messaging-curl
Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.
$ npx -y skills add team-telnyx/ai --skill telnyx-messaging-curl --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/telnyx-messaging-curl
Context preview
The summary Claude sees to decide when to auto-load this skill.
Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.
SKILL.md
telnyx-messaging-curl.SKILL.mdname: telnyx-messaging-curl
description: >-
Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for
notifications, 2FA, or messaging apps.
metadata:
author: telnyx
product: messaging
language: curl
generated_by: telnyx-ext-skills-generator
profile: northstar-v2
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Messaging - curl
Installation
# curl is pre-installed on macOS, Linux, and Windows 10+
Setup
export TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use `$TELNYX_API_KEY` for authentication.
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:
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+13125550001",
"from": "+18005550101",
"text": "Hello from Telnyx!"
}' \
"https://api.telnyx.com/v2/messages"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
- **Phone numbers** must be in E.164 format (e.g., `+13125550001`). Include the `+` prefix and country code. No spaces, dashes, or parentheses.
- **Pagination:** List endpoints return paginated results. Use `page[number]` and `page[size]` query parameters to navigate pages. Check `meta.total_pages` in the response.
Operational Caveats
- The sending number must already be assigned to the correct messaging profile before you send traffic from it.
- US A2P long-code traffic must complete 10DLC registration before production sending or carriers will block or heavily filter messages.
- Delivery webhooks are asynchronous. Treat the send response as acceptance of the request, not final carrier delivery.
Reference Use Rules
Do not invent Telnyx parameters, enums, response fields, or webhook fields.
- If the parameter, enum, or response field you need is not shown inline in this skill, read [references/api-details.md](references/api-details.md) before writing code.
- Before using any operation in `## Additional Operations`, read [the optional-parameters section](references/api-details.md#optional-parameters) and [the response-schemas section](references/api-details.md#response-schemas).
- Before reading or matching webhook fields beyond the inline examples, read [the webhook payload reference](references/api-details.md#webhook-payload-fields).
Core Tasks
Send an SMS
Primary outbound messaging flow. Agents need exact request fields and delivery-related response fields.
`POST /messages`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `to` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `from` | string (E.164) | Yes | Sending address (+E.164 formatted phone number, alphanumeric... | | `text` | string | Yes | Message body (i.e., content) as a non-empty string. | | `messaging_profile_id` | string (UUID) | No | Unique identifier for a messaging profile. | | `media_urls` | array[string] | No | A list of media URLs. | | `webhook_url` | string (URL) | No | The URL where webhooks related to this message will be sent. | | ... | | | +7 optional params in [references/api-details.md](references/api-details.md) |
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+13125550001",
"from": "+18005550101",
"text": "Hello from Telnyx!"
}' \
"https://api.telnyx.com/v2/messages"Primary response fields:
- `.data.id`
- `.data.to`
- `.data.from`
- `.data.text`
- `.data.sent_at`
- `.data.errors`
Send an SMS with an alphanumeric sender ID
Common sender variant that requires different request shape.
`POST /messages/alphanumeric_sender_id`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `from` | string (E.164) | Yes | A valid alphanumeric sender ID on the user's account. | | `to` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `text` | string | Yes | The message body. | | `messaging_profile_id` | string (UUID) | Yes | The messaging profile ID to use. | | `webhook_url` | string (URL) | No | Callback URL for delivery status updates. | | `webhook_failover_url` | string (URL) | No | Failover callback URL for delivery status updates. | | `use_profile_webhooks` | boolean | No | If true, use the messaging profile's webhook settings. |
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "MyCompany",
"to": "+13125550001",
"text": "Hello from Telnyx!",
"messaging_profile_id": "550e8400-e29b-41d4-a716-446655440000"
}' \
"https://api.telnyx.com/v2/messages/alphanumeric_sender_id"Primary response fields:
- `.data.id`
- `.data.to`
- `.data.from`
- `.data.text`
- `.data.sent_at`
- `.data.errors`
---
Webhook Verification
Telnyx signs webhooks with Ed25519. Each request includes `telnyx-signature-ed25519` and `telnyx-timestamp` headers. Always verify signatures in production:
# Telnyx signs webhooks with Ed25519 (asymmetric — NOT HMAC/Standard Webhooks).
# Headers sent with each webhook:
# telnyx-signature-ed25519: base64-encoded Ed25519 signature
# telnyx-timestamp: Unix timestamp (reject if >5 minutes old for replay protection)
#
# Get your public key from: Telnyx Portal > Account Settings > Keys & Credentials
# Use the Telnyx SDK in your language for verification (client.webhooks.unwrap).
# Your endpoint MUST return 2xx within 2 seconds or Telnyx will retry (up to 3 attempts).
# Configure a failover URL in Telnyx Portal for additional reliability.
Webhoo
Read more
name: telnyx-messaging-curl description: >- Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps. metadata: author: telnyx product: messaging language: curl generated_by: telnyx-ext-skills-generator profile: northstar-v2
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Messaging - curl
Installation
# curl is pre-installed on macOS, Linux, and Windows 10+
Setup
export TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use `$TELNYX_API_KEY` for authentication.
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:
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+13125550001",
"from": "+18005550101",
"text": "Hello from Telnyx!"
}' \
"https://api.telnyx.com/v2/messages"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
- **Phone numbers** must be in E.164 format (e.g., `+13125550001`). Include the `+` prefix and country code. No spaces, dashes, or parentheses.
- **Pagination:** List endpoints return paginated results. Use `page[number]` and `page[size]` query parameters to navigate pages. Check `meta.total_pages` in the response.
Operational Caveats
- The sending number must already be assigned to the correct messaging profile before you send traffic from it.
- US A2P long-code traffic must complete 10DLC registration before production sending or carriers will block or heavily filter messages.
- Delivery webhooks are asynchronous. Treat the send response as acceptance of the request, not final carrier delivery.
Reference Use Rules
Do not invent Telnyx parameters, enums, response fields, or webhook fields.
- If the parameter, enum, or response field you need is not shown inline in this skill, read [references/api-details.md](references/api-details.md) before writing code.
- Before using any operation in `## Additional Operations`, read [the optional-parameters section](references/api-details.md#optional-parameters) and [the response-schemas section](references/api-details.md#response-schemas).
- Before reading or matching webhook fields beyond the inline examples, read [the webhook payload reference](references/api-details.md#webhook-payload-fields).
Core Tasks
Send an SMS
Primary outbound messaging flow. Agents need exact request fields and delivery-related response fields.
`POST /messages`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `to` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `from` | string (E.164) | Yes | Sending address (+E.164 formatted phone number, alphanumeric... | | `text` | string | Yes | Message body (i.e., content) as a non-empty string. | | `messaging_profile_id` | string (UUID) | No | Unique identifier for a messaging profile. | | `media_urls` | array[string] | No | A list of media URLs. | | `webhook_url` | string (URL) | No | The URL where webhooks related to this message will be sent. | | ... | | | +7 optional params in [references/api-details.md](references/api-details.md) |
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+13125550001",
"from": "+18005550101",
"text": "Hello from Telnyx!"
}' \
"https://api.telnyx.com/v2/messages"Primary response fields:
- `.data.id`
- `.data.to`
- `.data.from`
- `.data.text`
- `.data.sent_at`
- `.data.errors`
Send an SMS with an alphanumeric sender ID
Common sender variant that requires different request shape.
`POST /messages/alphanumeric_sender_id`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `from` | string (E.164) | Yes | A valid alphanumeric sender ID on the user's account. | | `to` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `text` | string | Yes | The message body. | | `messaging_profile_id` | string (UUID) | Yes | The messaging profile ID to use. | | `webhook_url` | string (URL) | No | Callback URL for delivery status updates. | | `webhook_failover_url` | string (URL) | No | Failover callback URL for delivery status updates. | | `use_profile_webhooks` | boolean | No | If true, use the messaging profile's webhook settings. |
curl \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "MyCompany",
"to": "+13125550001",
"text": "Hello from Telnyx!",
"messaging_profile_id": "550e8400-e29b-41d4-a716-446655440000"
}' \
"https://api.telnyx.com/v2/messages/alphanumeric_sender_id"Primary response fields:
- `.data.id`
- `.data.to`
- `.data.from`
- `.data.text`
- `.data.sent_at`
- `.data.errors`
---
Webhook Verification
Telnyx signs webhooks with Ed25519. Each request includes `telnyx-signature-ed25519` and `telnyx-timestamp` headers. Always verify signatures in production:
# Telnyx signs webhooks with Ed25519 (asymmetric — NOT HMAC/Standard Webhooks). # Headers sent with each webhook: # telnyx-signature-ed25519: base64-encoded Ed25519 signature # telnyx-timestamp: Unix timestamp (reject if >5 minutes old for replay protection) # # Get your public key from: Telnyx Portal > Account Settings > Keys & Credentials # Use the Telnyx SDK in your language for verification (client.webhooks.unwrap). # Your endpoint MUST return 2xx within 2 seconds or Telnyx will retry (up to 3 attempts). # Configure a failover URL in Telnyx Portal for additional reliability.
Webhoo
This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
Repo: team-telnyx/ai
Other skills on team-telnyx-ai.
- /telnyx-ai-assistants-curl
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-go
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-java
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-javascript
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-python
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill - /telnyx-ai-assistants-ruby
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Open skill

