POST
/api/public/v1/email-addresses

Create an email address

Create a new email address on a custom domain. Optionally assign it to one or more employees.

Request Body

PropertyTypeDescription
domainIdstringTarget domain.
localPartstringLocal part of the address (before @).
employeeIdsarrayEmployee IDs to assign the address to.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/email-addresses" \
  -H "X-Organization-Id: your_org_id" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "domainId": "dom_123",
    "localPart": "support",
    "employeeIds": [
      "emp_456"
    ]
  }'
200Example response
json
{
  "message": "Email address created successfully!",
  "content": {
    "emailAddress": {
      "id": "ea_1",
      "username": "support@example.com"
    }
  }
}