Account API
Overview
Account endpoints let you manage your API keys, monitor usage, and control third-party application access.
Note
Account endpoints require session authentication. API key authentication is not supported for these endpoints.
API Keys
List Keys
Get all active (non-revoked) API keys.
GET /api/v1/account/keys
Response
[
{
"id": "key_1",
"name": "CI Pipeline",
"prefix": "pdf_live_abc1",
"createdAt": "2026-02-01T10:00:00.000Z",
"lastUsedAt": "2026-02-25T08:30:00.000Z"
}
]
Create Key
Generate a new API key. The full key is only shown once in the response.
POST /api/v1/account/keys
Content-Type: application/json
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string | No | "" |
Label for the key (max 100 chars) |
Example
curl -X POST https://api.pdflys.com/api/v1/account/keys \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"CI Pipeline"}'
Response
{
"key": {
"id": "key_3",
"name": "CI Pipeline",
"prefix": "pdf_live_Rk4m",
"createdAt": "2026-02-25T10:00:00.000Z",
"lastUsedAt": null
},
"plaintext": "pdf_live_Rk4mGuodHixRRLdVg8haR4qF66Hsw3K"
}
Warning
Copy the plaintext value immediately — it's never shown again. Only the prefix is stored for identification.
Revoke Key
Soft-delete an API key. It becomes immediately unusable.
DELETE /api/v1/account/keys/:keyId
curl -X DELETE https://api.pdflys.com/api/v1/account/keys/key_3 \
-H "Authorization: Bearer YOUR_TOKEN"
Returns 204 No Content on success.
Usage
Get your monthly operation usage with a per-operation breakdown.
GET /api/v1/account/usage
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
month |
string | No | Current month | Format: YYYY-MM (e.g., 2026-02) |
Example
# Current month
curl https://api.pdflys.com/api/v1/account/usage \
-H "Authorization: Bearer YOUR_TOKEN"
# Specific month
curl "https://api.pdflys.com/api/v1/account/usage?month=2026-01" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
{
"current": 47,
"limit": 500,
"resetDate": "2026-03-01T00:00:00.000Z",
"breakdown": [
{ "operation": "merge", "count": 15 },
{ "operation": "compress", "count": 12 },
{ "operation": "accessibilityCheck", "count": 10 },
{ "operation": "split", "count": 5 },
{ "operation": "rotate", "count": 5 }
]
}
Profile
Get your account tier information.
GET /api/v1/account/profile
Response
{
"tier": "pro"
}