List what an ad account's ads can use
Reads, live from the platform, what there is to choose from when creating ads of the account: its Pages, Instagram accounts, datasets and custom audiences, the smallest daily budget it takes and its EU transparency names.
Needs project:ads:manage.
Guide: Connect Meta Ads
A project secret key: vh_sk_... for production, vh_sk_test_... for test. Keep it on your servers.
In: header
Path parameters
The project's id, proj_.... A secret key works only in the project it belongs to.
The connected ad account's id in Voidhash, ad_acct_....
Examples
curl -X GET "https://api.voidhash.com/api/v1/projects/proj_tz4a98xxat96iws9zmbrgj3a/ads/accounts/ad_acct_k3m9x2c7v1b8n4q6w0e5r2t7/management-options" \ -H "Authorization: Bearer vh_sk_..."{ "currency": "USD", "pages": [ { "id": "104857600000001", "name": "Acme Fitness" } ], "instagramAccounts": [ { "id": "17841400000000001", "username": "acme.fitness" } ], "datasets": [ { "id": "1234567890123456", "name": "Acme web" } ], "customAudiences": [ { "id": "120210000000000009", "name": "Customers, March 2026", "kind": "custom", "approximateSize": { "lower": 12000, "upper": 14100 } } ], "minimumDailyBudget": 100, "platformDsaDefaults": { "beneficiary": "Acme s.r.o.", "payor": "Acme s.r.o." }}{ "error": { "type": "invalid_request", "code": "ad_platform_rejected", "message": "Meta refused creating the ad group: Choose a larger audience to show your ads to. (Audience Too Small)" }}{ "error": { "type": "unauthenticated", "code": "invalid_api_key", "message": "This secret key is not valid." }}{ "error": { "type": "permission_denied", "code": "permission_denied", "message": "Insufficient permissions." }}{ "error": { "type": "not_found", "code": "ad_account_not_found", "message": "This project has no connected ad account ad_acct_k3m9x2c7v1b8n4q6w0e5r2t7.", "param": "adAccountId" }}{ "error": { "type": "conflict", "code": "ad_account_reconnect_required", "message": "The ad account's token does not grant ads_management, pages_show_list. Generate the system user token with the ads_read, ads_management, pages_show_list and pages_read_engagement permissions, assign the system user to the ad account and its Page, and connect the account again." }}{ "error": { "type": "internal", "code": "internal_error", "message": "Something went wrong on our side. Try again, and contact support with the Request-Id header if it keeps failing." }}{ "error": { "type": "unavailable", "code": "ad_platform_unavailable", "message": "Meta is limiting requests for this ad account; nothing was changed. Try again later." }}Response body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
Errors
| Status | type | code | When |
|---|---|---|---|
| 400 | invalid_request | ad_platform_rejected | When the platform refuses. |
| 404 | not_found | ad_account_not_found | — |
| 409 | conflict | ad_account_reconnect_required | When the account's token no longer works or may not manage ads. |
| 503 | unavailable | ad_platform_unavailable | When the platform cannot be reached or limits requests, with Retry-After when it says for how long. |
It can also fail with the errors every operation shares, such as unauthenticated; see Errors.
More in Ad accounts
- List ad accounts
GET - Connect an ad account
POST - Retrieve an ad account
GET - Disconnect an ad account
DELETE - List the ad accounts a token can read
POST - Retrieve an ad account's management settings
GET - Update an ad account's management settings
PATCH - Turn on managing an ad account's ads
POST - Turn off managing an ad account's ads
POST - Register an ad image
POST
Something wrong or missing on this page? Tell us by email or on Discord.