POST
/api/public/v1/email-addressesCreate an email address
Create a new email address on a custom domain. Optionally assign it to one or more employees.
Request Body
| Property | Type | Description |
|---|---|---|
domainId | string | Target domain. |
localPart | string | Local part of the address (before @). |
employeeIds | array | Employee 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"
}
}
}