Relay
Receives text messages sent to a Danish virtual mobile number and e-mails sent to its e-mail domain, sends text messages, and makes it all available to your services and AI assistants.
+45 5454 2424
Every SMS sent to this number is stored here, and you can send SMS through the gateway. Use it in two ways:
- REST API for scripts, backends and integrations.
- MCP server so Claude, ChatGPT and other AI clients can look up messages for you, for example to read a one-time code.
Both require an access key. Reading and sending use separate keys. Ask the owner of this service for one.
REST API
GET https://relay.dtres.dk/api/sms returns the latest received messages as JSON, newest first.
Authentication
Send your key in one of these headers:
Authorization: Bearer <your-key>
X-Api-Key: <your-key>
A missing or wrong key returns 401 Unauthorized.
Query parameters
| Parameter | Description |
|---|---|
limit | Max number of messages. Default 10, max 500. |
since | Only messages received after this time, ISO 8601 (e.g. 2026-10-16T14:00:00Z). |
Example
curl -H "Authorization: Bearer <your-key>" \
"https://relay.dtres.dk/api/sms?limit=20"
[
{
"id": "01a14507-5c1e-4c3a-9f0e-2b7d8a1e6f10",
"from": "4550515946",
"to": "4554542424",
"text": "Your code is 123456",
"receivedAt": "2026-10-16T14:04:57.03+00:00"
}
]
Polling for new messages
Store the newest receivedAt from each response and pass it as since on the next call. You then only get messages you have not seen.
curl -H "X-Api-Key: <your-key>" \
"https://relay.dtres.dk/api/sms?since=2026-10-16T14:04:57.03Z"
Send SMS
POST https://relay.dtres.dk/api/sms/send sends one SMS. It needs a send key (a read key is not enough), in the same headers as above.
| Field | Description |
|---|---|
from | Required. A sender name of 3-11 letters/digits (A-Z, 0-9), or a phone number: 8 digits (45 is added) or 10 digits incl. country code. Use +45 5454 2424 to let the recipient reply. |
to | Required. 8 digits (45 is added) or 10 digits incl. country code. + and spaces are ignored. |
message | Required. The text, max 300 characters. |
flash | Optional. Show as a flash message. Default false. |
encoding | Optional. gsm7 (default, 160 characters per SMS, includes æøå), ucs2 (emoji and other scripts, 70 per SMS) or auto. |
curl -X POST "https://relay.dtres.dk/api/sms/send" -H "Authorization: Bearer <your-send-key>" -H "Content-Type: application/json" -d '{"from":"54542424","to":"12345678","message":"Hello"}'
{
"id": "019a0f3c-7b1e-7c3a-9f0e-2b7d8a1e6f10",
"from": "4554542424",
"to": "4512345678",
"message": "Hello",
"flash": false,
"encoding": "gsm7",
"status": "Sent",
"smsCount": 1,
"statusDescription": null,
"errorCode": null,
"createdAt": "2026-10-20T19:30:00+00:00",
"sentAt": null,
"doneAt": null
}
| Response | Meaning |
|---|---|
202 Accepted | The provider accepted the message (status: Sent). The delivery status follows. |
400 Bad Request | Invalid input; errors lists the problem per field. Nothing was sent. |
502 Bad Gateway | The provider refused it (status: Rejected, reason in statusDescription). |
Delivery status
GET https://relay.dtres.dk/api/sms/outgoing lists sent messages, newest first (limit, since as above), and GET https://relay.dtres.dk/api/sms/outgoing/{id} returns one. A send key or a read key works. status is one of Pending, Sent, Delivered, Failed, Cancelled or Rejected, and is updated when the operator reports the final result.
MCP server
The Model Context Protocol server lets an AI assistant read the messages directly. Ask it things like "What was the last SMS I received?" or "Find the verification code from the latest message." It can also read one-time codes sent by e-mail.
| Setting | Value |
|---|---|
| URL | https://relay.dtres.dk/mcp |
| Transport | Streamable HTTP |
| Authentication | Header Authorization: Bearer <your-key> |
Tools
| Tool | Description |
|---|---|
list_phone_numbers | The virtual numbers this gateway receives SMS on. |
list_messages | Received messages, newest first. Optional filters: limit (default 10, max 100), since, from (sender number) and contains (text, case-insensitive). |
send_sms | Sends an SMS: from, to, message, optional flash and encoding, as in the REST API. Only available with an MCP send key. |
list_sent_messages | Sent messages with their delivery status, newest first. Optional: limit (default 10, max 100) and since. |
wait_for_message | Waits until a matching SMS arrives and returns it (long poll), so the assistant does not have to ask again and again. Optional: since (default: now), from, contains and timeoutSeconds (default 50, max 300). On timeout it returns timedOut: true; call again with since set to the returned nextSince. |
list_emails | E-mails received on the gateway's e-mail domain (kept for 24 hours), newest first, each with the one-time code found in it. Optional: to, from (address contains, case-insensitive), since and limit (default 10, max 50). |
get_latest_email_code | The code from the newest matching e-mail that has one: {found, code, from, to, subject, receivedAt}. Optional: to, from, since and waitSeconds (default 0, max 60) to wait for a new e-mail. |
All tools except send_sms are read-only. A normal MCP key cannot send; sending needs a separate MCP send key.
Claude (claude.ai and Claude Desktop)
- Open Settings → Connectors and choose Add custom connector.
- Name it, for example Relay, and enter the URL
https://relay.dtres.dk/mcp. - Under advanced settings, choose no sign-in and add the request header
Authorizationwith the valueBearer <your-key>. - Save, and enable the connector in a chat from the tools menu.
Custom request headers on connectors are not yet available on every Claude plan. If you do not see the option, use Claude Code below or the REST API.
Claude Code
claude mcp add --transport http sms https://relay.dtres.dk/mcp \
--header "Authorization: Bearer <your-key>"
ChatGPT
In the ChatGPT desktop app and Codex, add an MCP server with these settings:
- Type: Streamable HTTP.
- URL:
https://relay.dtres.dk/mcp. - Bearer token: set an environment variable on your computer, e.g.
SMS_GATEWAY_KEY=<your-key>, and enter its name as the bearer token environment variable.
Or in ~/.codex/config.toml:
[mcp_servers.sms]
url = "https://relay.dtres.dk/mcp"
bearer_token_env_var = "SMS_GATEWAY_KEY"
ChatGPT on the web and in the mobile apps only supports MCP servers with OAuth sign-in, which this service does not offer yet.
Other MCP clients
Any client that supports Streamable HTTP and custom headers works. A generic JSON configuration:
{
"mcpServers": {
"sms": {
"type": "http",
"url": "https://relay.dtres.dk/mcp",
"headers": { "Authorization": "Bearer <your-key>" }
}
}
}