Skip to content

Credentials API

Credentials are API keys scoped to a sending domain with specific permissions.

Required permission: admin


List credentials

GET /api/v1/credentials

Terminal window
curl https://api.emitlo.com/api/v1/credentials \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"status": "success",
"data": {
"credentials": [
{
"id": 1,
"label": "Production API Key",
"username": "prod_abc123",
"sending_domain": "yourdomain.com",
"permissions": ["send", "stats"],
"status": "active",
"last_used_at": "2026-04-20T14:30:00Z",
"created_at": "2026-01-10T09:00:00Z"
}
]
}
}

Create credential

POST /api/v1/credentials

Terminal window
curl -X POST https://api.emitlo.com/api/v1/credentials \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sending_domain_id": 1,
"label": "Production API Key",
"permissions": ["send", "stats"]
}'
FieldTypeRequiredDescription
sending_domain_idintegerID of the verified domain this credential is scoped to
labelstringHuman-readable name for this credential
permissionsarrayArray of permissions: send, stats, admin

Response (201):

{
"status": "success",
"data": {
"credential": {
"id": 2,
"label": "Production API Key",
"username": "prod_xyz789",
"permissions": ["send", "stats"],
"status": "active"
},
"secret_key": "ek_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}

Delete credential

DELETE /api/v1/credentials/{id}

Permanently revokes a credential. Any requests using this key will immediately return 401.

Terminal window
curl -X DELETE https://api.emitlo.com/api/v1/credentials/2 \
-H "Authorization: Bearer YOUR_API_KEY"