All URIs are relative to https://up.go-adserver.com
| Method | HTTP request | Description |
|---|---|---|
| apiV1DomainsGet | GET /api/v1/domains | List your custom domains (Domain Manager). |
| apiV1DomainsIdDelete | DELETE /api/v1/domains/{id} | Delete a custom domain. |
| apiV1DomainsIdGet | GET /api/v1/domains/{id} | Show one custom domain. |
| apiV1DomainsIdNotesPut | PUT /api/v1/domains/{id}/notes | Set your notes on a domain. |
| apiV1DomainsIdRedoPost | POST /api/v1/domains/{id}/redo | Retry setting up a domain (DNS / certificate check again). |
| apiV1DomainsIdToggleActivePost | POST /api/v1/domains/{id}/toggle-active | Switch a custom domain on or off. |
| apiV1DomainsPost | POST /api/v1/domains | Add a custom domain. |
| apiV1SitesGet | GET /api/v1/sites | List the caller's websites. |
| apiV1SitesIdClonePost | POST /api/v1/sites/{id}/clone | Duplicate a site under a new name and URL, with its ad zones. |
| apiV1SitesIdDelete | DELETE /api/v1/sites/{id} | Soft-delete a site. |
| apiV1SitesIdGet | GET /api/v1/sites/{id} | Get a single site. |
| apiV1SitesIdPatch | PATCH /api/v1/sites/{id} | Update a site. |
| apiV1SitesIdRecoverPost | POST /api/v1/sites/{id}/recover | Reverse a soft-delete on a site. |
| apiV1SitesIdSnippetsGet | GET /api/v1/sites/{id}/snippets | List the site's HTML snippets. |
| apiV1SitesIdSnippetsPost | POST /api/v1/sites/{id}/snippets | Add an HTML snippet. |
| apiV1SitesIdSnippetsSnippetIdDelete | DELETE /api/v1/sites/{id}/snippets/{snippetId} | Delete an HTML snippet. |
| apiV1SitesIdSnippetsSnippetIdPut | PUT /api/v1/sites/{id}/snippets/{snippetId} | Replace an HTML snippet. |
| apiV1SitesIdVerifyPost | POST /api/v1/sites/{id}/verify | Trigger HTTP re-check of the site verification meta tag. |
| apiV1SitesPost | POST /api/v1/sites | Create a new website. |
| apiV1SitesSchemaGet | GET /api/v1/sites/_schema | Field metadata for site create/update. |
apiV1DomainsGet(type, state, isactive, page, perPage)
List your custom domains (Domain Manager).
The domains you serve ads (`ads`), static files (`static`) or your branded panel (`up`) from. `dns_target` is the host an `ads`/`static` domain must CNAME to (your network's ad domain); `dns_target_up` the host an `up` domain must CNAME to. Paginated like every list (`page`, `per_page` ≤ 100); filters: `type`, `state`, `isactive`, `domain` (LIKE).
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// 'ads' | 'static' | 'up' (optional)
type: type_example,
// number (optional)
state: 56,
// 0 | 1 (optional)
isactive: 56,
// number (optional)
page: 56,
// number (optional)
perPage: 56,
} satisfies ApiV1DomainsGetRequest;
try {
const data = await api.apiV1DomainsGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| type | ads, static, up |
[Optional] [Defaults to undefined] [Enum: ads, static, up] |
|
| state | number |
[Optional] [Defaults to undefined] |
|
| isactive | 0, 1 |
[Optional] [Defaults to undefined] [Enum: 0, 1] |
|
| page | number |
[Optional] [Defaults to undefined] |
|
| perPage | number |
[Optional] [Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Domains plus the CNAME targets. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsIdDelete(id)
Delete a custom domain.
Refused with 409 `brand_in_use` while the domain is your branded panel domain.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsIdDeleteRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1DomainsIdDeleteRequest;
try {
const data = await api.apiV1DomainsIdDelete(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Deleted. | - |
| 404 | domain_not_found | - |
| 409 | brand_in_use | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsIdGet(id)
Show one custom domain.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsIdGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1DomainsIdGetRequest;
try {
const data = await api.apiV1DomainsIdGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | The domain. | - |
| 404 | domain_not_found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsIdNotesPut(id, apiV1DomainsIdNotesPutRequest)
Set your notes on a domain.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsIdNotesPutOperationRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// ApiV1DomainsIdNotesPutRequest
apiV1DomainsIdNotesPutRequest: ...,
} satisfies ApiV1DomainsIdNotesPutOperationRequest;
try {
const data = await api.apiV1DomainsIdNotesPut(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| apiV1DomainsIdNotesPutRequest | ApiV1DomainsIdNotesPutRequest |
void (Empty response body)
- Content-Type:
application/json - Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Saved. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsIdRedoPost(id)
Retry setting up a domain (DNS / certificate check again).
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsIdRedoPostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1DomainsIdRedoPostRequest;
try {
const data = await api.apiV1DomainsIdRedoPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Queued for another attempt. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsIdToggleActivePost(id)
Switch a custom domain on or off.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsIdToggleActivePostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1DomainsIdToggleActivePostRequest;
try {
const data = await api.apiV1DomainsIdToggleActivePost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Toggled. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1DomainsPost(apiV1DomainsPostRequest)
Add a custom domain.
Create the CNAME first (see `dns_target` on GET /api/v1/domains), then add the domain. The server checks that it resolves and that it really reaches our servers before it is accepted; the certificate is then issued automatically and `state` moves on as it goes live. Errors (409): `invalid_domain`, `invalid_dns` (does not resolve), `invalid_dns_point` (resolves, but not to us yet — DNS can take a few hours), `domain_exists`.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1DomainsPostOperationRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// ApiV1DomainsPostRequest
apiV1DomainsPostRequest: ...,
} satisfies ApiV1DomainsPostOperationRequest;
try {
const data = await api.apiV1DomainsPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| apiV1DomainsPostRequest | ApiV1DomainsPostRequest |
void (Empty response body)
- Content-Type:
application/json - Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 201 | Domain added. | - |
| 409 | invalid_domain / invalid_dns / invalid_dns_point / domain_exists | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1SitesGet200Response apiV1SitesGet(state, sitestate, search, page, perPage)
List the caller's websites.
Paged list (sorted by name). `state=deleted` lists soft-deleted sites so `POST /api/v1/sites/{id}/recover` has ids to work with. Per-site period stats (the panel's Websites listing stats columns) come from `GET /api/v1/publisher/stats?group_by=website&from=&to=`, keyed by site id; per-zone ones from `group_by=adzone`.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// 'live' | 'deleted' | 'all' (optional)
state: state_example,
// -1 | 0 | 1 | Review state: 1 validated, 0 pending, -1 rejected. (optional)
sitestate: 56,
// string | Substring of name or URL. (optional)
search: search_example,
// number (optional)
page: 56,
// number (optional)
perPage: 56,
} satisfies ApiV1SitesGetRequest;
try {
const data = await api.apiV1SitesGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| state | live, deleted, all |
[Optional] [Defaults to 'live'] [Enum: live, deleted, all] |
|
| sitestate | -1, 0, 1 |
Review state: 1 validated, 0 pending, -1 rejected. | [Optional] [Defaults to undefined] [Enum: -1, 0, 1] |
| search | string |
Substring of name or URL. | [Optional] [Defaults to undefined] |
| page | number |
[Optional] [Defaults to 1] |
|
| perPage | number |
[Optional] [Defaults to 500] |
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Site list (filtered by `resource_filter.site_ids` when set). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdClonePost(id, apiV1SitesIdClonePostRequest)
Duplicate a site under a new name and URL, with its ad zones.
Creates a new site from this one (same settings) and copies its live ad zones onto it. The new URL goes through the same domain checks as `POST /api/v1/sites`. Keys pinned to `site_ids` / `adzone_ids` are refused (the copy could never be on the pin).
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdClonePostOperationRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// ApiV1SitesIdClonePostRequest
apiV1SitesIdClonePostRequest: {"name":"My Blog (DE)","url":"https://de.example.com"},
} satisfies ApiV1SitesIdClonePostOperationRequest;
try {
const data = await api.apiV1SitesIdClonePost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| apiV1SitesIdClonePostRequest | ApiV1SitesIdClonePostRequest |
void (Empty response body)
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Cloned. | - |
| 401 | Missing or invalid API key. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Site not found. | - |
| 422 | `validation_error` (name/url required, name taken, URL invalid or blocked) or `unknown_fields` (API keys). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdDelete(id)
Soft-delete a site.
Sets `isdeleted = 1`. Refused with 422 `has_adzones` while the site still has live ad zones — delete or move them first (`POST /api/v1/adspaces/mass-delete`). Undo with `POST /api/v1/sites/{id}/recover`.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdDeleteRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1SitesIdDeleteRequest;
try {
const data = await api.apiV1SitesIdDelete(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Deleted. | - |
| 422 | `has_adzones`. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Site apiV1SitesIdGet(id)
Get a single site.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1SitesIdGetRequest;
try {
const data = await api.apiV1SitesIdGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Site. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdPatch(id, requestBody)
Update a site.
Update fields on an existing site. Send only the keys you want to change — omitted fields keep their current value. The `url` domain is re-validated when changed. A change of `url`, `categories` or `sitelanguages` puts a validated site back to pending review where the tenant reviews sites. `tags` (site groups) replaces the list; `[]` clears it.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdPatchRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// { [key: string]: any; }
requestBody: {"description":"Updated description","categories":[12,47,99]},
} satisfies ApiV1SitesIdPatchRequest;
try {
const data = await api.apiV1SitesIdPatch(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| requestBody | { [key: string]: any; } |
void (Empty response body)
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Updated. | - |
| 400 | `no_fields` — the body changed nothing. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found | - |
| 422 | `validation_error` (same rules as create). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdRecoverPost(id)
Reverse a soft-delete on a site.
Sets `isdeleted = 0` so the site appears in listings again (the panel's Restore in the websites list's Deleted view). Returns 404 if the site doesn't exist, isn't currently soft-deleted, or was purged.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdRecoverPostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1SitesIdRecoverPostRequest;
try {
const data = await api.apiV1SitesIdRecoverPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Recovered. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found or not deleted. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdSnippetsGet(id)
List the site's HTML snippets.
Managed `<meta>` / `<script>` / `<link>` / `<style>` tags injected through the site's one container tag (the panel's HTML snippets panel). Up to 100 per site.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdSnippetsGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1SitesIdSnippetsGetRequest;
try {
const data = await api.apiV1SitesIdSnippetsGet(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Snippets. | - |
| 401 | Missing or invalid API key. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Site not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdSnippetsPost(id, siteSnippetWrite)
Add an HTML snippet.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdSnippetsPostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// SiteSnippetWrite
siteSnippetWrite: {"snippet_key":"google-verify","tag_type":"meta","position":"head","enabled":true,"attrs":{"name":"google-site-verification","content":"abc123"}},
} satisfies ApiV1SitesIdSnippetsPostRequest;
try {
const data = await api.apiV1SitesIdSnippetsPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| siteSnippetWrite | SiteSnippetWrite |
void (Empty response body)
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Created. | - |
| 401 | Missing or invalid API key. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Site not found. | - |
| 422 | `validation_error` (tag type, position, attribute not allowed for the tag, non-http URL, limits, 100-snippet cap) or `unknown_fields` (API keys). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdSnippetsSnippetIdDelete(id, snippetId)
Delete an HTML snippet.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdSnippetsSnippetIdDeleteRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// number
snippetId: 56,
} satisfies ApiV1SitesIdSnippetsSnippetIdDeleteRequest;
try {
const data = await api.apiV1SitesIdSnippetsSnippetIdDelete(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| snippetId | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Deleted. | - |
| 401 | Missing or invalid API key. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdSnippetsSnippetIdPut(id, snippetId, siteSnippetWrite)
Replace an HTML snippet.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdSnippetsSnippetIdPutRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
// number
snippetId: 56,
// SiteSnippetWrite
siteSnippetWrite: ...,
} satisfies ApiV1SitesIdSnippetsSnippetIdPutRequest;
try {
const data = await api.apiV1SitesIdSnippetsSnippetIdPut(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
|
| snippetId | number |
[Defaults to undefined] |
|
| siteSnippetWrite | SiteSnippetWrite |
void (Empty response body)
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Updated; body `{snippet}`. | - |
| 401 | Missing or invalid API key. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found. | - |
| 422 | `validation_error` or `unknown_fields` (API keys). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesIdVerifyPost(id)
Trigger HTTP re-check of the site verification meta tag.
Tells the server to fetch the site URL and look for the verify meta tag the publisher embedded. On success the site flips to `is_verified=true` and can start serving ads. The verify code + tag prefix are exposed on `GET /api/v1/sites/{id}` (`verify_code`, `verify_tag_prefix`, `verify_meta_tag`) — the publisher pastes the meta tag on the site root, then POSTs here. Only meaningful when `modules.publisher.websites.options.need_verification` is on (otherwise the site is auto-verified at create time).
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesIdVerifyPostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// number
id: 56,
} satisfies ApiV1SitesIdVerifyPostRequest;
try {
const data = await api.apiV1SitesIdVerifyPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| id | number |
[Defaults to undefined] |
void (Empty response body)
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Verified. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 404 | Not found | - |
| 422 | Verification failed (meta tag not found) | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiV1SitesPost(siteCreate)
Create a new website.
Create a website (publisher_sites row). Required: `name` + `url`. The domain in `url` is checked against the publisher-domain blocklist; subdomain duplicates of an existing site are rejected. Module-gated fields become required when their module is active on the tenant — see `GET /api/v1/sites/_schema` for the exact field list applicable to this tenant. On create, the server resolves the domain to a `domainid`. If `modules.publisher.websites.options.need_verification` is on, the new site starts at `is_verified=false` — the publisher must complete the dashboard verification flow before the site can serve ads. API keys with `resource_filter.site_ids` set cannot create new sites — pinning to a fixed list is incompatible with adding new ones (returns 403).
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesPostRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
const body = {
// SiteCreate
siteCreate: {"name":"My Blog","url":"https://www.example.com","description":"Personal blog about hiking","main_catid":12,"categories":[12,47],"sitelanguages":["en"]},
} satisfies ApiV1SitesPostRequest;
try {
const data = await api.apiV1SitesPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);| Name | Type | Description | Notes |
|---|---|---|---|
| siteCreate | SiteCreate |
void (Empty response body)
- Content-Type:
application/json - Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created. Fetch the record with `GET /api/v1/sites/{id}`. | - |
| 403 | Key lacks the required scope, or IP not in allowlist, or account suspended. | - |
| 422 | `validation_error` — `errors` maps each field to its messages (name taken, URL invalid or blocked, categories/languages required, …). | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1SitesSchemaGet200Response apiV1SitesSchemaGet()
Field metadata for site create/update.
Returns the canonical field list for `POST /api/v1/sites` and `PATCH /api/v1/sites/{id}`. Module-gated fields (`typeid`, `categories`, `sitelanguages`, `postbacks`) only appear when the relevant module is active on the calling tenant.
import {
Configuration,
SitesApi,
} from 'goadserver-sdk';
import type { ApiV1SitesSchemaGetRequest } from 'goadserver-sdk';
async function example() {
console.log("🚀 Testing goadserver-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: apiKey
accessToken: "YOUR BEARER TOKEN",
});
const api = new SitesApi(config);
try {
const data = await api.apiV1SitesSchemaGet();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);This endpoint does not need any parameter.
ApiV1SitesSchemaGet200Response
- Content-Type: Not defined
- Accept:
application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Site schema. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]