team-telnyx/ai/telnyx-email-curl
Claude Code and agent skill by team-telnyx/ai
- community
Checking that the SKILL.md file is still in the repository.
Send transactional email, batch sends, scheduled delivery, templates, email validation, and track delivery events. Use for notifications, alerts, and automated email workflows.
Install
npx vskill@latest install team-telnyx/ai/telnyx-email-curlSKILL.md
The same SKILL.md was published earlier as team-telnyx/ai/telnyx-email-curl.
Telnyx Email - curl
Installation
Setup
All examples below use $TELNYX_API_KEY for authentication.
Error Handling
All API calls can fail with network errors, rate limits (429), validation errors (400 or 422), or authentication errors (401). Preserve the response body so the Telnyx error code and detail remain available:
Common errors: 401 invalid credentials, 403 sender-domain eligibility or verification failure, 404 resource not found, 413 body larger than 8,000,000 bytes, and 422 semantic validation or template-rendering failure. A 429 is not necessarily a transient throughput limit: it can indicate a reputation suspension or a daily policy limit. Inspect .errors[0].code and .errors[0].detail before deciding whether to retry. See the full taxonomy in references/api-details.md.
Important Notes
- Base URL: All paths in this skill are relative to
https://api.telnyx.com/v2. - Sender domain: The domain in
from.emailmust be authorized and ready for sending. A successful create response means accepted, queued, scheduled, or sandbox-created—not delivered. - Address input:
from,reply_to, and eachto/cc/bccitem accept either a string address or{ "email": "...", "name": "..." }. Recipients must be unique acrossto,cc, andbccafter case-insensitive normalization. - Body or template:
subjectis required unlesstemplate_idis supplied. Withtemplate_id, do not also sendsubject,html_body, ortext_body; pass Liquid values intemplate_variables. - Pagination: Core Email endpoints use
page_size(default 25, maximum 100) and the opaquepage_cursorreturned in.meta.page_cursor. Do not translate these names topage[size]orpage[cursor]. - Message listing:
GET /email_messagescurrently implements cursor pagination only; no message filters are exposed. Event and recipient list endpoints have their own filters.
Operational Caveats
- Scheduling is fail-open:
scheduled_atis the preferred field. If it is invalid or in the past, the API silently sends immediately. Validate the timestamp before sending and confirm the response status isscheduledwhen future delivery is required. The legacysend_atalias remains accepted; if both are present,scheduled_atwins. - Batch status:
POST /email_messages/batchalways returns207 Multi-Status, including when every item succeeds. It does not return 202. - Batch limit: A batch contains 1–50 messages. Split larger jobs and give each request its own idempotency key.
- Idempotency is endpoint-specific:
Idempotency-Keyis supported only onPOST /email_messages,POST /email_messages/batch,POST /email_templates,POST /email_validations, andPOST /email_validations/batch. Do not send it universally. - Sandbox behavior:
sandbox_mode: trueskips Kafka/MTA delivery, but still persists the message, emits a sandbox event, and creates a non-billable Email Detail Record (EDR). Batch-levelsandbox_modeoverrides every per-message value. - 429 requires classification: It can mean reputation suspension or a daily policy limit. Read the error code/detail; do not blindly back off and retry an account-policy failure.
- Attachments are in-band JSON: Put attachment content in the request as a Base64 string.
disposition: "inline"pluscontent_idsupports CID references. The whole request body is limited to 8,000,000 bytes (approximately 8 MB), including Base64 overhead. - Tags are not labels: Outbound
tagsare immutable billing/reporting attribution propagated to EDRs and Mission Control. Mailboxlabelsare mutable workflow state and are a different concept. - Threading is single-send only:
in_reply_to_message_id,reply_to_all, andforward_of_message_idare accepted by single send but not by batch send.in_reply_to_message_idandforward_of_message_idare mutually exclusive.
Reference Use Rules
Do not invent Telnyx parameters, enums, response fields, or webhook fields.
- If a parameter, enum, or response field is not shown inline, read references/api-details.md before writing the request or handler.
- Before using an operation in
## Additional Operations, read the parameter reference and the response schemas. - Before matching webhook fields or event names, read the webhook payload reference. Pollable and subscribable event enums are intentionally different.
- Treat the two delete-message routes marked not yet available as unreachable even though they appear in the OpenAPI contract.
Core Tasks
Send an email
Primary outbound transactional-email flow.
POST /v2/email_messages
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
from | string or email-address object | Yes | Sender address; object form supports email and optional name. | |
to | array[string or email-address object] | Yes | At least one recipient. Must be unique across all recipient lists. | |
from_name | string | No | Display name for string from; overrides from.name. | |
cc | array[string or object] | No | Carbon-copy recipients. | |
bcc | array[string or object] | No | Blind-copy recipients. | |
reply_to | string or object | No | Reply-to address; an object name is ignored when stored. | |
subject | string | Conditional | Required without template_id. Do not use with a template. | |
html_body | string | No | HTML body. Returned only by the message detail endpoint. | |
text_body | string | No | Plain-text body. Returned only by the message detail endpoint. | |
headers | object[string,string] | No | Custom headers; write-only. | |
attachments | array[attachment] | No | Embedded Base64 attachment objects. | |
tags | array[string] | No | Immutable EDR/reporting attribution; not returned by the API. | |
group_id | UUID or null | No | Unsubscribe group for suppression checks. | |
ignore_suppression | boolean | No | Default false; requires email:override scope and cannot override hard-bounce, complaint, or invalid-address suppressions. | |
metadata | object | No | Custom write-only metadata. | |
tracking_settings | object | No | open_tracking and/or click_tracking; omitted values inherit domain settings. | |
template_id | UUID | No | Liquid template ID. Makes subject/body fields mutually exclusive. | |
template_variables | object | No | Liquid values; defaults to {}. | |
scheduled_at | date-time or null | No | Preferred future send time; invalid/past values send immediately. | |
send_at | date-time | No | Deprecated alias for scheduled_at. | |
inline_css | boolean | No | Inline CSS before sending; default false. | |
sandbox_mode | boolean | No | Persist and emit sandbox records without MTA delivery; default false. | |
in_reply_to_message_id | UUID or null | No | Parent Telnyx message; adds RFC 5322 threading headers. | |
reply_to_all | boolean or null | No | Reply-all intent; meaningful only with in_reply_to_message_id. | |
forward_of_message_id | UUID or null | No | Forward provenance; mutually exclusive with in_reply_to_message_id. | |
Idempotency-Key | header string | No | 1–255 letters, digits, _, or -; reuse only for the identical retry. |
Primary response fields:
.data.id,.data.status,.data.from,.data.to,.data.cc,.data.bcc.data.subject,.data.template_id,.data.attachments,.data.events.data.created_at, optional.data.scheduled_at,.data.sandbox, and.data.recipient_statuses- optional top-level
.suppressed[]when some recipients were removed but at least one remains
Send a batch
Send 1–50 independent messages. Always parse both success and error arrays from the 207 response.
POST /v2/email_messages/batch
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
messages | array[message] | Yes | 1–50 items; each has the single-send shape except the three threading fields. | |
sandbox_mode | boolean | No | Applies to every item and overrides item-level sandbox_mode. | |
Idempotency-Key | header string | No | Idempotency for the whole batch request. |
Primary response fields:
.data[]— successfulEmailMessageobjects.errors[]— failed items with zero-basedindex,code, andmessage.meta.total,.meta.succeeded,.meta.failed
Schedule and cancel an email
Scheduling uses the normal create endpoint. Confirm .data.status == "scheduled"; an invalid or past timestamp is silently treated as an immediate send.
Cancel only while the message is still scheduled:
DELETE /v2/email_messages/{email_id}/schedule
The cancel response is an EmailMessageResponse whose .data.status is cancelled.
List and retrieve messages
GET /v2/email_messages uses newest-first cursor pagination and has no filters. GET /v2/email_messages/{id} returns the detail shape, including bodies.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/telnyx-email-curl/SKILL.md
Popularity
- Repository stars
- 219
- Repository forks
- 21
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/team-telnyx/ai/telnyx-email-curl)