Appearance
ad-audit
5 endpoints.
GET /api/v1/ad-audit
Get Audit
The latest audit per connected ad account.
Never runs an audit itself: an account whose audit has not been run yet comes back with run: null and the page offers the button. A GET that silently wrote rows would make every page open a new "run" in the history and flatten the score trend the history is for.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | query | no |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/ad-audit/dashboard
Dashboard Audit
The audit of exactly what the Meta Dashboard is showing — see above.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
company | query | yes | string | |
advert | query | no | string | |
days | query | no | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/ad-audit/run
Run Now
Run the audit for one account (or every connected account).
Request body
json
{
"properties": {
"account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Account Id"
},
"window_days": {
"type": "integer",
"title": "Window Days",
"default": 30
}
},
"type": "object",
"title": "RunAuditIn"
}200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/ad-audit/history
History
Score over time — one point per completed run, oldest first.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
account_id | query | no | ||
days | query | no | integer |
200 — Successful Response
json
{}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/ad-audit/checks
Checks
What the audit examines, grouped by category.
Exposed so the page can show its working. An audit that will not say what it checked is a black box, and a black box that grades your ad account is not worth much — this is the same reason every finding carries evidence.
200 — Successful Response
json
{}