v1.0.0OpenAPI 3.1.1

Performance Marketing API

Download OpenAPI Document

Connect Meta ad accounts, read performance and CAC, test existing assets and approve campaign operations.

Connect Meta, read saved reports and test existing organization assets. Start with the Performance Marketing guide for identifiers, attribution, CAC coverage, minor-unit budgets and the approval lifecycle.

Every ordinary operation accepts an organization-bound x-api-key acting with its creator's role. Meta browser consent still belongs to a person: keep the one-use verifier in the initiating browser. The public reference excludes internal worker and Meta callback routes.

Saving a plan or proposing an action makes no campaign write. Preparation writes paused provider objects. Launch and approval can spend the Meta account's advertising funds; the analyst separately uses Universe credits. Observed efficiency rankings do not establish statistical significance.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

Insights

Reports are snapshots for 7/30 account-local days. Null revenue, ROAS or CAC means unavailable evidence, not zero. CAC requires known first-time customer outcomes for every day. Analyst replies charge Universe credits and never execute campaign writes.

Analyze an ad account

Auth Required

Ask the analyst a question about the saved 7/30-day report. The reply and actual credits return after completion; it proposes discussion, never executes a campaign write. The request may take up to 180 seconds. A completed delivered reply remains billed even if chat history persistence fails.

Permission: performance_marketing.insights:analyze and performance_marketing.action:read and performance_marketing.campaign:read and chat:create. An API key acts with the role of the member who created it.

Credits: Charged at start at the selected model’s token rate; failures without a completed reply are refunded.

Rate What it covers Price
Performance analysis The analyst’s written read of an ad account. Charged per 1,000 prompt/completion tokens, by model, exactly like a chat reply. Cached prompt tokens are billed at 25% of the input rate. gpt-5.6-luna: 2 credits per 1K tokens; gpt-5.6-terra: 8 credits per 1K tokens; gpt-5.6-sol: 16 credits per 1K tokens; gpt-5.4-nano: 2 credits per 1K tokens; gpt-5.4-mini: 4 credits per 1K tokens; gpt-5.4: 8 credits per 1K tokens; chat-latest: 8 credits per 1K tokens; gpt-5.5: 16 credits per 1K tokens; gpt-5.5-pro: 24 credits per 1K tokens; gemini-3.5-flash-lite: 2 credits per 1K tokens; gemini-3.6-flash: 4 credits per 1K tokens; gemini-3.7-flash: 4 credits per 1K tokens; gemini-3.8-flash: 4 credits per 1K tokens; gemini-3.1-flash-lite: 2 credits per 1K tokens; gemini-3.5-flash: 4 credits per 1K tokens; gemini-3.1-pro-preview: 16 credits per 1K tokens; claude-haiku-4-5: 4 credits per 1K tokens; claude-sonnet-5: 16 credits per 1K tokens; claude-opus-5: 24 credits per 1K tokens; claude-sonnet-4-6: 16 credits per 1K tokens; claude-opus-4-8: 24 credits per 1K tokens

Path Parameters

idstring · uuidrequired

Universe resource ID in your organization; not a Meta object ID.

Example: c1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b

Bodyrequiredapplication/json

questionstringrequired

question.

Example: example
daysnumber | numberrequired

days.

Example: 7
modelstring

model.

Example: example

Responses

201Ask the analyst a question about the saved 7/30-day report. The reply and actual credits return after completion; it proposes discussion, never executes a campaign write. The request may take up to 180 seconds. A completed delivered reply remains billed even if chat history persistence fails.
application/json
textstringrequired

text.

Example: Review the highest-spend campaign before making changes.
sessionIdstring · uuid | nullrequired

Universe ID. Meta object IDs are separate strings.

Example: c1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5bPattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
creditsnumber | nullrequired

Actual charged analysis credits; null if the completed reply could not be saved. A completed delivered reply is still billed.

Example: 1
snapshotAtstring | nullrequired

ISO 8601 timestamp.

Example: 2026-10-11T00:00:00Z
400Invalid request: a field failed validation, or a parameter is malformed (for example, an ID that is not a UUID).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
402InsufficientCredits: nothing started.
application/json
statusCodenumberrequired

HTTP status code.

Example: 402
errorstringrequired

Always InsufficientCredits.

Example: InsufficientCredits
messagestringrequired

What happened, in plain words.

Example: You don't have enough credits to start this. It needs 120; you have 45.
requirednumberrequired

Credits this request needs.

Example: 120
availablenumberrequired

Credits your organization can spend now.

Example: 45
owednumberrequired

Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.

Example: 0
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
404The resource is not in this organization, has been removed, or lacks a required completed snapshot.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
POST/v1/galaxy/performance-marketing/accounts/{id}/analyze
curl '{{API_BASE_URL}}/v1/galaxy/performance-marketing/accounts/c1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b/analyze' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "question": "example",
  "days": 7,
  "model": "example"
}'
{
  "text": "Review the highest-spend campaign before making changes.",
  "sessionId": "c1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b",
  "credits": 1,
  "snapshotAt": "2026-10-11T00:00:00Z"
}

Record new-customer outcomes

Get performance report

Queue account sync

List experiments

Create an experiment

Get an experiment

Get live delivery from Meta

Launch a prepared experiment

Preview experiment assets

Prepare paused campaign objects

Move an experiment to a project

Recover an uncertain creation

Get experiment efficiency results

Get native Meta study results

Models

InsufficientCreditsErrorDto