Kraiter
API Reference

Tenant

Retrieve tenant details and manage the sandbox whitelist for testing email sends.

The tenant endpoints let you retrieve your organisation's configuration and manage the sandbox whitelist. While in sandbox mode, emails can only be sent to whitelisted recipient addresses.

Get tenant

GET /api/tenant

Returns the current tenant's details.

Response

{
  "tenantId": "org_abc123",
  "clerkOrgId": "org_abc123",
  "name": "Acme Inc",
  "plan": "free",
  "sendingStatus": "sandbox",
  "sandboxWhitelist": ["test@example.com"],
  "createdAt": "2025-09-15T10:00:00.000Z",
  "updatedAt": "2025-09-15T10:00:00.000Z"
}

Errors

CodeDescription
NOT_FOUNDTenant not provisioned. Call POST /api/tenant first.

Examples

curl https://api.kraiter.com/api/tenant \
  -H "Authorization: Bearer YOUR_API_KEY"
const tenant = await kraiter.tenant.get();

List sandbox whitelist

GET /api/tenant/sandbox-whitelist

Returns the email addresses whitelisted for sandbox sending.

Response

{
  "emails": ["test@example.com", "staging@example.com"]
}

Examples

curl https://api.kraiter.com/api/tenant/sandbox-whitelist \
  -H "Authorization: Bearer YOUR_API_KEY"
const { emails } = await kraiter.tenant.listSandboxWhitelist();

Add to sandbox whitelist

POST /api/tenant/sandbox-whitelist

Adds an email address to the sandbox whitelist. While in sandbox mode, only whitelisted addresses can receive emails. Maximum 50 emails per tenant.

Request body

FieldTypeRequiredDescription
emailstringYesThe email address to whitelist.

Response

Returns the updated whitelist.

{
  "emails": ["test@example.com", "new@example.com"]
}

Errors

CodeDescription
VALIDATION_ERRORInvalid email address or whitelist limit (50) reached.

Examples

curl -X POST https://api.kraiter.com/api/tenant/sandbox-whitelist \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "test@example.com" }'
const { emails } = await kraiter.tenant.addToSandboxWhitelist("test@example.com");

Remove from sandbox whitelist

DELETE /api/tenant/sandbox-whitelist/:email

Removes an email address from the sandbox whitelist. Emails to this address will be blocked until re-added.

Path parameters

ParameterTypeDescription
emailstringThe email address to remove (URL-encoded).

Response

Returns the updated whitelist.

{
  "emails": ["test@example.com"]
}

Examples

curl -X DELETE https://api.kraiter.com/api/tenant/sandbox-whitelist/new%40example.com \
  -H "Authorization: Bearer YOUR_API_KEY"
const { emails } = await kraiter.tenant.removeFromSandboxWhitelist("new@example.com");