Add a sender

Creates a sender. View request and response details for this Samva email API endpoint.

POST
/v1/email/senders

Creates a sender. A sender on a domain takes the domain's namespace, and a namespaceId that names another namespace is refused; a sender with no domain joins namespaceId, or its key's namespace. A namespace-scoped key cannot add a sender on a domain outside its namespace. The required Idempotency-Key replays the original sender for an identical request and conflicts when reused with different input.

Authorization

apiKey
headerx-api-key<token>

Header Parameters

idempotency-key*string
Length1 <= length <= 255

Request Body

application/json
  1. body
email*string
domainId?|null
name?|null|null
replyToEmails?array<string>|null|null
namespaceId?|null

Response Body

Success

application/json
  1. response
id*EmailSenderId
Match^sender_[0-9a-hjkmnp-tv-z]{16,24}$
email*string
status*string
Value in"pending""verified""failed"
providerLifecycle*string
Value in"provisioning""active""deleting""failed"
providerFailureCode*string|null
createdAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.email.addSender({  "email": "example"});
Example Response
{  "id": "string",  "email": "string",  "status": "pending",  "providerLifecycle": "provisioning",  "providerFailureCode": "string",  "createdAt": "string"}

Related documentation