Skip to main content
POST
/
tenants
/
{tenantId}
/
credentials
cURL
curl -X POST "https://api.arkhq.io/v1/tenants/cm6abc123def456/credentials" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-smtp",
    "type": "smtp"
  }'
{
  "success": true,
  "data": {
    "id": 123,
    "name": "production-smtp",
    "type": "smtp",
    "hold": false,
    "key": "cred_a1b2c3d4e5f6g7h8i9j0...",
    "smtpUsername": "cm6abc123def456/cred_a1b2c3d4e5f6g7h8i9j0...",
    "lastUsedAt": null,
    "createdAt": "2026-02-03T10:30:00Z",
    "updatedAt": "2026-02-03T10:30:00Z"
  },
  "meta": {
    "requestId": "req_abc123xyz"
  }
}

Authorizations

Authorization
string
header
required

Use your API key from arkhq.io/org/credentials

Authorization: Bearer YOUR_API_KEY

Path Parameters

tenantId
string
required

The tenant ID

Body

application/json
name
string
required

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

Required string length: 1 - 50
Pattern: ^[a-zA-Z0-9_-]+$
Example:

"production-smtp"

type
enum<string>
required

Type of credential:

  • smtp - For SMTP-based email sending
  • api - For API-based email sending
Available options:
smtp,
api
Example:

"smtp"

Response

Credential created

success
boolean
required
data
object
required
meta
object
required