Create whitelist suppression
const url = 'https://smtp-app.kirim.email/api/domains/example.com/suppressions/whitelist';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"recipient":"user@example.com","recipient_type":"email","description":"Trusted sender"}'};
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/suppressions/whitelist \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "recipient": "user@example.com", "recipient_type": "email", "description": "Trusted sender" }'Add a new entry to whitelist suppressions
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”Whitelist suppression entry details
object
Email or domain to whitelist
Example
user@example.comType of recipient
Example
emailOptional description
Example
Trusted senderobject
Email or domain to whitelist
Example
user@example.comType of recipient
Example
emailOptional description
Example
Trusted senderResponses
Section titled “Responses”Whitelist entry created successfully
object
Suppression entry
object
Example
{ "success": true, "message": "Whitelist entry created successfully.", "data": { "id": 1, "type": "unsubscribe", "recipient_type": "email", "recipient": "user@example.com", "tags": "marketing", "description": "Opted out from newsletter", "source": "api", "created_at": 1711234567 }}Unauthorized - Invalid or missing authentication credentials
object
Example
{ "success": false, "message": "Unauthorized"}Not Found - Domain not found
object
Example
{ "success": false, "message": "Domain not found"}Validation Error - Invalid input data
object
Field-specific validation errors
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 - Unexpected error occurred
object
Example
{ "success": false, "message": "An error occurred while processing the request."}