Skip to main content

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": "[email protected]",
"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

FieldTypeDescription
idstringDeveloper account ID
emailstringAccount email address
namestringAccount holder name
companystring|nullCompany name
tierstringSubscription tier: free, growth, pro, enterprise
statusstringAccount status: active, suspended, deleted
webhook_urlstring|nullConfigured webhook endpoint URL
webhook_eventsstring[]Subscribed webhook event types
tasks_this_monthintegerNumber of tasks created in the current billing month
created_atstringAccount creation timestamp
updated_atstringLast update timestamp

Configure Webhook

PUT /v1/account/webhook

Configure your webhook endpoint URL and event subscriptions.

Request Body

FieldTypeRequiredDescription
urlstringYesWebhook endpoint URL (must be HTTPS)
eventsstring[]NoEvent 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_..."
}
tip

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

FieldTypeRequiredDescription
namestringYesA descriptive name for the key (e.g., "Production Server")
environmentstringYes"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"
}
caution

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"
}
]
}
info

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

ParameterTypeDescription
idstringThe 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"
}
warning

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

FieldTypeDescription
tierstringYour current subscription tier
tasks_this_monthintegerTasks created in the current billing month
tasks_limitintegerMaximum tasks allowed per month for your tier
api_keys_countintegerNumber of active (non-revoked) API keys