Skip to main content
POST
https://api.thepurplebox.io
/
v1
/
domains
Add a Domain
curl --request POST \
  --url https://api.thepurplebox.io/v1/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "value": "<string>"
}
'
{
    "status": 201,
    "message": "domain added successfully.",
    "data": {
        "id": "xxxxx",
        "value": "yourdomain.com",
        "team_id": "xxxxx",
        "status": "not_started",
        "identity_type": "domain",
        "created_at": "2025-11-21T10:23:14.737725Z",
        "verified_at": null,
        "attributes": {
            "dkim_attributes": {
                "name": "thepurplebox._domainkey.yourdomain",
                "record_type": "TXT",
                "value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsBL1UV+VVUqIlNrkhBBC...xxxxx",
                "ttl": "auto",
                "status": "not_started"
            },
            "mail_from_attributes": [
                {
                    "name": "send.yourdomain",
                    "record_type": "TXT",
                    "value": "v=spf1 xxxx",
                    "ttl": "60",
                    "status": "not_started"
                },
                {
                    "name": "bounce.yourdomain",
                    "record_type": "CNAME",
                    "value": "xxxx",
                    "ttl": "60",
                    "status": "not_started"
                }
            ],
            "dmarc_attributes": {
                "name": "_dmarc",
                "record_type": "TXT",
                "value": "v=DMARC1;p=none;",
                "ttl": "auto",
                "status": ""
            },
            "verification_status": "not_started",
            "verified_for_sending_status": false,
            "error_type": ""
        },
        "last_status_checked_at": "2025-11-21T10:23:14.737725Z"
    }
}

Headers

Content-Type
string
required
application/json

Body

value
string
required
The domain name to add.

Response

status
number
HTTP status code. Returns 201 when the domain identity is created successfully.
message
string
A human-readable message describing the result of the operation.
data
object
Contains the domain identity configuration and DNS records required for verification.
{
    "status": 201,
    "message": "domain added successfully.",
    "data": {
        "id": "xxxxx",
        "value": "yourdomain.com",
        "team_id": "xxxxx",
        "status": "not_started",
        "identity_type": "domain",
        "created_at": "2025-11-21T10:23:14.737725Z",
        "verified_at": null,
        "attributes": {
            "dkim_attributes": {
                "name": "thepurplebox._domainkey.yourdomain",
                "record_type": "TXT",
                "value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsBL1UV+VVUqIlNrkhBBC...xxxxx",
                "ttl": "auto",
                "status": "not_started"
            },
            "mail_from_attributes": [
                {
                    "name": "send.yourdomain",
                    "record_type": "TXT",
                    "value": "v=spf1 xxxx",
                    "ttl": "60",
                    "status": "not_started"
                },
                {
                    "name": "bounce.yourdomain",
                    "record_type": "CNAME",
                    "value": "xxxx",
                    "ttl": "60",
                    "status": "not_started"
                }
            ],
            "dmarc_attributes": {
                "name": "_dmarc",
                "record_type": "TXT",
                "value": "v=DMARC1;p=none;",
                "ttl": "auto",
                "status": ""
            },
            "verification_status": "not_started",
            "verified_for_sending_status": false,
            "error_type": ""
        },
        "last_status_checked_at": "2025-11-21T10:23:14.737725Z"
    }
}