Skip to main content

POST Create new subdomain

POST /v3/relay/subdomains

Create a new subdomain. Each user only creates one subdomain.

Request Headers

Accept: application/json
Authorization: Bearer {{api_key}}

Body data

subdomain (string) The subdomain

Return

If the request is successful, it returns Private Email Subdomain object.

If the response return 400 status code with code is 8001, that means you can't create new subdomain because the number of subdomain is reached

Example

Request

curl --location --request POST '{{host}}/v3/relay/subdomains' \
--header 'Authorization: Bearer {{api_key}}' \
--data-raw '{
"subdomain": "mysubdomain2"
}'

Response

{
"id": 2,
"subdomain": "mysubdomain2"
}