Account API
Manage your developer account settings, API keys, and monitor usage.
Base path: /v1/account
Get Account
GET /v1/account
Retrieve your developer account information.
Example Request
curl https://api.workfunder.com/v1/account \
-H "Authorization: Bearer wf_live_your_key"
Example Response
{
"id": "d1e2f3a4b5c6d1e2f3a4b5c6d1e2f3a4",
"email": "developer@example.com",
"name": "Jane Smith",
"company": "Acme Corp",
"tier": "growth",
"status": "active",
"webhook_url": "https://example.com/webhooks/workfunder",
"webhook_events": ["task.completed", "task.proof_submitted"],
"tasks_this_month": 42,
"created_at": "2026-01-15T10:00:00.000Z",
"updated_at": "2026-02-20T14:30:00.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Developer account ID |
email | string | Account email address |
name | string | Account holder name |
company | string|null | Company name |
tier | string | Subscription tier: free, growth, pro, enterprise |
status | string | Account status: active, suspended, deleted |
webhook_url | string|null | Configured webhook endpoint URL |
webhook_events | string[] | Subscribed webhook event types |
tasks_this_month | integer | Number of tasks created in the current billing month |
created_at | string | Account creation timestamp |
updated_at | string | Last update timestamp |
Configure Webhook
PUT /v1/account/webhook
Configure your webhook endpoint URL and event subscriptions.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Webhook endpoint URL (must be HTTPS) |
events | string[] | No | Event types to receive (see Webhook Events). If omitted, all events are delivered. |
Example Request
curl -X PUT https://api.workfunder.com/v1/account/webhook \
-H "Authorization: Bearer wf_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/workfunder",
"events": [
"task.created",
"task.funded",
"task.completed",
"task.proof_submitted",
"task.cancelled"
]
}'
Example Response
{
"webhook_url": "https://example.com/webhooks/workfunder",
"webhook_events": ["task.created", "task.funded", "task.completed", "task.proof_submitted", "task.cancelled"],
"webhook_secret": "whsec_..."
}
The webhook_secret is returned so you can verify incoming webhook signatures. Store it securely.
Create API Key
POST /v1/account/keys
Generate a new API key. The full key is returned only once in the response -- store it securely.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A descriptive name for the key (e.g., "Production Server") |
environment | string | Yes | "live" or "test" |
Example Request
curl -X POST https://api.workfunder.com/v1/account/keys \
-H "Authorization: Bearer wf_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Server",
"environment": "live"
}'
Example Response
{
"id": "k1a2b3c4d5e6f1a2b3c4d5e6f1a2b3c4",
"name": "Production Server",
"key": "wf_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
"key_prefix": "wf_live_aBcDeFgHiJkL",
"environment": "live",
"created_at": "2026-02-24T12:00:00.000Z"
}
The key field is only included in the creation response. It is never returned again. If you lose the key, revoke it and generate a new one.
List API Keys
GET /v1/account/keys
List all API keys for your account, including revoked keys.
Example Request
curl https://api.workfunder.com/v1/account/keys \
-H "Authorization: Bearer wf_live_your_key"
Example Response
{
"data": [
{
"id": "k1a2b3c4d5e6f1a2b3c4d5e6f1a2b3c4",
"name": "Production Server",
"key_prefix": "wf_live_aBcDeFgHiJkL",
"environment": "live",
"last_used_at": "2026-02-24T11:45:00.000Z",
"revoked_at": null,
"created_at": "2026-01-15T10:00:00.000Z"
},
{
"id": "k2b3c4d5e6f1a2b3c4d5e6f1a2b3c4d5",
"name": "Development",
"key_prefix": "wf_test_xYzAbCdEfGhI",
"environment": "test",
"last_used_at": "2026-02-23T16:20:00.000Z",
"revoked_at": null,
"created_at": "2026-01-15T10:05:00.000Z"
}
]
}
The full key value is never returned in list responses. Only the key_prefix (first 20 characters) is shown for identification.
Revoke API Key
DELETE /v1/account/keys/:id
Revoke an API key. The key immediately stops working for all new requests.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The API key ID (not the key itself) |
Example Request
curl -X DELETE https://api.workfunder.com/v1/account/keys/k1a2b3c4d5e6f1a2b3c4d5e6f1a2b3c4 \
-H "Authorization: Bearer wf_live_your_key"
Example Response
{
"id": "k1a2b3c4d5e6f1a2b3c4d5e6f1a2b3c4",
"name": "Production Server",
"revoked_at": "2026-02-24T14:00:00.000Z"
}
Revoking a key is permanent. You cannot un-revoke a key. Generate a new key if you need to restore access.
Get Usage Stats
GET /v1/account/usage
Retrieve your API usage statistics for the current billing period.
Example Request
curl https://api.workfunder.com/v1/account/usage \
-H "Authorization: Bearer wf_live_your_key"
Example Response
{
"tier": "growth",
"tasks_this_month": 42,
"tasks_limit": 500,
"api_keys_count": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
tier | string | Your current subscription tier |
tasks_this_month | integer | Tasks created in the current billing month |
tasks_limit | integer | Maximum tasks allowed per month for your tier |
api_keys_count | integer | Number of active (non-revoked) API keys |