Setup authentication domain
const url = 'https://smtp-app.kirim.email/api/domains/example.com/setup-auth-domain';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"auth_domain":"auth.example.com","dkim_key_length":1024}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://smtp-app.kirim.email/api/domains/example.com/setup-auth-domain \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "auth_domain": "auth.example.com", "dkim_key_length": 1024 }'Configure an authentication domain for a domain
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
example.comDomain name that must be owned by the authenticated user. The domain must be verified and properly configured for email sending.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Authentication domain
Example
auth.example.comDKIM key length
Example
2048Responses
Section titled “Responses”Authentication domain setup successfully
object
Authentication domain configuration
object
The authentication domain that was successfully configured for DKIM and email authentication
Example
{ "data": { "auth_domain": "auth.example.com" }}Unauthorized
object
Error type indicating authentication failure
Human-readable error message explaining the authentication issue
Example
{ "error": "Unauthorized", "message": "Authorization header is required"}Domain not found
object
Example
{ "success": false, "message": "Domain not found"}Validation Error
object
Indicates the request failed due to validation errors
Human-readable error message
Field-specific validation error messages organized by field name
object
Example
{ "success": false, "message": "Validation failed."}Too Many Requests - Rate limit exceeded. Retry after the specified time.
object
Example
{ "success": false, "message": "Too many attempts. Please try again later."}Headers
Section titled “Headers”Seconds until rate limit resets
Maximum requests per minute
Remaining requests in current window
Server Error
object
Indicates the request failed due to a server error
Human-readable error message describing the server error
Example
{ "success": false, "message": "An error occurred while processing the request."}