Restore Hub API
POST
https://api.restorehub.net /api/v1/ads/campaigns Create a campaign
Required scope: ads:write
Request body
application/json
namestringrequiredbudgetCentsintegerrequiredstartsAtstringendsAtstringtargetingobject{
"name": "string",
"budgetCents": 0,
"startsAt": "2024-01-01T00:00:00Z",
"endsAt": "2024-01-01T00:00:00Z",
"targeting": {}
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/ads/campaigns" \
-H "Content-Type: application/json" \
-d '{"name":"string","budgetCents":0,"startsAt":"2024-01-01T00:00:00Z","endsAt":"2024-01-01T00:00:00Z","targeting":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}POST
https://api.restorehub.net /api/v1/ads/creatives Upload an ad creative
Required scope: ads:write
Request body
application/json
campaignIdstringrequiredimageUrlstringrequiredheadlinestringrequiredbodystringctaUrlstringrequired{
"campaignId": "string",
"imageUrl": "string",
"headline": "string",
"body": "string",
"ctaUrl": "string"
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/ads/creatives" \
-H "Content-Type: application/json" \
-d '{"campaignId":"string","imageUrl":"string","headline":"string","body":"string","ctaUrl":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}GET
https://api.restorehub.net /api/v1/ads/analytics Full ad analytics — overview, daily, byCountry, byDevice, byServer, byCampaign, hourly
Required scope: ads:read
Parameters
campaignIdstringquerydaysintegerqueryCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/ads/analytics"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}POST
https://api.restorehub.net /api/v1/ads/deposit Deposit ad credit (Stripe or OxaPay)
Required scope: ads:write
Request body
application/json
amountintegerrequiredAmount in cents (min 1000)
providerstring{
"amount": 0,
"provider": "stripe"
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/ads/deposit" \
-H "Content-Type: application/json" \
-d '{"amount":0,"provider":"stripe"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}GET
https://api.restorehub.net /api/v1/ads/campaigns/{id} Get a single ad campaign
Required scope: ads:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/ads/campaigns/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}PUT
https://api.restorehub.net /api/v1/ads/campaigns/{id} Update an ad campaign
Required scope: ads:write
Parameters
idstringpathrequiredRequest body
application/json
namestringstatusstringdailyCapCentsinteger{
"name": "string",
"status": "PAUSED",
"dailyCapCents": 0
}Code samples
cURL
curl -X PUT "https://api.restorehub.net/api/v1/ads/campaigns/{id}" \
-H "Content-Type: application/json" \
-d '{"name":"string","status":"PAUSED","dailyCapCents":0}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}DELETE
https://api.restorehub.net /api/v1/ads/campaigns/{id} Delete an ad campaign
Required scope: ads:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://api.restorehub.net/api/v1/ads/campaigns/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}POST
https://api.restorehub.net /api/v1/ads/campaigns/{id}/pause Pause a campaign
Required scope: ads:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/ads/campaigns/{id}/pause"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}POST
https://api.restorehub.net /api/v1/ads/campaigns/{id}/resume Resume a paused campaign
Required scope: ads:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/ads/campaigns/{id}/resume"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}GET
https://api.restorehub.net /api/v1/ads/campaigns/{id}/audience Audience breakdown — countries, devices, unique users
Required scope: ads:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/ads/campaigns/{id}/audience"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}GET
https://api.restorehub.net /api/v1/ads/campaigns/{id}/cpm-insights CPM competitive insights for this campaign
Required scope: ads:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/ads/campaigns/{id}/cpm-insights"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Updated