AI assistants

Use Bytesms from ChatGPT, Claude, Cursor or any coding assistant: a copy-paste integration prompt, markdown docs, llms-full.txt and the MCP server.

AI coding assistants often don't know Bytesms yet, and a web search for the name can turn up unrelated SMS providers. Give your assistant the facts directly, either by pasting the prompt below or by connecting the Bytesms MCP server, and it can write a correct integration on the first try.

Copy-paste prompt

Paste this into ChatGPT, Claude, Cursor, Copilot, Gemini or any other assistant, then replace the last line with your task. It covers the base URL, the auth header, a working POST /v1/emails body, the test addresses and where the full docs live.

Prompt for your AI assistant
I want to send email with Bytesms (https://bytesms.com). Bytesms is an email API for developers (transactional + marketing email, plus WhatsApp OTP) — it is NOT an SMS provider.

Facts you need:
- Base URL: https://api.bytesms.com/api (public endpoints are under /api/v1)
- Auth header: Authorization: Bearer <API key>. Keys start with tp_live_. Read the key from the environment variable BYTESMS_API_KEY and only use it server-side (never in browser or mobile code).
- Send an email: POST https://api.bytesms.com/api/v1/emails with a JSON body such as
  {"from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello", "html": "<p>It works!</p>"}
  The response is 200 {"id": "..."}. Optional fields: text, cc, bcc (max 50 recipients in total), reply_to, headers, tags, scheduled_at, template {id, variables}. Send an Idempotency-Key header to make retries safe. Attachments are not supported.
- "from" must be on a domain verified in the Bytesms workspace. Before that, use [email protected], which can only send to your own account email and test addresses.
- Test recipients (no real mailbox, real events and webhooks): [email protected], [email protected], [email protected], [email protected]
- Errors are JSON {"statusCode", "message", "name"}; 429 means a rate limit (10 requests/second per workspace by default) or a quota.
- SMTP is also available: smtp.bytesms.com, port 465 (TLS) or 587 (STARTTLS), username "bytesms", password = the API key.

Full documentation as markdown: https://bytesms.com/llms-full.txt (index: https://bytesms.com/llms.txt, OpenAPI 3.1: https://bytesms.com/openapi.json, any single page: https://bytesms.com/docs/<page>.md). Read it before writing code, and use only the fields documented there.

Task: <describe what you want to build>

Docs in markdown

Every docs page has a markdown version, generated from the same source as the HTML page, so the two always match:

  • /llms-full.txt: all docs in one markdown file. Give an assistant this URL (or its contents) for a complete reference.
  • /llms.txt: a short index in the llms.txtformat, with a link to each page's markdown.
  • /docs/<page>.md: one page, e.g. /docs/emails.md. Every page also has Copy for LLM, View as Markdown and Open in ChatGPT / Claude buttons under its title.
  • /openapi.json: the OpenAPI 3.1 spec of the public /v1 API, for tools that generate clients.

Store the API key

Create a key in Dashboard → API Keys and keep it in an environment variable. We suggest the name BYTESMS_API_KEY, which is the name the prompt above tells the assistant to read. For an agent that only needs to send, create a sending-access key, optionally limited to one domain.

.env
BYTESMS_API_KEY=tp_live_xxxxxxxxx

Connect the MCP server

With the MCP server connected, the assistant calls Bytesms itself: it can send email, check delivery and manage domains and API keys, so you don't have to paste anything. The server is https://api.bytesms.com/api/mcp. It uses Streamable HTTP and signs you in with OAuth (the client opens a Bytesms consent screen where you pick the workspace and access level). Clients that can send custom headers can use an API key instead. The MCP server page has the tool list, scopes, more clients and the protocol details.

With OAuth (recommended)

claude mcp add --transport http bytesms https://api.bytesms.com/api/mcp
# then run /mcp inside Claude Code and sign in

With an API key

claude mcp add --transport http bytesms https://api.bytesms.com/api/mcp \
  --header "Authorization: Bearer $BYTESMS_API_KEY"

Claude Desktop custom connectors sign in with OAuth only, so use the OAuth flow there.

Agents act with your permissions

An agent with a full-access key or the full scope can create API keys and delete domains. Give it the sending scope or a sending-access key unless it really needs more, and test against [email protected] first.