Auto Create Email Channel
POST/api/channels/auto-create-for-email
Auto-create an email channel for a support email address.
This endpoint checks if a channel already exists for the given email. If not, it attempts to create one using a verified domain for the email's domain.
Returns 400 with error_code DOMAIN_NOT_VERIFIED if no verified domain is found.
Sample API Call:
POST /api/channels/auto-create-for-email
Content-Type: application/json
{
"email": "support@example.com"
}
Success Response (200/201):
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"tenant_id": "...",
"name": "Support Email",
"channel_type": "email",
"send_from_email": "support@example.com",
"status": "available",
...
}
Error Response (400):
{
"error_code": "DOMAIN_NOT_VERIFIED",
"detail": "No verified domain found for this email"
}
Request
Responses
- 200
- 404
- 422
Successful Response
Not found
Validation Error