API endpoints
API keys
Create, list and delete API keys.
See API keys for permissions and best practices.
Create an API key
POST /api-keys
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A name for your reference, up to 50 characters. |
permission | string | No | full_access (default) or sending_access. |
domain_id | string | No | Restrict a sending_access key to one of your domains. |
curl -X POST https://api.usend.et/api-keys \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{
"name": "Production app",
"permission": "sending_access",
"domain_id": "d91cd9bd-1176-453e-8fc1-35364d380206"
}'const { data, error } = await usend.apiKeys.create({
name: 'Production app',
permission: 'sending_access',
domain_id: 'd91cd9bd-1176-453e-8fc1-35364d380206',
});key = usend.api_keys.create({
"name": "Production app",
"permission": "sending_access",
"domain_id": "d91cd9bd-1176-453e-8fc1-35364d380206",
}){
"id": "6e3c3b2d-5c43-4d2e-9a5e-1b6f0c2c1a11",
"token": "us_Xk2v9Lq0Rz7Tn4Wb8Yc1Hd6Fg3Js5Mp0Ua2Ve9Qo"
}token is returned only in this response. Store it securely.
List API keys
GET /api-keys
curl https://api.usend.et/api-keys \
-H "Authorization: Bearer us_123456789"const { data, error } = await usend.apiKeys.list();keys = usend.api_keys.list(){
"object": "list",
"data": [
{
"id": "6e3c3b2d-5c43-4d2e-9a5e-1b6f0c2c1a11",
"name": "Production app",
"permission": "sending_access",
"domain_id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"token_prefix": "us_Xk2v9Lq",
"created_at": "2026-10-11T08:00:00.000Z",
"last_used_at": "2026-10-11T09:12:43.000Z"
}
]
}Delete an API key
DELETE /api-keys/{id}
The key stops working immediately.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The API key ID (path). |
curl -X DELETE https://api.usend.et/api-keys/6e3c3b2d-5c43-4d2e-9a5e-1b6f0c2c1a11 \
-H "Authorization: Bearer us_123456789"const { data, error } = await usend.apiKeys.remove('6e3c3b2d-5c43-4d2e-9a5e-1b6f0c2c1a11');usend.api_keys.remove("6e3c3b2d-5c43-4d2e-9a5e-1b6f0c2c1a11"){}