Credentials
Create a credential for a tenant
Create a new SMTP or API credential for a tenant. The credential can be used to send emails via Ark on behalf of the tenant.
Important: The credential key is only returned once at creation time. Store it securely - you cannot retrieve it again.
Credential Types:
- smtp - For SMTP-based email sending. Returns both key and smtpUsername.
- api - For API-based email sending. Returns only key.
post/tenants/{tenantId}/credentials
Path parameters
tenantIdstring required
The tenant ID
Request body
Example request
{
"name": "production-smtp",
"type": "smtp"
}Response
Credential created
Example response
{
"data": {
"id": 123,
"name": "production-smtp",
"type": "smtp",
"lastUsedAt": "2026-02-03T10:30:00Z",
"createdAt": "2026-01-15T08:00:00Z",
"updatedAt": "2026-02-03T10:30:00Z",
"key": "cred_a1b2c3d4e5f6g7h8i9j0...",
"smtpUsername": "cm6abc123def456/cred_a1b2c3d4e5f6g7h8i9j0..."
},
"meta": {
"requestId": "req_V1StGXR8_Z5jdHi6"
}
}