Delete Domain
Remove a custom sending domain from the account.
DELETE /api/v1/domains/:id
Removes the domain from the account. After deletion, emails can no longer be sent from addresses on this domain. Authenticate with a JWT.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The domain ID |
Response
Returns 200 OK with a confirmation message:
{ "message": "domain deleted" }Code examples
curl -X DELETE https://api.smail.dev/api/v1/domains/dom_abc123 \
-H "Authorization: Bearer eyJ..."await smail.domains.delete("dom_abc123");err := client.Domains.Delete(ctx, "dom_abc123")Error responses
| Status | Error | Description |
|---|---|---|
401 | unauthorized | Missing or invalid JWT |
404 | not found | Domain ID does not exist or belongs to another account |