Send an email (Resend dialect)
Drop-in for Resend's POST /emails. Authenticate exactly as Resend does, with Authorization: Bearer <sendly key> (the legacy x-api-key-token header is also read). A pk_ send-only key is accepted. The key must hold emails:send.
The body is translated to the native send input and validated by the same schema as POST /api/emails. Success is 200 { id }, which the resend SDK returns as { data: { id }, error: null }; failures are Resend-shaped, so the SDK's { data: null, error } handling fires.
A feature the vendor offers that Sendly has no equivalent for is refused with its own status (code COMPAT_UNSUPPORTED) rather than silently dropped.
Authorization
ApiKeyAuth API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
In: header
Header Parameters
Replay-safety key (1–255 characters, 24h TTL). The first request wins; a retry with the same key AND the same translated message replays its result. Reusing a key for a different message answers 422, in this dialect's error body. An empty or over-long key answers 400 (INVALID_IDEMPOTENCY_KEY). Only a send that SUCCEEDED is replayed: a send that fails releases the key, so a retry with the same key runs again.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A Resend emails.send() body. Either html or text is required (else 422). Translated to the native send input and then validated by the same schema as POST /api/emails, so its limits apply.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/compat/resend/emails" \ -H "Content-Type: application/json" \ -d '{ "from": "string", "to": "string", "subject": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}{
"statusCode": 0,
"message": "string",
"name": "string"
}