v49

latestOpenAPI 3.1.0Proprietaryraw.githubusercontent.com2026-02-185890337.1 KB
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

namestring required

Name for the credential. Can only contain letters, numbers, hyphens, and underscores. Max 50 characters.

type'smtp' | 'api' required

Type of credential:

  • smtp - For SMTP-based email sending
  • api - For API-based email sending

Example request

{
  "name": "production-smtp",
  "type": "smtp"
}

Response

Credential created

successtrue required

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"
  }
}