GET /api/v2/ads/accounts
Gated: accounts without ads get the 404 a bad URL gets. Needs the ads:read scope.
- Auth: API key (Authorization: Bearer)
- Key scope needed:
ads:read - Raw spec: https://app.diffusr.ai/api/v2/openapi.json
Example
curl "https://app.diffusr.ai/api/v2/ads/accounts" \ -H "Authorization: Bearer $DIFFUSR_KEY"Response
200 ApiAdsAccountList
Connected ad accounts and whether each is ready.
| Name | Type | Required | Description |
|---|---|---|---|
accounts | object[] | yes | |
accounts[].id | string | yes | |
accounts[].platform | string | yes | |
accounts[].name | string | yes | |
accounts[].currency | string | yes | |
accounts[].ready | boolean | yes | |
accounts[].needs | string | null | yes | |
accounts[].runs_as | string | null | yes | |
settings_url | string | yes | |
next | string | yes |
Errors
Every error body is { error, code, request_id, ... }. All codes and what to do.
- 401: Missing, wrong, revoked or expired API key (code UNAUTHORIZED, KEY_REVOKED, KEY_EXPIRED).
- 403: The key may not do this (SCOPE_DENIED, MODEL_NOT_ALLOWED, TEST_MODE_UNSUPPORTED, ACCOUNT_BLOCKED, allowance_exceeded).
- 404: No such id, or it is not yours, or it belongs to the other key mode (NOT_FOUND).
- 429: Too many requests or jobs (RATE_LIMITED, CONCURRENCY_LIMIT, UPLOAD_QUOTA, …). Wait Retry-After seconds, then retry.
- 500: Our fault (INTERNAL_ERROR). Quote request_id to support.
- 503: Paused or busy (API_PAUSED, MODEL_PAUSED, PROVIDER_PAUSED, PROVIDER_BUSY, UNAVAILABLE). Wait Retry-After seconds, then retry.
Charges
Free. No credits are spent.