telnyx-email-curllisted
Install: claude install-skill team-telnyx/ai
# Telnyx Email - curl
## Installation
```text
# curl is pre-installed on macOS, Linux, and Windows 10+
# jq is required for examples that capture IDs from responses:
# macOS: brew install jq
# Debian/Ubuntu: sudo apt-get install jq
```
## Setup
```bash
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
(400 or 422), or authentication errors (401). Preserve the response body so the
Telnyx error code and detail remain available:
```bash
curl --fail-with-body \
-X POST \
-H "Authorization: Bearer $TELNYX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": {"email": "sender@example.com", "name": "Example"},
"to": ["recipient@example.net"],
"subject": "Hello from Telnyx",
"text_body": "Your notification is ready."
}' \
"https://api.telnyx.com/v2/email_messages"
```
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](references/api-details.md#error-code-