Ad TaggingGet the config

Get the config

The saved config (or null), whether a meta_ads token is stored, the most recent apply or auto run, whether live writes are switched on, and the defaults a custom form needs. Defaults include the template, macros, overwrite policies, all three ad statuses, rule types and auto interval bounds. Last automatic check fields describe scans, not the final outcome of a queued run.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/ad-tagging/meta?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "config": {
      "ad_account_id": "example_string",
      "enabled": true,
      "short_links": true,
      "resolve_names": true,
      "utm_template": "example_string",
      "overwrite": "fill_missing",
      "ad_statuses": [
        "ACTIVE"
      ],
      "rules": {
        "version": 42,
        "operator": "AND",
        "conditions": [
          {
            "type": "campaign_name_contains",
            "value": "example_string",
            "case_sensitive": true
          }
        ]
      },
      "credential_name": "John Doe",
      "auto_interval_minutes": 42,
      "last_auto_at": "2024-12-25T10:00:00Z",
      "last_auto_status": "example_string",
      "last_auto_error": "example_string",
      "generation": "123e4567-e89b-12d3-a456-426614174000",
      "revision": 42,
      "fingerprint": "example_string",
      "auto_enabled": true,
      "auto_approved_fingerprint": "example_string",
      "auto_approved_preview_id": "example_string",
      "auto_approved_by": "example_string",
      "auto_approved_at": "2024-12-25T10:00:00Z",
      "throttled_until": "2024-12-25T10:00:00Z",
      "last_run_at": "2024-12-25T10:00:00Z",
      "last_run_status": "example_string",
      "created_at": "2024-12-25T10:00:00Z",
      "updated_at": "2024-12-25T10:00:00Z"
    },
    "has_credential": true,
    "last_run": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "kind": "preview",
      "status": "completed",
      "location_id": "example_string",
      "ad_account_id": "example_string",
      "config_generation": "123e4567-e89b-12d3-a456-426614174000",
      "config_auto_approval_epoch": 42,
      "config_revision": 42,
      "config_fingerprint": "example_string",
      "run_slot": "2024-12-25T10:00:00Z",
      "journal_ready": true,
      "ad_statuses_snapshot": [
        "ACTIVE"
      ],
      "rules_snapshot": {
        "version": 42,
        "operator": "AND",
        "conditions": [
          {
            "type": "campaign_name_contains",
            "value": "example_string",
            "case_sensitive": true
          }
        ]
      },
      "template_snapshot": "example_string",
      "overwrite_snapshot": "fill_missing",
      "short_links_snapshot": true,
      "resolve_names_snapshot": true,
      "attempts": 42,
      "source_preview_id": "123e4567-e89b-12d3-a456-426614174000",
      "truncated": true,
      "truncation_reason": "example_string",
      "campaigns_scanned": 42,
      "campaigns_matched": 42,
      "ads_scanned": 42,
      "ads_planned": 42,
      "ads_applied": 42,
      "ads_failed": 42,
      "ads_uncertain": 42,
      "ads_skipped": 42,
      "ads_stale": 42,
      "expires_at": "2024-12-25T10:00:00Z",
      "error_code": "unauthorized",
      "error_message": "example_string",
      "requested_by": "example_string",
      "created_at": "2024-12-25T10:00:00Z",
      "started_at": "2024-12-25T10:00:00Z",
      "finished_at": "2024-12-25T10:00:00Z"
    },
    "writes_enabled": true,
    "defaults": {
      "utm_template": "example_string",
      "macros": [
        "{{campaign.id}}"
      ],
      "overwrite_policies": [
        "fill_missing"
      ],
      "ad_statuses": [
        "ACTIVE"
      ],
      "rule_types": [
        "campaign_name_contains"
      ],
      "resolve_names": true,
      "name_macros": [
        "John Doe"
      ],
      "auto_interval_minutes": {
        "min": 42,
        "max": 42,
        "step": 42,
        "default": 42
      }
    }
  }
}
GET
/client/v1/ad-tagging/meta
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.
query
location_idstring

Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_, reads of the config and runs only). Scoped keys (mcp_) are accepted too and need ad_tagging:read or ad_tagging:write. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Location to scope to. Required for ak_ keys or send X-Location-Id. Ignored for sk_.

Responses

successboolean
dataobject