# Vega talks to your finance team, your BI and your AI assistant.

Follow campaigns, check payments and tax invoices, prospect creators and approve deliverables through the API or by asking Claude or ChatGPT, and get a notice in your own system when something happens. Reading is free. Changing something in campaigns and spending credits need their own permissions, which start turned off. Nothing here pays, bills or sends a contract.

- [Reference](https://use-vega.com/en/desenvolvedores/referencia.md): Every call, with its permission, parameters and response.

## Start in 5 minutes

The API and the AI connector read your company's data in Vega and, if you allow it, make a few changes in campaigns. Every plan includes both, and reading is free.

Access always belongs to a company that is already on Vega, with a plan or a free trial. It all starts at the API and MCP card, in Settings, Integrations. The card is always on screen and shows four lines: the company's plan includes the API, the API is switched on for the company, you are an Administrator and two-step verification is on. Each line is ticked or says what is missing and who fixes it.

### Who can connect

A key or a connector always belongs to one company on Vega and reads that company's data. There are three cases:

- **Your company already uses Vega.** An Administrator creates the key or approves the connector, on any plan and during the free trial too. With the card's four lines ticked, nobody at Vega needs to do anything: follow the steps below. If the line about the API being switched on is not ticked, Vega switches it on: write to [contato@use-vega.com](mailto:contato@use-vega.com).
- **You build software for a company that uses Vega** (an agency, a BI team, a tool of your own). You do not need a Vega account. The company's Administrator creates a key and hands it to you, or your software connects as an app and the Administrator approves the access on Vega's screen: see "Building your own app" in [AI assistants](#assistentes-de-ia).
- **Your company does not use Vega yet.** Access starts with a plan or a free trial, arranged with our team: [book a conversation](https://use-vega.com/en/agendar). When Vega gives the access, the company's Administrators get an e-mail with the link to sign in.

There are two ways to start.

### With your AI assistant, no key

In Claude or ChatGPT, add this address as a connector, sign in to Vega and approve the access. The step by step for each assistant is in [AI assistants](#assistentes-de-ia).

_MCP address_

```
https://use-vega.com/api/mcp
```

Then ask in plain language:

"Which campaigns are published, and how many cards does each one have in each stage?"

### With an API key

1. In Vega, open Settings, Integrations. On the API and MCP card, check the four lines and click Create key. The button appears when all four are ticked; if two-step verification is missing, the line itself takes you to turn it on and brings you back.
2. Give it a name that says what the key is for, for example "BI dashboard", and tick only the permissions it needs (see [Permissions](#permissoes)). If you want, choose when it expires.
3. Copy the key, which starts with `vk_`. It appears only once: Vega keeps only a fingerprint of it and cannot show it again. The same window has the API address, the command of the first call with the key already in it and the Test button, which makes that call and shows the company, the permissions and the limit.

Treat the key like a password: keep it out of spreadsheets, e-mails and code that goes into a repository. If it leaks, revoke it in Settings, Integrations. Revoking takes effect at once.

Replace `vk_SUA_CHAVE` with your key and make the first call:

_bash_

```
curl -s https://use-vega.com/api/v1/me \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_Response (200)_

```
{
  "object": "me",
  "org": {
    "id": "5b1f0a52-6c0e-4c6e-9a53-2f0f0c6a9d11",
    "name": "Sua Empresa"
  },
  "plan": {
    "slug": "scale",
    "name": "Scale"
  },
  "credential": {
    "kind": "api_key",
    "id": "0d6a8a0e-4f1c-4a57-8f5e-1b0f6f2f7c33",
    "label": "vk_Ab3x",
    "scopes": [
      "campaigns:read",
      "deals:read",
      "deliverables:read"
    ]
  },
  "rate_limit": {
    "requests_per_minute": 300,
    "org_requests_per_minute": 600
  },
  "api_version": "v1",
  "features": {
    "reads": true,
    "paid_data_actions": true,
    "workflow_writes": true,
    "sales_orders": false
  }
}
```

The answer shows the company, the key's permissions, the limit of calls per minute and, in `features`, what is switched on for the company: reading, searching and generating reports (`paid_data_actions`) changing campaigns (`workflow_writes`) and sending orders (`sales_orders`). If you get `invalid_token`, the key was copied incomplete or has been revoked. If you get `api_not_enabled`, the key is valid and the API is not switched on for the company yet: write to [contato@use-vega.com](mailto:contato@use-vega.com). Every error that has a next step says what it is, in `details.next_step` (see [Errors](#erros)).

Now, real data: the published campaigns, ten at a time.

_bash_

```
curl -s "https://use-vega.com/api/v1/campaigns?status=publicada&limit=10" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_Response (200)_

```
{
  "object": "list",
  "data": [
    {
      "object": "campaign",
      "id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
      "board_id": "3a9d5c10-0a52-4d8b-b7c1-6a3f9e2d1b44",
      "title": "Lançamento Verão",
      "brief": "Mostrar a coleção nova em Reels, com o cupom do criador.",
      "status": "publicada",
      "hashtag": "#verao2027",
      "platforms": [
        "instagram",
        "tiktok"
      ],
      "compensation_model": "per_creator",
      "sales_source": null,
      "starts_on": "2026-12-01",
      "ends_on": "2027-01-31",
      "published_at": "2026-11-10T13:02:11.000Z",
      "closed_at": null,
      "archived_at": null,
      "created_at": "2026-11-02T18:40:00.000Z",
      "updated_at": "2026-11-10T13:02:11.000Z",
      "stages": [
        {
          "id": "9f1e4c22-6d7a-4f0b-8b3e-0c9a5d7e2a01",
          "name": "Convidados",
          "position": 0,
          "outcome": "station"
        },
        {
          "id": "4b8e7a11-2c5d-4e9f-a0b6-7d3c1f8e9a02",
          "name": "Contratados",
          "position": 1,
          "outcome": "station"
        },
        {
          "id": "1d6c3b44-8e2f-4a7d-9c5b-3e0f7a1d6b03",
          "name": "Concluídos",
          "position": 2,
          "outcome": "won"
        }
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

Pages, filters, amounts in cents and dates are in [How the API works](https://use-vega.com/en/desenvolvedores/referencia#como-funciona). For whole tasks, see [What you can do](#o-que-da-para-fazer).

## What you can do

Six everyday tasks, each with the API calls on one side and the request to the assistant on the other. The calls use example ids: swap them for the ones the previous answer gave you. The assistant finds campaigns and creators by name, so you need no id at all to ask.

[**Follow a campaign**From the campaign's name to its summary, cards and deliverables.](#acompanhar-campanha)[**Check payments and tax invoices**What each creator got on the fatura and each one's tax invoice.](#pagamentos-e-notas)[**Prospect and add to a campaign**Vega AI search, simplified report and the creator on a card.](#prospectar)[**Approve deliverables**What waits for review, approve or ask for changes.](#aprovar-entregas)[**Send sales**Send the store's sales and check the delivery's result.](#enviar-vendas)[**Approve content by the guidelines**Choose the approval, change the rules, read what Vega found and receive the events.](#aprovar-pelas-diretrizes)[**Get notified**Signed webhooks in your system when something happens.](#receber-avisos)

### Follow a campaign

Permissions: [`campaigns:read`](#permissoes) [`deals:read`](#permissoes) [`deliverables:read`](#permissoes)

Through the API

#### 1. Find the campaign by name

Find looks up campaigns by title and creators and cards by handle or name, up to 10 of each.

_bash_

```
curl -s "https://use-vega.com/api/v1/search?q=Ver%C3%A3o" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_Response (200)_

```
{
  "object": "search",
  "q": "Verão",
  "campaigns": [
    {
      "id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
      "title": "Lançamento Verão",
      "status": "publicada"
    }
  ],
  "creators": [],
  "deals": []
}
```

#### 2. Read the summary

In one call: cards by stage, deliverables by status, the posts' numbers and what needs attention. Each block comes only if the key has its permission.

_bash_

```
curl -s "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/summary" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_Response (200)_

```
{
  "object": "campaign_summary",
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "title": "Lançamento Verão",
  "status": "publicada",
  "generated_at": "2026-11-17T12:00:00.000Z",
  "deals": {
    "total": 12,
    "by_stage": [
      {
        "stage": {
          "id": "9f1e4c22-6d7a-4f0b-8b3e-0c9a5d7e2a01",
          "name": "Convidados",
          "position": 0,
          "outcome": "station"
        },
        "count": 4
      },
      {
        "stage": {
          "id": "4b8e7a11-2c5d-4e9f-a0b6-7d3c1f8e9a02",
          "name": "Contratados",
          "position": 1,
          "outcome": "station"
        },
        "count": 7
      }
    ],
    "won": 1,
    "lost": 0,
    "paused": 0
  },
  "deliverables": {
    "total": 21,
    "pending": 9,
    "submitted": 3,
    "approved": 4,
    "published": 2,
    "verified": 3,
    "late": 2
  },
  "posts": {
    "count": 5,
    "views": 182400,
    "likes": 9310,
    "comments": 412,
    "shares": 230,
    "reach": 120500,
    "partial": false
  },
  "needs_attention": {
    "deliverables_to_review": 3,
    "late_deliverables": 2,
    "deals_waiting_contract": 1
  }
}
```

#### 3. Open the cards and the deliverables

With `fields=compact`, each item comes with only the essentials: id, name or handle, stage or status and one date.

_bash_

```
curl -s "https://use-vega.com/api/v1/deals?campaign_id=7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10&fields=compact" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_bash_

```
curl -s "https://use-vega.com/api/v1/deliverables?campaign_id=7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10&fields=compact" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

Asking the assistant

> How is the Verão campaign doing? Which deliverables are late and which cards are waiting for the contract?

Tools the assistant uses:

- [`find`](https://use-vega.com/en/desenvolvedores/referencia#op-search)
- [`campaign_summary`](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignSummary)
- [`list_deals`](https://use-vega.com/en/desenvolvedores/referencia#op-listDeals)
- [`list_deliverables`](https://use-vega.com/en/desenvolvedores/referencia#op-listDeliverables)

The assistant finds the campaign by name. If more than one campaign has that name, it shows the options and asks which one.

### Check payments and tax invoices

Permissions: [`faturas:read`](#permissoes) [`payments:read`](#permissoes) [`notas_fiscais:read`](#permissoes)

Through the API

#### 1. Find the month's fatura

`cycle_key` is the fatura's month.

_bash_

```
curl -s "https://use-vega.com/api/v1/faturas?cycle_key=2026-10" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

#### 2. See each creator's part

Each payment is one creator's part of the fatura: gross amount, Vega's fee, the fees, the total and the status (`paga` = paid, `emitida` = issued, `adiada` = moved to the next fatura, and the others in the reference). Reading one payment by its id also brings its lines: fixed, variable, commission, prize and fees.

_bash_

```
curl -s "https://use-vega.com/api/v1/payments?fatura_id=4f9e2b17-8c3a-4d61-a5e0-7b2c9d1e3f48" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_One item of data_

```
{
  "object": "payment",
  "id": "9a1c3e5b-7d2f-4b8a-8e6c-0f1d2a3b4c5d",
  "fatura_id": "4f9e2b17-8c3a-4d61-a5e0-7b2c9d1e3f48",
  "cycle_key": "2026-10",
  "creator": {
    "id": "2c7d9e41-6a3b-4f58-8e0d-9b1a5c7e3f62",
    "name": "Perfil Exemplo",
    "handle": "perfil.exemplo",
    "platforms": [
      "instagram"
    ],
    "claimed": true
  },
  "gross_cents": 150000,
  "vega_fee_cents": 7500,
  "processing_fee_cents": 199,
  "transfer_fee_cents": 0,
  "total_cents": 157699,
  "status": "paga",
  "due_date": "2026-11-10",
  "issued_at": "2026-11-01T09:00:00.000Z",
  "paid_at": "2026-11-08T14:12:31.000Z",
  "rolled_to_cycle_key": null,
  "created_at": "2026-11-01T09:00:00.000Z",
  "updated_at": "2026-11-08T14:12:31.000Z"
}
```

#### 3. Check the tax invoices

`issuer_kind=creator` brings each creator's invoice; `vega`, the invoice for Vega's fee.

_bash_

```
curl -s "https://use-vega.com/api/v1/notas-fiscais?fatura_id=4f9e2b17-8c3a-4d61-a5e0-7b2c9d1e3f48&issuer_kind=creator" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

To download the PDF or the XML, use the invoice's link with the same key. It answers `302` to an address valid for 60 seconds, and curl's `-L` follows it.

_bash_

```
curl -sL -o nota.pdf "https://use-vega.com/api/v1/notas-fiscais/6d2e8f1a-4b3c-4e5d-9a7b-8c0d1e2f3a4b/pdf" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

Asking the assistant

> Check October's fatura: how much each creator got, who has not been paid yet and who has no tax invoice yet.

Tools the assistant uses:

- [`list_faturas`](https://use-vega.com/en/desenvolvedores/referencia#op-listFaturas)
- [`list_payments`](https://use-vega.com/en/desenvolvedores/referencia#op-listPayments)
- [`get_payment`](https://use-vega.com/en/desenvolvedores/referencia#op-getPayment)
- [`list_notas_fiscais`](https://use-vega.com/en/desenvolvedores/referencia#op-listNotasFiscais)
- [`get_nota_fiscal`](https://use-vega.com/en/desenvolvedores/referencia#op-getNotaFiscal)

Payments and faturas can only be read: nothing here pays anyone.

### Prospect and add to a campaign

Permissions: [`prospecting:read`](#permissoes) [`credits:spend`](#permissoes) [`campaigns:read`](#permissoes) [`deals:write`](#permissoes)

Through the API

#### 1. Search for creators

Describe the profile you are looking for, in Portuguese for the best results. The search spends credits and takes about 30 seconds. With `wait`, the answer comes only when the search finishes; if the time runs out first, the answer is `202` and you read the search later, spending nothing.

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/creator-searches?wait=50" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: 3f6c2a9e-8b1d-4f7a-9c0e-5d2b7a1e4c90" \
  -H "Content-Type: application/json" \
  -d '{"description":"criadoras de moda praia no Rio de Janeiro, tom leve e bem-humorado","platforms":["instagram","tiktok"],"min_followers":10000,"max_followers":300000,"min_engagement_rate":0.02}'
```

_Response (200)_

```
{
  "object": "creator_search",
  "id": "8e3b1c55-2f4a-4d6e-9b07-1a5c3e9d7f20",
  "status": "ready",
  "failure_code": null,
  "description": "criadoras de moda praia no Rio de Janeiro, tom leve e bem-humorado",
  "platforms": [
    "instagram",
    "tiktok"
  ],
  "created_at": "2026-11-16T14:02:11.000Z",
  "finished_at": "2026-11-16T14:02:39.000Z",
  "expires_at": "2027-02-14T14:02:11.000Z",
  "credits_spent": 5,
  "results_shown": 20,
  "exhausted": false,
  "next": {
    "kind": "list",
    "credits": 2
  },
  "results": [
    {
      "creator_id": "2c7d9e41-6a3b-4f58-8e0d-9b1a5c7e3f62",
      "platform": "instagram",
      "handle": "perfil.exemplo",
      "display_name": "Perfil Exemplo",
      "profile_url": "https://www.instagram.com/perfil.exemplo/",
      "metrics": {
        "followers": 84200,
        "engagement_rate": 0.041,
        "niche": "Digital creator",
        "city": "Rio de Janeiro"
      }
    },
    {
      "creator_id": "5f1a3c88-0d2e-4b7a-a6c9-3e8b2d4f1a07",
      "platform": "tiktok",
      "handle": "outro.perfil",
      "display_name": "Outro Perfil",
      "profile_url": "https://www.tiktok.com/@outro.perfil",
      "metrics": null
    }
  ]
}
```

A creator's numbers (followers, engagement, niche and city) come only on profiles Vega measured itself. On the others, `metrics` is `null`.

#### 2. Generate the simplified report

Send the network and the handle, or the `creator_id` of a search result. It takes under a minute.

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/creator-reports?wait=50" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"platform":"instagram","handle":"perfil.exemplo"}'
```

#### 3. Add the creator to the campaign

Find the campaign's id by its name (as in step 1 of [Follow a campaign](#acompanhar-campanha)) and create the card. It starts in the first stage, as Add creator does in the app. If the creator already has a card in that campaign, the answer is `409` and carries the id of the card that exists.

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/deals" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"platform":"instagram","handle":"perfil.exemplo","name":"Perfil Exemplo"}'
```

_Response (201)_

```
{
  "object": "deal",
  "id": "c4a1e7d2-9b3f-4e60-8d15-6f2a0b9c3e77",
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "stage": {
    "id": "9f1e4c22-6d7a-4f0b-8b3e-0c9a5d7e2a01",
    "name": "Convidados",
    "position": 0,
    "outcome": "station"
  },
  "creator": {
    "id": "2c7d9e41-6a3b-4f58-8e0d-9b1a5c7e3f62",
    "name": "Perfil Exemplo",
    "handle": "perfil.exemplo",
    "platforms": [
      "instagram"
    ],
    "claimed": true
  },
  "contract_mode": "deliverables",
  "prior_approval": false,
  "commission_bps": null,
  "accepted_at": null,
  "declined_at": null,
  "exited_at": null,
  "exit_reason": null,
  "service_finalized_at": null,
  "invoice_released_at": null,
  "created_at": "2026-11-17T12:04:10.000Z",
  "updated_at": "2026-11-17T12:04:10.000Z",
  "contract": null,
  "deliverables": {
    "total": 0,
    "approved": 0,
    "published": 0,
    "verified": 0,
    "late": 0
  },
  "coupon_codes": [],
  "post_metrics": null
}
```

#### What it costs

The prices are the app's, with no extra fee:

| Action | Credits | What you get |
| --- | --- | --- |
| Run a search | 5 | The first 20 creators of a Vega AI search. |
| See more results | 2 | 20 more creators of a ready search. |
| Generate a creator report | 3 | A simplified report of one profile, available for 90 days. |

Free: reading searches, reports, the balance and the prices; asking for the same search again, from the same key or app, within 2 minutes; asking for a report of a profile that has a ready one less than 90 days old; repeating a call with the same `Idempotency-Key` ([how to repeat](https://use-vega.com/en/desenvolvedores/referencia#idempotencia)). If a search or a report fails, the credits come back on their own. Every paid answer carries the `billing` block: whether it charged, how much and the balance right after.

Asking the assistant

> Find three beachwear creators in Rio with up to 300 thousand followers, generate the report of the most promising one and add her to the Verão campaign.

Tools the assistant uses:

- [`search_creators`](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorSearch) Spends credits
- [`get_creator_search`](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorSearch)
- [`generate_creator_report`](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorReport) Spends credits
- [`find`](https://use-vega.com/en/desenvolvedores/referencia#op-search)
- [`add_creator_to_campaign`](https://use-vega.com/en/desenvolvedores/referencia#op-addDealToCampaign) Changes data

The description of each tool that spends credits states its price and when it is free. On the connector, search and report wait up to 45 seconds for the result, so the assistant usually answers with them ready.

### Approve deliverables

Permissions: [`deliverables:read`](#permissoes) [`deliverables:write`](#permissoes)

Through the API

#### 1. See what waits for review

_bash_

```
curl -s "https://use-vega.com/api/v1/deliverables?status=submitted" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

#### 2. Approve or ask for changes

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/deliverables/e8b4c2a1-3d5f-4a7e-9c0b-1f2e3d4c5b6a/review" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"decision":"approve"}'
```

_Response (200)_

```
{
  "object": "deliverable",
  "id": "e8b4c2a1-3d5f-4a7e-9c0b-1f2e3d4c5b6a",
  "deal_id": "c4a1e7d2-9b3f-4e60-8d15-6f2a0b9c3e77",
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "platform": "instagram",
  "format": "reels",
  "title": "Reels da coleção",
  "status": "approved",
  "deadline": "2026-11-20",
  "window_start": null,
  "window_end": null,
  "published_url": null,
  "fulfilled_at": null,
  "fulfilled_late": null,
  "verification": null,
  "created_at": "2026-11-02T18:40:00.000Z",
  "updated_at": "2026-11-17T12:10:00.000Z",
  "review": "approved"
}
```

Asking for changes needs a comment, which the creator sees:

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/deliverables/e8b4c2a1-3d5f-4a7e-9c0b-1f2e3d4c5b6a/review" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"decision":"request_changes","comment":"Troque a música do começo, por favor."}'
```

When the company requires evidence or another person's confirmation to approve, the answer is `202` with `review: "pending_approval"`: the approval waits for that person in Vega. Approving a deliverable never pays anyone.

Asking the assistant

> Which deliverables are waiting for review? Approve the one from @perfil.exemplo and ask the other one to change the opening music.

Tools the assistant uses:

- [`list_deliverables`](https://use-vega.com/en/desenvolvedores/referencia#op-listDeliverables)
- [`review_deliverable`](https://use-vega.com/en/desenvolvedores/referencia#op-reviewDeliverable) Changes data

The assistant asks for your confirmation before approving or asking for changes.

### Send sales

Permissions: [`sales:write`](#permissoes) [`sales:read`](#permissoes)

Through the API

#### 1. Send the sales

One row per coupon or per card, with the amount in cents, up to 5000 rows per delivery. The sales go into the campaign's open cycle, as through the sales webhook. The answer is `202`: Vega checks the rows right after.

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/sales" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"rows":[{"coupon":"PERFIL10","sales_cents":129900},{"deal_id":"c4a1e7d2-9b3f-4e60-8d15-6f2a0b9c3e77","sales_cents":45000}]}'
```

_Response (202)_

```
{
  "object": "sales_delivery",
  "id": "3b7d1f9e-2a4c-4e6b-8d0f-1a3c5e7b9d20",
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "status": "processing",
  "received_at": "2026-11-17T12:20:00.000Z",
  "processed_at": null,
  "stats": {
    "rows": null,
    "matched": null,
    "ignored": null
  },
  "errors": []
}
```

#### 2. Read the result

`processing` while Vega checks; then `accepted` or `rejected`. A row that matches no coupon or card shows in `errors`, with the row number and a code, never its contents. The commission reaches the fatura only at the month's close, as always. Once Vega accepts the delivery, the campaign's creators are told their results, as when the spreadsheet is sent in the app.

_bash_

```
curl -s "https://use-vega.com/api/v1/sales-deliveries/3b7d1f9e-2a4c-4e6b-8d0f-1a3c5e7b9d20" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_Response (200)_

```
{
  "object": "sales_delivery",
  "id": "3b7d1f9e-2a4c-4e6b-8d0f-1a3c5e7b9d20",
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "status": "accepted",
  "received_at": "2026-11-17T12:20:00.000Z",
  "processed_at": "2026-11-17T12:20:04.000Z",
  "stats": {
    "rows": 2,
    "matched": 2,
    "ignored": 0
  },
  "errors": []
}
```

#### 3. Or send order by order

If your system has the orders, send each one with the code, the paid day and what the buyer paid for the products after the discount, without freight, in cents. Each order waits to be confirmed for the benefit's days, then counts as confirmed; one cancelled or refunded meanwhile is voided. Sending the same order number again only updates an order still waiting. A refused order comes back by its index, with the reason, and the others stay. This needs the orders switch on for the company: ask support.

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/sales/orders" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"orders":[{"order_id":"PED-10421","coupon":"PERFIL10","paid_on":"2026-11-25","net_cents":18990,"status":"paid"},{"order_id":"PED-10422","coupon":"ANA15","paid_on":"2026-11-25","net_cents":9900,"status":"paid"},{"order_id":"PED-10388","coupon":"PERFIL10","paid_on":"2026-11-20","net_cents":15990,"status":"refunded"}]}'
```

_Response (200)_

```
{
  "object": "sales_order_batch",
  "id": "5a2c4e6f-8b1d-4f3a-9c5e-7d1b3f5a7c90",
  "recorded": 1,
  "updated": 1,
  "refused": [
    {
      "index": 1,
      "reason": "codigo_desconhecido"
    }
  ]
}
```

#### 4. Read the sales ledger

Each order becomes one line, with no buyer data and no order number. The commission reaches the fatura only when the company signs the cutoff planilha, which Vega brings already filled in with the confirmed orders.

_bash_

```
curl -s "https://use-vega.com/api/v1/sales/entries?campaign_id=7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10&state=pendente" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_One line of the response_

```
{
  "object": "sales_entry",
  "id": "8e3a5c7d-1f2b-4d6e-a8c0-2b4d6f8a0c13",
  "kind": "pedido",
  "state": "pendente",
  "channel": "api",
  "day": "2026-11-25",
  "value_cents": 18990,
  "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
  "deal_id": "c4a1e7d2-9b3f-4e60-8d15-6f2a0b9c3e77",
  "creator_id": "2c7d9e41-6a3b-4f58-8e0d-9b1a5c7e3f62",
  "coupon_id": "1d3f5b7a-9c2e-4a6c-8e1f-3a5c7e9b1d24",
  "benefit_id": "6c8e0a2b-4d6f-4b8d-9f2a-5c7e9a1b3d35",
  "commission_bps": 1000,
  "hold_until": "2026-12-25",
  "confirmed_at": null,
  "locked_at": null,
  "voided_at": null,
  "void_reason": null,
  "refunded_after_at": null,
  "sales_cycle_id": null,
  "created_at": "2026-11-26T12:20:00.000Z",
  "updated_at": "2026-11-26T12:20:00.000Z"
}
```

Asking the assistant

> Send yesterday's sales to the Verão campaign: coupon PERFIL10, R$ 1,299.00; coupon ANA15, R$ 450.00. Then tell me whether any row was rejected.

Tools the assistant uses:

- [`send_sales`](https://use-vega.com/en/desenvolvedores/referencia#op-sendSales) Changes data
- [`get_sales_delivery`](https://use-vega.com/en/desenvolvedores/referencia#op-getSalesDelivery)
- [`send_orders`](https://use-vega.com/en/desenvolvedores/referencia#op-sendOrders) Changes data
- [`list_sales_entries`](https://use-vega.com/en/desenvolvedores/referencia#op-listSalesEntries)

The assistant asks for your confirmation before sending.

### Approve content by the guidelines

Permissions: [`campaigns:read`](#permissoes) [`content_approval:write`](#permissoes) [`deliverables:read`](#permissoes)

Through the API

#### 1. See how the campaign approves content

The setting (`fully_automatic` = Fully automatic, `automatic_with_manual_approval` = Automatic with manual approval, `fully_manual` = Fully manual), whether Vega already read the guidelines, how many credits each video checked costs, and the rules, each with its origin (`campaign`, `guidelines` or `company`) and what it does (`approve`, `attention`, `refuse`).

_bash_

```
curl -s "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/content-approval" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

#### 2. Choose the setting

The two checking settings spend the company's credits per video checked (photos and text are free); the answer states the price in `notices`. The key's responsible person needs to edit automations and, for those two, to use credits.

_bash_

```
curl -si -X PUT "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/content-approval" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"mode":"automatic_with_manual_approval"}'
```

#### 3. Change the rules

Add a company rule, or switch off a campaign rule (the id `campaign:<condition>`).

_bash_

```
curl -si -X POST "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/content-approval/rules" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"condition":"says","value":"Fala do cupom PERFIL10","effect":"approve"}'
```

_bash_

```
curl -si -X PATCH "https://use-vega.com/api/v1/campaigns/7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10/content-approval/rules/campaign:taken_down" \
  -H "Authorization: Bearer vk_SUA_CHAVE" \
  -H "Idempotency-Key: <um UUID novo>" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'
```

#### 4. Read what Vega found

The deliverable (and the Monitoramento post) carries `guidelines_check`: the result, who decided and each point outside the guidelines with the passage and the second of the audio. The whole transcript never leaves. To be told, subscribe to `content_check.completed` and `content_approval.changed` in Receive events.

_bash_

```
curl -s "https://use-vega.com/api/v1/deliverables/e8b4c2a1-3d5f-4a7e-9c0b-1f2e3d4c5b6a" \
  -H "Authorization: Bearer vk_SUA_CHAVE"
```

_guidelines_check_

```
{
  "status": "checked",
  "result": "outside",
  "not_checked_reason": null,
  "decided_by": null,
  "points": [
    {
      "rule_id": "5e1f0a2b-3c4d-4e5f-8a6b-7c8d9e0f1a2b",
      "rule": {
        "origin": "company",
        "condition": "says",
        "value": "Fala do cupom PERFIL10",
        "effect": "approve"
      },
      "passage": "usa o meu cupom de desconto",
      "at_seconds": 14
    }
  ]
}
```

Vega approves or refuses based on what is said in the content's audio and what is written in the caption. Our AI does not watch the video: it does not see the images and has no opinion on the visuals.

Asking the assistant

> In the Verão campaign, set the approval to Automatic with manual approval and add a rule: the creator must mention the coupon PERFIL10. Then tell me which deliverables fell outside the guidelines.

Tools the assistant uses:

- [`get_content_approval`](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignContentApproval)
- [`set_content_approval_mode`](https://use-vega.com/en/desenvolvedores/referencia#op-setContentApprovalMode) Changes data
- [`add_content_approval_rule`](https://use-vega.com/en/desenvolvedores/referencia#op-createContentApprovalRule) Changes data
- [`update_content_approval_rule`](https://use-vega.com/en/desenvolvedores/referencia#op-updateContentApprovalRule) Changes data
- [`get_deliverable`](https://use-vega.com/en/desenvolvedores/referencia#op-getDeliverable)

The assistant states the price per video checked and asks for your confirmation before changing the setting.

### Get notified

In your system

#### What reaches your address

A `POST` with the event as JSON in the body, usually a few seconds after it happened, with these headers:

_Headers_

```
POST /seu/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Vega-Webhooks/1.0
Vega-Event-Id: evt_2b0f6a3e-7d41-4c58-9e0a-5c1d8f3b7a62
Vega-Event-Type: deal.stage_changed
Vega-Signature: t=1762957267,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e6b2a7e1c7b0f8e2d3a4c
```

_Body_

```
{
  "id": "evt_2b0f6a3e-7d41-4c58-9e0a-5c1d8f3b7a62",
  "type": "deal.stage_changed",
  "created": "2026-11-12T14:21:07.000Z",
  "api_version": "v1",
  "org_id": "5b1f0a52-6c0e-4c6e-9a53-2f0f0c6a9d11",
  "data": {
    "deal_id": "c4a1e7d2-9b3f-4e60-8d15-6f2a0b9c3e77",
    "campaign_id": "7c2f9a30-91b4-4d0e-8a1d-2e6b6f0c4a10",
    "from_stage": {
      "id": "9f1e4c22-6d7a-4f0b-8b3e-0c9a5d7e2a01",
      "name": "Convidados",
      "position": 0,
      "outcome": "station"
    },
    "to_stage": {
      "id": "4b8e7a11-2c5d-4e9f-a0b6-7d3c1f8e9a02",
      "name": "Contratados",
      "position": 1,
      "outcome": "station"
    },
    "changed_at": "2026-11-12T14:21:06.000Z"
  }
}
```

The notices carry ids, stage names, amounts and dates, never creators' personal data. For the details, read the API with the id.

#### The events

| Event | When it happens | Data sent |
| --- | --- | --- |
| `deal.stage_changed` | A card moves to another stage (including when it leaves the campaign). | `deal_id, campaign_id, from_stage, to_stage, changed_at` |
| `deliverable.approved` | A deliverable is approved, by a person or by the automatic approval by the guidelines (approved_by says who: vega or person). | `deliverable_id, deal_id, campaign_id, platform, format, approved_at, approved_by` |
| `fatura.closed` | The month's fatura closes, with its final total. | `fatura_id, cycle_key, kind, due_date, status, total_cents, closed_at` |
| `fatura.paid` | The fatura is paid in full. | `fatura_id, cycle_key, total_cents, paid_at` |
| `campaign.published` | A campaign is published. | `campaign_id, title, published_at` |
| `creator_search.ready` | A Vega AI search finished with results, made in Vega or through the API. Use search_id to read the creators. | `search_id, status, failure_code, credits_spent` |
| `creator_search.failed` | A Vega AI search failed. The credits went back to the company (credits_spent is 0) and failure_code says why. | `search_id, status, failure_code, credits_spent` |
| `creator_report.ready` | A simplified report is ready, asked for in Vega or through the API. Use report_id to read it. | `report_id, status, failure_code, credits_spent` |
| `creator_report.failed` | A simplified report failed. The credits went back to the company (credits_spent is 0) and failure_code says why. | `report_id, status, failure_code, credits_spent` |
| `deal.created` | A card is created in a campaign, in the app or through the API. | `deal_id, campaign_id, creator_id, stage, created_at` |
| `deal.accepted` | The creator accepts the card's invitation. | `deal_id, campaign_id, accepted_at` |
| `deal.exited` | A card leaves the campaign (paused or lost), with the reason. | `deal_id, campaign_id, outcome, reason, exited_at` |
| `deliverable.submitted` | The creator submits a deliverable for review. | `deliverable_id, deal_id, campaign_id, platform, format, submitted_at` |
| `deliverable.published` | A deliverable is published. | `deliverable_id, deal_id, campaign_id, platform, format, published_at` |
| `deliverable.verified` | Vega verifies the published post of a deliverable. | `deliverable_id, deal_id, campaign_id, verified_at` |
| `contract.signed` | A card's contract is signed by everyone. | `contract_id, deal_id, campaign_id, signed_at` |
| `payment.paid` | A creator's part of a fatura is paid. | `payment_id, fatura_id, creator_id, total_cents, paid_at` |
| `nota_fiscal.issued` | A tax invoice where the company is the buyer is issued. | `nota_fiscal_id, issuer_kind, fatura_id, amount_cents, issued_at` |
| `post.captured` | Vega captures a post of a campaign (hashtag or mention). | `post_id, campaign_id, platform, matched_type, captured_at` |
| `coupon.issued` | A coupon code is issued to a creator. | `coupon_id, benefit_id, deal_id, campaign_id, issued_at` |
| `sales.imported` | A cycle's sales land in Vega (spreadsheet, webhook or API). | `sales_cycle_id, campaign_id, cycle_key, rows, sales_cents, commission_cents, imported_at` |
| `content_approval.changed` | A campaign's content approval changes setting, in the app or through the API (changed_by says whether it was the API). | `campaign_id, before, after, changed_by, user_id, changed_at` |
| `content_check.completed` | Vega finishes checking a piece of content against the guidelines, once per check. It carries the result, what Vega did and the rules of the points outside, never the passage or the transcript. A person's later decision shows on the deliverable or the post. | `check_id, campaign_id, deal_id, deliverable_id, post_id, moment, status, result, vega_action, points, rule_ids, completed_at` |
| `sale.recorded` | A new line enters the sales ledger: an order waiting to be confirmed, a period total or an adjustment, from any door. Never carries the coupon code or the order number. | `entry_id, kind, state, channel, campaign_id, creator_id, coupon_id, day, value_cents` |
| `sale.confirmed` | A sales ledger line is confirmed, once: born confirmed (a period total, an adjustment) or when the order passes its waiting days. | `entry_id, kind, state, channel, campaign_id, creator_id, coupon_id, day, value_cents, confirmed_at` |

The Send test button sends a `webhook.test` event, whose `data` carries only the `endpoint_id`. Answer `2xx` to it too.

#### Check the signature

Anyone can find out your webhook's address; the signature proves the notice came from Vega. The `Vega-Signature` header carries the sending time (`t`) and the signature (`v1`), an HMAC-SHA256 of `t`, a dot and the body, with the whole `whsec_...` secret as the key.

1. Take the request's raw body, before parsing the JSON.
2. Compute the HMAC-SHA256 of `t.body` with your secret and compare it with `v1` in constant time (the functions below already do).
3. Refuse it if `t` is more than 5 minutes away from your clock: that stops old notices from being replayed.
4. If the signature does not match, answer `400`.

_Node.js: assinatura.js_

```
import { createHmac, timingSafeEqual } from 'node:crypto'

/**
 * segredo   o valor whsec_… mostrado uma única vez ao criar o webhook
 * corpo     o corpo CRU da requisição, como texto (não o JSON já convertido)
 * cabecalho o valor do cabeçalho Vega-Signature
 */
export function assinaturaValida(segredo, corpo, cabecalho, toleranciaS = 300) {
  let t = null
  const v1 = []
  for (const parte of String(cabecalho ?? '').split(',')) {
    const i = parte.indexOf('=')
    if (i < 0) continue
    const chave = parte.slice(0, i).trim()
    const valor = parte.slice(i + 1).trim()
    if (chave === 't') t = valor
    else if (chave === 'v1') v1.push(valor)
  }
  if (!/^\d+$/.test(t ?? '') || v1.length === 0) return false

  // Recusa mensagens antigas (ou do futuro): protege contra reenvio.
  if (Math.abs(Date.now() / 1000 - Number(t)) > toleranciaS) return false

  const esperado = createHmac('sha256', segredo).update(`${t}.${corpo}`).digest()
  return v1.some((candidato) => {
    const recebido = Buffer.from(candidato, 'hex')
    return recebido.length === esperado.length && timingSafeEqual(recebido, esperado)
  })
}
```

_Node.js: Express server_

```
import express from 'express'
import { assinaturaValida } from './assinatura.js'

const app = express()

// express.raw entrega o corpo sem mexer. Se o JSON for convertido antes,
// a assinatura deixa de bater.
app.post('/vega/webhook', express.raw({ type: 'application/json' }), (req, res) => {
  const corpo = req.body.toString('utf8')
  if (!assinaturaValida(process.env.VEGA_WEBHOOK_SECRET, corpo, req.get('Vega-Signature'))) {
    return res.sendStatus(400)
  }

  const evento = JSON.parse(corpo)
  // Guarde evento.id: o mesmo evento pode chegar mais de uma vez.
  console.log(evento.type, evento.id)

  res.sendStatus(200) // responda rápido; o trabalho pesado fica para depois
})

app.listen(3000)
```

_Python: assinatura.py_

```
from __future__ import annotations

import hashlib
import hmac
import time

def assinatura_valida(segredo: str, corpo: bytes, cabecalho: str | None, tolerancia_s: int = 300) -> bool:
    """segredo: o whsec_… mostrado uma única vez. corpo: os bytes crus da requisição."""
    t = None
    v1 = []
    for parte in (cabecalho or "").split(","):
        chave, sep, valor = parte.partition("=")
        if not sep:
            continue
        chave, valor = chave.strip(), valor.strip()
        if chave == "t":
            t = valor
        elif chave == "v1":
            v1.append(valor)
    # isascii(): str.isdigit() also accepts digits such as "²", which int() refuses.
    if t is None or not (t.isascii() and t.isdigit()) or not v1:
        return False

    # Recusa mensagens antigas (ou do futuro): protege contra reenvio.
    if abs(time.time() - int(t)) > tolerancia_s:
        return False

    esperado = hmac.new(segredo.encode(), t.encode() + b"." + corpo, hashlib.sha256).hexdigest().encode()
    # Compara bytes: compare_digest recusa (TypeError) um texto com caractere não ASCII.
    return any(hmac.compare_digest(esperado, candidato.encode("utf-8")) for candidato in v1)
```

_Python: Flask server_

```
import os

from flask import Flask, abort, request

from assinatura import assinatura_valida

app = Flask(__name__)

@app.post("/vega/webhook")
def vega_webhook():
    corpo = request.get_data()  # bytes crus, antes de qualquer conversão
    if not assinatura_valida(os.environ["VEGA_WEBHOOK_SECRET"], corpo, request.headers.get("Vega-Signature")):
        abort(400)

    evento = request.get_json()
    # Guarde evento["id"]: o mesmo evento pode chegar mais de uma vez.
    print(evento["type"], evento["id"])

    return "", 200  # responda rápido; o trabalho pesado fica para depois
```

#### Delivery and retries

- Answer with any `2xx` within 10 seconds and leave the heavy work for later.
- The address must be `https`, with a domain name (no IP address or internal network), on port 443. Redirects are not followed.
- Any other answer, or none, counts as a failure. Vega tries again at growing intervals, for about 22 hours, 10 attempts in all:

| Attempt | When |
| --- | --- |
| 1 | Right away |
| 2 | 30 s after the previous one |
| 3 | 2 min after the previous one |
| 4 | 10 min after the previous one |
| 5 | 30 min after the previous one |
| 6 | 1 h after the previous one |
| 7 | 2 h after the previous one |
| 8 | 4 h after the previous one |
| 9 | 6 h after the previous one |
| 10 | 8 h after the previous one |

- If the address fails for 72 hours in a row, Vega turns the webhook off and tells the company's administrators by e-mail and inside Vega. Fix the address and turn it on again in Integrations.
- The order of events is not guaranteed and the same event can arrive more than once. Use the `id` (`evt_...`, also in the `Vega-Event-Id` header) to ignore repeats, and the date inside `data` to know which is newest.

In Vega

1. Open Settings, Integrations. On the Webhooks card, click Create webhook.
2. Enter the address (`https`) and tick the events you want.
3. Keep the `whsec_...` secret: it appears only once, and it is what you check the signature with.
4. Click Send test. The webhook's delivery list shows each send, with its status, the HTTP code and the time of each attempt.

## Permissions

Each key and each connected app carries only the permissions ticked when the key was created or the app approved. A call outside them answers `insufficient_scope`. There are three kinds: read, act (change something in campaigns) and spend credits.

| Permission | What the key can do | Who can grant it |
| --- | --- | --- |
| Read |  |  |
| `campaigns:read` Campaigns | Read the campaigns, each one's stages and the campaign summary.In the reference: [List campaigns](https://use-vega.com/en/desenvolvedores/referencia#op-listCampaigns) · [See a campaign](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaign) · [Campaign summary](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignSummary) · [Get the content approval](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignContentApproval) | Whoever holds the Integrations permission. |
| `deals:read` Cards | Read the cards: stage, creator, contract (status and dates), deliverables and the post metrics measured through the creator's own account.In the reference: [List cards (deals)](https://use-vega.com/en/desenvolvedores/referencia#op-listDeals) · [See a card](https://use-vega.com/en/desenvolvedores/referencia#op-getDeal) | Whoever holds the Integrations permission. |
| `deliverables:read` Deliverables | Read the deliverables: due date, status, the published post and its verification.In the reference: [List deliverables](https://use-vega.com/en/desenvolvedores/referencia#op-listDeliverables) · [See a deliverable](https://use-vega.com/en/desenvolvedores/referencia#op-getDeliverable) | Whoever holds the Integrations permission. |
| `coupons:read` Coupons | Read the coupon codes and each one's benefit, on the cards too.In the reference: [List coupons](https://use-vega.com/en/desenvolvedores/referencia#op-listCoupons) · [See a coupon](https://use-vega.com/en/desenvolvedores/referencia#op-getCoupon) · [List benefits](https://use-vega.com/en/desenvolvedores/referencia#op-listBenefits) · [Get a benefit](https://use-vega.com/en/desenvolvedores/referencia#op-getBenefit) | Whoever holds the Integrations permission. |
| `sales:read` Sales | Read the sales sheets and the sales deliveries, with their error codes.In the reference: [List sales sheets](https://use-vega.com/en/desenvolvedores/referencia#op-listSales) · [See a sales sheet](https://use-vega.com/en/desenvolvedores/referencia#op-getSalesCycle) · [List sales deliveries](https://use-vega.com/en/desenvolvedores/referencia#op-listSalesDeliveries) · [See a sales delivery](https://use-vega.com/en/desenvolvedores/referencia#op-getSalesDelivery) · [List sales entries](https://use-vega.com/en/desenvolvedores/referencia#op-listSalesEntries) | Whoever holds the Integrations permission. |
| `faturas:read` Faturas | Read the monthly faturas: status, due date and totals.In the reference: [List faturas](https://use-vega.com/en/desenvolvedores/referencia#op-listFaturas) · [See a fatura](https://use-vega.com/en/desenvolvedores/referencia#op-getFatura) | Whoever holds the Integrations permission. |
| `reports:read` Reports | Read the reports shared with the company and each one's table.In the reference: [List reports](https://use-vega.com/en/desenvolvedores/referencia#op-listReports) · [See a report](https://use-vega.com/en/desenvolvedores/referencia#op-getReport) · [See a report's data](https://use-vega.com/en/desenvolvedores/referencia#op-getReportData) | Whoever holds the Integrations permission. |
| `notas_fiscais:read` Tax invoices | Read and download the tax invoices (NFS-e) where the company is the buyer.In the reference: [List tax invoices](https://use-vega.com/en/desenvolvedores/referencia#op-listNotasFiscais) · [See a tax invoice](https://use-vega.com/en/desenvolvedores/referencia#op-getNotaFiscal) | Whoever holds the Integrations permission. |
| `prospecting:read` Searches, creator reports and balance | Read the Vega AI searches, the simplified reports, the Saved lists, the credit balance and the prices.In the reference: [See the balance and the prices](https://use-vega.com/en/desenvolvedores/referencia#op-getCredits) · [List searches](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorSearches) · [See a search](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorSearch) · [List creator reports](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorReports) · [See a creator report](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorReport) · [List saved lists](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorLists) · [See a saved list](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorList) | Whoever holds the Integrations permission. |
| `creators:read` Creators | Read the creators the company works with: name, handle, networks and each one's cards. No audience numbers.In the reference: [List creators](https://use-vega.com/en/desenvolvedores/referencia#op-listCreators) · [See a creator](https://use-vega.com/en/desenvolvedores/referencia#op-getCreator) | Whoever holds the Integrations permission. |
| `payments:read` Agreed values and payments | Read the value agreed with each creator and each creator's part of the faturas: gross, fees, total and status.In the reference: [List payments](https://use-vega.com/en/desenvolvedores/referencia#op-listPayments) · [See a payment](https://use-vega.com/en/desenvolvedores/referencia#op-getPayment) | Whoever holds the Integrations permission. |
| `monitoring:read` Monitoramento | Read the posts Monitoramento captured. Numbers come only when Vega or the platform measured them.In the reference: [List Monitoramento posts](https://use-vega.com/en/desenvolvedores/referencia#op-listPosts) · [See a post](https://use-vega.com/en/desenvolvedores/referencia#op-getPost) | Whoever holds the Integrations permission. |
| `gamification:read` Gamificação | Read the Gamificação programs, their confirmed cycles and each creator's prizes.In the reference: [List Gamificação programs](https://use-vega.com/en/desenvolvedores/referencia#op-listGamificationPrograms) · [See a Gamificação program](https://use-vega.com/en/desenvolvedores/referencia#op-getGamificationProgram) | Whoever holds the Integrations permission. |
| `agenda:read` Agenda | Read the Agenda: the company's events, the open events Vega approved and the campaigns' periods.In the reference: [List the Agenda](https://use-vega.com/en/desenvolvedores/referencia#op-listEvents) | Whoever holds the Integrations permission. |
| Act |  |  |
| `deals:write` Change cards | Add a creator to a campaign, move a card to another stage and add a note to a card.In the reference: [Add a creator to a campaign](https://use-vega.com/en/desenvolvedores/referencia#op-addDealToCampaign) · [Move a card](https://use-vega.com/en/desenvolvedores/referencia#op-moveDeal) · [Add a note to a card](https://use-vega.com/en/desenvolvedores/referencia#op-addDealNote) | Whoever holds the Integrations permission and also Invite and add creators and Work on deals. Vega checks again on every call. |
| `deliverables:write` Review deliverables | Approve a deliverable or ask the creator for changes.In the reference: [Review a deliverable](https://use-vega.com/en/desenvolvedores/referencia#op-reviewDeliverable) | Whoever holds the Integrations permission and also Approve content with evidence. Vega checks again on every call. |
| `coupons:write` Create and issue coupons | Create a coupon code for a card's creator and mark the code as issued.In the reference: [Create a coupon code](https://use-vega.com/en/desenvolvedores/referencia#op-createCouponCode) · [Issue a coupon code](https://use-vega.com/en/desenvolvedores/referencia#op-issueCouponCode) | Whoever holds the Integrations permission and also Manage coupons. Vega checks again on every call. |
| `sales:write` Send sales | Send a campaign's sales for its open cycle.In the reference: [Send sales](https://use-vega.com/en/desenvolvedores/referencia#op-sendSales) · [Send orders](https://use-vega.com/en/desenvolvedores/referencia#op-sendOrders) | Whoever holds the Integrations permission and also Return the sales sheet. Vega checks again on every call. |
| `content_approval:write` Content approval | Choose how a campaign's content is approved and change its rules. Choosing a checking setting spends credits per video checked.In the reference: [Set the content approval](https://use-vega.com/en/desenvolvedores/referencia#op-setContentApprovalMode) · [Add a rule](https://use-vega.com/en/desenvolvedores/referencia#op-createContentApprovalRule) · [Change a rule](https://use-vega.com/en/desenvolvedores/referencia#op-updateContentApprovalRule) · [Remove a rule](https://use-vega.com/en/desenvolvedores/referencia#op-deleteContentApprovalRule) | Whoever holds the Integrations permission and also Edit column automations. Vega checks again on every call. |
| Spend credits |  |  |
| `credits:spend` Spend credits | Run a search, see more results and generate a simplified report, with the company's credits.In the reference: [Run a search](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorSearch) · [See more results](https://use-vega.com/en/desenvolvedores/referencia#op-moreCreatorSearch) · [Generate a creator report](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorReport) | Whoever holds the Integrations permission and also Use credits. Vega checks again on every call. |

### What a key can change

Reading changes nothing. Reads use database access that can only read.

Changing something in campaigns (adding a creator, moving a card or adding a note to it, reviewing a deliverable, creating or issuing a coupon, sending sales) works only on a key or an app that was given the act permission for it. These permissions start turned off, and only someone who holds, in Vega, the permission to do the same thing in the app can grant them.

Nothing here pays, bills or sends a contract. Moving a card into a stage that releases to the fatura or sends a contract, or out of such a stage, is refused with `requires_app`: that change is made in Vega.

Actions in campaigns are switched on for every company. `GET /me` shows, in `features`, what is switched on for yours. If Vega switches the actions off for a company, they stop appearing in Integrations and the calls answer `feature_unavailable`, with who to talk to.

### How an act or spend permission is granted

- They are never ticked by default. On the key form they appear only to someone who holds the matching app permission (the Who can grant it column above). On the screen where you approve an app, such as Claude or ChatGPT, each one has a switch, which starts off.
- Every change and every spend is made in the name of one person: whoever created the key or approved the app. On every call, Vega checks that this person is still in the company and still holds the permission. If not, the answer is `write_not_allowed` or `spend_not_allowed`, and nothing changes and nothing is charged. Someone with the permission creates a new key or connects the app again.
- In Integrations, each key and each app shows what it may change and how many credits it spent this month.

### What is shown and what never is

Shown: the company's data in Vega, meaning campaigns and stages, cards (with the contract's status and dates), the creators the company works with (name, handle and networks), deliverables, coupons, sales, faturas, tax invoices, reports, Gamificação, the Agenda, searches and simplified reports.

Post metrics measured through the creator's own connected account are shown on the card and in the campaign summary. On Monitoramento posts, numbers are shown only when Vega or the platform measured them; on the others, `metrics` is `null`. A creator's followers and engagement are shown only when Vega measured them itself, in a search or a simplified report.

The value agreed with each creator and the payments per creator are shown only with the `payments:read` permission. Each card's coupon codes are shown only with the `coupons:read` permission.

Monitoramento posts and Gamificação follow the company's plan, as in the app: if the plan does not include the module, those reads answer `module_not_in_plan`, and the campaign summary adds up the cards' own metrics only.

Never shown: e-mail, phone, CPF, Pix key, bank details, the contract document, post captions and numbers bought from a vendor. Reads return only what is stored in Vega, without asking anyone else on each call.

### Keys and apps that already exist

A key or a connected app gains no permission by itself. To use a new permission, create a key with it, or connect the app again and approve.

## AI assistants (MCP)

MCP is the standard way for an AI assistant, such as Claude or ChatGPT, to query a system on its own. With Vega connected, you ask in plain language and the assistant looks for the answer in your company's data. It sees and does only what the approved key or app allows (see [Permissions](#permissoes)). The connector's address is this:

_MCP address_

```
https://use-vega.com/api/mcp
```

There are two ways, and the first is the simplest for someone outside IT.

- **No key, one click (Claude and ChatGPT):** you add the address above as a connector, sign in to Vega with your account and approve. No key changes hands.
- **With a key (Claude Code, Cursor and the Claude Desktop file):** you paste the `vk_` key into the tool's configuration.

Steps checked against the vendors' own pages on November 12, 2026. Those tools' menus change now and then and many are in English, so the names below are as they appear there. Sources: [Claude](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp), [ChatGPT](https://developers.openai.com/apps-sdk/deploy/connect-chatgpt), [Claude Code](https://code.claude.com/docs/en/mcp), [Cursor](https://cursor.com/docs/context/mcp), [mcp-remote](https://github.com/geelen/mcp-remote).

### Claude (claude.ai and Claude Desktop)

Claude connectors work on the website and in the desktop app. Anthropic makes the connection, from its own cloud, so the address must be public, as Vega's is.

1. Open "Customize" and then "Connectors".
2. Click "+ Add" and choose "Add custom connector".
3. Give it a name (for example, "Vega") and paste the MCP address above. Click "Continue".
4. Under "Authentication", keep "Sign in now". If Claude asks how it should identify itself ("OAuth client"), choose "Register automatically": Vega accepts automatic registration.
5. Click "Add". A Vega window opens: sign in with your account, check the app name and the permissions, decide whether the app may spend credits and make changes in campaigns (these options start off) and click Allow access. Vega asks for two-step verification before allowing; if you have not turned it on yet, you turn it on there and come back to the same request.
6. In a conversation, click the "+" in the bottom left corner, then "Connectors", and turn Vega on.

On Claude's Team and Enterprise plans, the organization's owner adds the connector, in "Organization settings", "Connectors", "Add", "Custom", "Web". Then each person opens "Customize", "Connectors" and clicks "Connect". Prefer signing in. Claude also accepts a fixed header in "Request headers" (`Authorization` with the value `Bearer vk_...`), but note: on the Team and Enterprise plans, a key placed there works for everyone in the Claude organization, is stored in Claude and does not appear in Connected apps to be disconnected person by person. If you use it, create a key with only the permissions needed and an expiry date.

### ChatGPT

1. Open [chatgpt.com/plugins](https://chatgpt.com/plugins).
2. Click the "+" button and choose "Add custom MCP server".
3. Give it a name and a description (for example, "Vega" and "My company's influencer data").
4. Under "Connection", paste the MCP address, with the `/api/mcp` path at the end.
5. Set authentication to OAuth, read the notice and click "I understand and want to continue".
6. Click "Create as a plugin". A Vega window opens: sign in with your account and click Allow access.
7. In a new conversation, type `@` and choose Vega.

Your ChatGPT workspace rules may restrict custom MCP servers. If the button does not appear, ask the workspace administrator.

If Claude or ChatGPT shows an error right when you add the connector (before the Vega window opens), wait a minute and try again. If it keeps happening, use the key path below and tell Vega support, at [contato@use-vega.com](mailto:contato@use-vega.com), the time of the attempt.

### Claude Code

In the terminal, with the key created in Settings, Integrations:

_bash_

```
claude mcp add --transport http vega https://use-vega.com/api/mcp \
  --header "Authorization: Bearer vk_SUA_CHAVE"
```

### Cursor

Save this file as `.cursor/mcp.json` in the project (or `~/.cursor/mcp.json` to apply it everywhere) and keep the key in the `VEGA_API_KEY` environment variable. Cursor replaces `${env:VEGA_API_KEY}` with the variable's value.

_mcp.json_

```
{
  "mcpServers": {
    "vega": {
      "url": "https://use-vega.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:VEGA_API_KEY}"
      }
    }
  }
}
```

### Claude Desktop through the configuration file

Prefer the connector above. If you need the `claude_desktop_config.json` file (for example, to pin a key), use `mcp-remote`, which needs Node.js installed. The header goes with no space after the colon, and the value sits in the `VEGA_AUTH` variable, because some apps break arguments that contain a space.

_claude_desktop_config.json_

```
{
  "mcpServers": {
    "vega": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://use-vega.com/api/mcp",
        "--header",
        "Authorization:${VEGA_AUTH}"
      ],
      "env": {
        "VEGA_AUTH": "Bearer vk_SUA_CHAVE"
      }
    }
  }
}
```

### Task tools

Four tools do the work of several reads and take a name instead of an id:

- `find`: finds campaigns, creators and cards by a name or handle.
- `what_needs_attention`: the company at a glance, with the deliverables to review, the late ones, the cards waiting for a contract and the open fatura.
- `campaign_summary`: a campaign's summary by its name. If more than one campaign has that name, the assistant gets the list and asks which one.
- `creator_overview`: one creator at a glance, with their cards, payments, posts and latest simplified report. Each part comes only with its permission.

Lists reach the assistant in the compact form (only each item's essentials), so more fits in a conversation.

### Tools that change data

Twelve tools change something in campaigns and are marked "Changes data" in the table below: add a creator to a campaign, move a card, add a note to a card, review a deliverable, create a coupon, issue a coupon, send sales, send orders (only with the orders switch on for the company), set the content approval and add, change and remove one of its rules. Choosing a checking approval spends credits per video checked; Vega checks what is said in the audio and written in the caption, never the images. Claude and ChatGPT ask for your confirmation before using each one. Moving a card and reviewing a deliverable may notify the creator; an accepted sales delivery tells the campaign's creators. They work only with the act permissions, and none of them pays anyone.

### Ready-made prompts

The connector brings three prompts (MCP prompts), in Portuguese or English. Assistants that show MCP prompts list them next to the connector:

- **Campaign status** (`campaign_status`): a campaign's summary and what needs attention in it.
- **Reconcile last month's payments** (`reconcile_last_month_payments`): the month's fatura, each creator's part and the tax invoices.
- **Prospect into a campaign** (`prospect_into_campaign`): search for creators, generate the report of the best ones and add the chosen one to the campaign.

### All the tools

The assistant uses only the tools the approved key or app allows.

| Tool | What it does | Permission |
| --- | --- | --- |
| `whoami` | [Who am I](https://use-vega.com/en/desenvolvedores/referencia#op-me) | None |
| `list_campaigns` | [List campaigns](https://use-vega.com/en/desenvolvedores/referencia#op-listCampaigns) | Campaigns |
| `get_campaign` | [See a campaign](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaign) | Campaigns |
| `list_deals` | [List cards (deals)](https://use-vega.com/en/desenvolvedores/referencia#op-listDeals) | Cards |
| `get_deal` | [See a card](https://use-vega.com/en/desenvolvedores/referencia#op-getDeal) | Cards |
| `list_deliverables` | [List deliverables](https://use-vega.com/en/desenvolvedores/referencia#op-listDeliverables) | Deliverables |
| `get_deliverable` | [See a deliverable](https://use-vega.com/en/desenvolvedores/referencia#op-getDeliverable) | Deliverables |
| `list_coupons` | [List coupons](https://use-vega.com/en/desenvolvedores/referencia#op-listCoupons) | Coupons |
| `get_coupon` | [See a coupon](https://use-vega.com/en/desenvolvedores/referencia#op-getCoupon) | Coupons |
| `list_sales` | [List sales sheets](https://use-vega.com/en/desenvolvedores/referencia#op-listSales) | Sales |
| `get_sales_cycle` | [See a sales sheet](https://use-vega.com/en/desenvolvedores/referencia#op-getSalesCycle) | Sales |
| `list_faturas` | [List faturas](https://use-vega.com/en/desenvolvedores/referencia#op-listFaturas) | Faturas |
| `get_fatura_status` | [See a fatura](https://use-vega.com/en/desenvolvedores/referencia#op-getFatura) | Faturas |
| `list_reports` | [List reports](https://use-vega.com/en/desenvolvedores/referencia#op-listReports) | Reports |
| `get_report` | [See a report](https://use-vega.com/en/desenvolvedores/referencia#op-getReport) | Reports |
| `list_notas_fiscais` | [List tax invoices](https://use-vega.com/en/desenvolvedores/referencia#op-listNotasFiscais) | Tax invoices |
| `get_nota_fiscal` | [See a tax invoice](https://use-vega.com/en/desenvolvedores/referencia#op-getNotaFiscal) | Tax invoices |
| `get_credit_balance` | [See the balance and the prices](https://use-vega.com/en/desenvolvedores/referencia#op-getCredits) | Searches, creator reports and balance |
| `list_creator_searches` | [List searches](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorSearches) | Searches, creator reports and balance |
| `get_creator_search` | [See a search](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorSearch) | Searches, creator reports and balance |
| `search_creators` | [Run a search](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorSearch) Spends credits | Spend credits |
| `more_creator_search_results` | [See more results](https://use-vega.com/en/desenvolvedores/referencia#op-moreCreatorSearch) Spends credits | Spend credits |
| `list_creator_reports` | [List creator reports](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorReports) | Searches, creator reports and balance |
| `get_creator_report` | [See a creator report](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorReport) | Searches, creator reports and balance |
| `generate_creator_report` | [Generate a creator report](https://use-vega.com/en/desenvolvedores/referencia#op-createCreatorReport) Spends credits | Spend credits |
| `list_creators` | [List creators](https://use-vega.com/en/desenvolvedores/referencia#op-listCreators) | Creators |
| `get_creator` | [See a creator](https://use-vega.com/en/desenvolvedores/referencia#op-getCreator) | Creators |
| `list_creator_lists` | [List saved lists](https://use-vega.com/en/desenvolvedores/referencia#op-listCreatorLists) | Searches, creator reports and balance |
| `get_creator_list` | [See a saved list](https://use-vega.com/en/desenvolvedores/referencia#op-getCreatorList) | Searches, creator reports and balance |
| `list_payments` | [List payments](https://use-vega.com/en/desenvolvedores/referencia#op-listPayments) | Agreed values and payments |
| `get_payment` | [See a payment](https://use-vega.com/en/desenvolvedores/referencia#op-getPayment) | Agreed values and payments |
| `list_gamification_programs` | [List Gamificação programs](https://use-vega.com/en/desenvolvedores/referencia#op-listGamificationPrograms) | Gamificação |
| `get_gamification_program` | [See a Gamificação program](https://use-vega.com/en/desenvolvedores/referencia#op-getGamificationProgram) | Gamificação |
| `list_events` | [List the Agenda](https://use-vega.com/en/desenvolvedores/referencia#op-listEvents) | Agenda |
| `list_posts` | [List Monitoramento posts](https://use-vega.com/en/desenvolvedores/referencia#op-listPosts) | Monitoramento |
| `get_post` | [See a post](https://use-vega.com/en/desenvolvedores/referencia#op-getPost) | Monitoramento |
| `campaign_summary` | [Campaign summary](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignSummary) | Campaigns |
| `what_needs_attention` | [What needs attention](https://use-vega.com/en/desenvolvedores/referencia#op-getOverview) | None |
| `find` | [Find](https://use-vega.com/en/desenvolvedores/referencia#op-search) | None |
| `get_report_data` | [See a report's data](https://use-vega.com/en/desenvolvedores/referencia#op-getReportData) | Reports |
| `get_sales_delivery` | [See a sales delivery](https://use-vega.com/en/desenvolvedores/referencia#op-getSalesDelivery) | Sales |
| `add_creator_to_campaign` | [Add a creator to a campaign](https://use-vega.com/en/desenvolvedores/referencia#op-addDealToCampaign) Changes data | Change cards |
| `move_deal` | [Move a card](https://use-vega.com/en/desenvolvedores/referencia#op-moveDeal) Changes data | Change cards |
| `add_deal_note` | [Add a note to a card](https://use-vega.com/en/desenvolvedores/referencia#op-addDealNote) Changes data | Change cards |
| `review_deliverable` | [Review a deliverable](https://use-vega.com/en/desenvolvedores/referencia#op-reviewDeliverable) Changes data | Review deliverables |
| `create_coupon_code` | [Create a coupon code](https://use-vega.com/en/desenvolvedores/referencia#op-createCouponCode) Changes data | Create and issue coupons |
| `issue_coupon_code` | [Issue a coupon code](https://use-vega.com/en/desenvolvedores/referencia#op-issueCouponCode) Changes data | Create and issue coupons |
| `send_sales` | [Send sales](https://use-vega.com/en/desenvolvedores/referencia#op-sendSales) Changes data | Send sales |
| `get_content_approval` | [Get the content approval](https://use-vega.com/en/desenvolvedores/referencia#op-getCampaignContentApproval) | Campaigns |
| `set_content_approval_mode` | [Set the content approval](https://use-vega.com/en/desenvolvedores/referencia#op-setContentApprovalMode) Changes data | Content approval |
| `add_content_approval_rule` | [Add a rule](https://use-vega.com/en/desenvolvedores/referencia#op-createContentApprovalRule) Changes data | Content approval |
| `update_content_approval_rule` | [Change a rule](https://use-vega.com/en/desenvolvedores/referencia#op-updateContentApprovalRule) Changes data | Content approval |
| `remove_content_approval_rule` | [Remove a rule](https://use-vega.com/en/desenvolvedores/referencia#op-deleteContentApprovalRule) Changes data | Content approval |
| `list_benefits` | [List benefits](https://use-vega.com/en/desenvolvedores/referencia#op-listBenefits) | Coupons |
| `get_benefit` | [Get a benefit](https://use-vega.com/en/desenvolvedores/referencia#op-getBenefit) | Coupons |
| `send_orders` | [Send orders](https://use-vega.com/en/desenvolvedores/referencia#op-sendOrders) Changes data | Send sales |
| `list_sales_entries` | [List sales entries](https://use-vega.com/en/desenvolvedores/referencia#op-listSalesEntries) | Sales |

### Building your own app

If you write your own MCP or OAuth client, Vega follows the open standards, so the configuration is discovered on its own from the MCP address:

- Protected resource metadata: `https://use-vega.com/.well-known/oauth-protected-resource/api/mcp`
- Authorization server metadata: `https://use-vega.com/.well-known/oauth-authorization-server`
- Dynamic client registration (RFC 7591), authorization code with PKCE S256 (required) and `resource` (RFC 8707).
- The access token lasts 1 hour. The refresh token lasts 30 days and rotates on each use; reusing a token that was already rotated revokes the whole connection.

A complete example, in three steps. First, register the app, once. The answer carries the `client_id`, which starts with `vcl_`:

_bash_

```
curl -s -X POST https://use-vega.com/api/oauth2/register \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Meu app",
    "redirect_uris": ["https://seu-app.example/callback"],
    "token_endpoint_auth_method": "none"
  }'
```

A registered app that nobody ends up using (no approved request, no code exchanged) is deleted 7 days after registration. If that happens, register again.

Then generate a random `code_verifier` (43 to 128 characters), compute the `code_challenge` (its SHA-256 in base64url) and open this address in the person's browser. In `scope`, ask only for the permissions the app needs; in `resource`, send the MCP address (or the API's, for an app that calls the REST API):

_Authorization address_

```
https://use-vega.com/api/oauth2/authorize
  ?client_id=vcl_SEU_CLIENT_ID
  &redirect_uri=https%3A%2F%2Fseu-app.example%2Fcallback
  &response_type=code
  &code_challenge=BASE64URL_SHA256_DO_CODE_VERIFIER
  &code_challenge_method=S256
  &scope=campaigns%3Aread%20deals%3Aread
  &resource=https%3A%2F%2Fuse-vega.com%2Fapi%2Fmcp
  &state=VALOR_ALEATORIO
```

Vega asks the person to sign in and shows the approval screen, with what has to be ready: the company's plan includes the API, the API is switched on for the company, the person is an Administrator and has two-step verification. If the plan does not include the API or it is not switched on for the company, the screen says who fixes it and does not let anyone approve. Once approved, the browser goes back to your return address with `code` and the same `state`. Once refused, it goes back with `error=access_denied`.

Finally, exchange the code for the tokens. The code lasts 10 minutes and one exchange:

_bash_

```
curl -s -X POST https://use-vega.com/api/oauth2/token \
  -d grant_type=authorization_code \
  -d client_id=vcl_SEU_CLIENT_ID \
  -d code=vac_CODIGO_QUE_VOLTOU \
  --data-urlencode "redirect_uri=https://seu-app.example/callback" \
  -d code_verifier=SEU_CODE_VERIFIER
```

_Response (200)_

```
{
  "access_token": "vat_SEU_TOKEN_DE_ACESSO",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "vrt_SEU_TOKEN_DE_RENOVACAO",
  "scope": "campaigns:read deals:read"
}
```

Use the `access_token` in the `Authorization: Bearer` header. The `scope` field of the answer says what was actually granted, which can be less than the app asked for. An app that does not belong to a known vendor appears on the approval screen as "Unverified app", with the address the access goes to.

Someone in the company with the Integrations permission approves the connection. Connected apps appear in Settings, Integrations, and can be disconnected there at any time: the app's next call already gets `invalid_token`.

## Errors

Every error has the same shape: a stable `code` your code can test, a message in English and the `request_id`. Keep the `request_id`: Vega support answers at [contato@use-vega.com](mailto:contato@use-vega.com) and finds the call by it.

_Response (401)_

```
{
  "error": {
    "code": "invalid_token",
    "message": "The access token is invalid, expired or revoked.",
    "request_id": "req_01JC8Q3X5Z"
  }
}
```

Some errors carry `details`, with what is missing for the call to work. A change Vega refuses because it touches money or a contract names the stage and the reason:

_Response (409)_

```
{
  "error": {
    "code": "requires_app",
    "message": "This change moves money or sends a contract, which is done only in the Vega app. Nothing was changed.",
    "request_id": "req_01JD2M8Q4T",
    "details": {
      "stage": {
        "id": "1d6c3b44-8e2f-4a7d-9c5b-3e0f7a1d6b03",
        "name": "Concluídos"
      },
      "reason": "payment"
    }
  }
}
```

Whenever a change is refused, nothing was changed.

### The error says what to do

When there is a next step, it comes in `details.next_step`, one sentence in English, and `details.who_can_fix` says who fixes it: `vega_support` (Vega) or `company_admin` (an Administrator of the company).

A valid key never gets `not_found` because something is switched off. If the API is not switched on for the company, the answer is `api_not_enabled`:

_Response (403)_

```
{
  "error": {
    "code": "api_not_enabled",
    "message": "The API is not switched on for this company yet. Vega support can switch it on: write to contato@use-vega.com.",
    "request_id": "req_01JD2M8Q4T",
    "details": {
      "next_step": "Write to contato@use-vega.com with this request_id.",
      "who_can_fix": "vega_support"
    }
  }
}
```

If a group of operations is switched off for the company, the answer is `feature_unavailable`, and `details.feature` says which: `paid_data_actions` (search and reports), `workflow_writes` (changes to campaigns) or `sales_orders` (sending orders). `GET /me` shows all three in `features`, to check before calling.

When a permission is missing, `details.required_scope` names it, and the same name comes in the `WWW-Authenticate` header:

_Response (403)_

```
{
  "error": {
    "code": "insufficient_scope",
    "message": "The credential does not carry the permission this operation needs: deals:write.",
    "request_id": "req_01JD2M8Q4T",
    "details": {
      "required_scope": "deals:write",
      "next_step": "Create an API key with the permission deals:write in Configurações > Integrações, or reconnect the app and approve it."
    }
  }
}
```

With no key, or a key that does not exist, has expired or was revoked, none of this appears: the answer is still `unauthorized` or `invalid_token`.

| Code | HTTP | What it means |
| --- | --- | --- |
| `unauthorized` | 401 | The call came without a key, or the Authorization header is malformed. |
| `invalid_token` | 401 | The key or token does not exist, has expired or was revoked. The message is the same in all three cases on purpose. |
| `insufficient_scope` | 403 | The key does not have the permission this call needs. details.required_scope names it, and the same name comes in the WWW-Authenticate header. Create another key with it, or connect the app again and approve. |
| `module_not_in_plan` | 403 | The company's current plan does not include the API, or the Monitoramento or Gamificação module the read needs. details.module says which: api, monitoring or gamification. |
| `api_not_enabled` | 403 | The key is valid, but the API is not switched on for your company yet. Vega switches it on: write to contato@use-vega.com with the request_id. |
| `not_found` | 404 | The address does not exist, the id does not exist or is malformed, or the item belongs to another company. All of these answer the same. With a valid key, something switched off for the company never answers not_found: it answers api_not_enabled or feature_unavailable, with what to do. |
| `invalid_request` | 400 | A parameter is invalid, for example a limit above 100 or a cursor that was changed. |
| `method_not_allowed` | 405 | This address does not accept that method. Reads are GET; paid actions and changes are POST. The Allow header says what is accepted. |
| `file_unavailable` | 409 | The invoice's file cannot be downloaded now: Vega does not hold that file yet, or it did not pass Vega's file check. The invoice's data comes in the invoice read, and the document can be looked up at the issuer with provider_reference. |
| `rate_limited` | 429 | Too many calls in one minute. Wait for the time in the Retry-After header (the same number comes in details.retry_after_seconds). |
| `internal_error` | 500 | An error on our side. Try again; if it keeps happening, write to contato@use-vega.com with the request_id. |
| `insufficient_credits` | 402 | The company does not have enough credits for this action. Nothing was charged. details says how many credits the action needs (credits_needed), the current balance (balance) and where to buy (buy_url). When the company's plan does not buy credits in the app, buy_url is absent and details.next_step says who to talk to. |
| `trial_limit` | 402 | The free trial does not allow this action now. details.reason says why: the day's limit (daily_cap), the trial credits ran out (allowance), the trial has not started (not_started) or has ended (ended), or the company has no access (no_access). |
| `spend_not_allowed` | 403 | The person responsible for the key (who created it) or for the app (who approved it) can no longer spend credits: they left the company or lost the Use credits permission. Nothing was charged. Someone with that permission has to create a new key or connect the app again. |
| `feature_unavailable` | 409 | Something the call uses is not switched on for your company: searches and reports through the API (details.feature paid_data_actions), changes to campaigns through the API (details.feature workflow_writes), or the Vega AI search or the simplified report. Nothing was charged or changed. Vega switches it on: write to contato@use-vega.com. GET /me shows what is switched on, in features. |
| `profile_unavailable` | 422 | The profile cannot be used: it was not found, is private, changed its name or asked not to appear in Vega. Nothing was charged. |
| `conflict` | 409 | The request does not fit the state of the resource, for example asking for more results of a search that has not finished or has already shown everything. Nothing was charged. |
| `temporarily_unavailable` | 503 | Unavailable for a moment. If there was a debit, the credits are already back (details.credits_refunded). Try again after the Retry-After time (details.retry_after_seconds). |
| `write_not_allowed` | 403 | The person responsible for the key or the app can no longer make this change: they left the company or lost the permission. Nothing was changed. Someone with the permission has to create a new key or connect the app again. |
| `requires_app` | 409 | The change moves money or sends a contract, which is done only in the Vega app. details names the stage and the reason. Nothing was changed. |
| `refused` | 422 | Vega refused the change (details.reason says why; on a card, details.missing lists the required fields that are missing). Nothing was changed. |

## Limits

There is no daily limit. The limits are per minute and exist so that a program stuck in a loop gets in nobody's way:

- **Reads:** 60 to 600 per minute per key or app, depending on the plan. The whole company gets 2 times that number, so creating more keys does not raise the limit. The `/me` read shows yours.
- **Paid actions** (run a search, see more results, generate a report): 20 per minute per key or app and 40 for the whole company, on top of the read limit.
- **Changes in campaigns:** 60 per minute per key or app and 120 for the whole company, on top of the read limit.
- **One sales delivery:** up to 5000 rows and 2 MB.

Every answer says where you stand:

_Headers_

```
HTTP/2 200
content-type: application/json
etag: W/"3f1c9a6b2d7e48a05c9b1e0d4a7f6c21"
ratelimit-limit: 300
ratelimit-remaining: 297
ratelimit-reset: 41
x-request-id: req_01JC8Q3X5Z
```

- `RateLimit-Limit`: how many reads the key can make per minute.
- `RateLimit-Remaining`: how many are left this minute.
- `RateLimit-Reset`: in how many seconds the count restarts.

Over the limit, the answer is `429`. The `Retry-After` header and the `details.retry_after_seconds` field say how many seconds to wait; the field is there for clients that do not read headers, such as an AI assistant. A `503` answer carries the same two.

_Headers (429)_

```
HTTP/2 429
retry-after: 41
ratelimit-limit: 300
ratelimit-remaining: 0
ratelimit-reset: 41
```

_Response (429)_

```
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests. Retry after the time in Retry-After.",
    "request_id": "req_01JC8Q3X5Z",
    "details": {
      "retry_after_seconds": 41
    }
  }
}
```

### Spending credits

The spending limit is the company's balance. To protect that balance:

- If a key or an app spends, within 60 minutes, 10% or more of the credits the plan gives per month (and at least 50 credits), the company's administrators get a notice by e-mail and inside Vega, with the key's or app's name and the link to Integrations, where it can be revoked or disconnected. It is at most one notice every 24 hours per key or app, and it blocks nothing.
- The Wallet's low-balance notice also covers what is spent through the API.
- If the balance does not cover an action, the answer is `402` and nothing is charged. A company on a free trial spends the trial's credits and keeps to the trial's daily limit.

## What's new

New fields may appear in answers at any time. That is never a breaking change: write your code to ignore the fields it does not know.

1. November 26, 2026
   ### Cupom Vega: benefits, orders and the sales ledger
   - New reads: the benefits with their rule in force and its version (GET /benefits) and the sales ledger, one line per order, period total or adjustment (GET /sales/entries, permission sales:read).
   - POST /sales/orders records orders made with the coupon codes, up to 1000 per call, with the permission sales:write and the orders switch on for the company (off, it answers feature_unavailable with details.feature sales_orders). The same Idempotency-Key returns the same answer.
   - A coupon gained creator_id (the code belongs to the creator with the company, per benefit), benefit_rule_version, link, link_opens_30d and legacy_format.
   - Creating a coupon for a creator who already holds a live code of that benefit returns that code with 200 and created false (a new code answers 201 and created true). On a Vega benefit a chosen code has letters and digits only (_ or - is refused); on a benefit with the store's own codes the code is kept as it is in the store, with - or _ if it has them.
   - Two new events: sale.recorded and sale.confirmed, without the coupon code and without the order number. GET /me shows features.sales_orders.
   - Sending a different code for a creator who already holds a live code of that benefit answers conflict (409), changing nothing and without repeating the live code; the same code returns the live one with 200. On a benefit with the store's own codes, code is required.
2. November 25, 2026
   ### Errors that say what to do
   - New code: api_not_enabled (403). A valid key of a company the API is not switched on for yet gets this code, no longer not_found. Without a valid key, nothing changes.
   - Search, reports and changes to campaigns, when switched off for the company, answer feature_unavailable (409) with details.feature, no longer 404.
   - Errors with a next step carry details.next_step and, when someone else has to act, details.who_can_fix.
   - insufficient_scope names the missing permission in details.required_scope and in the WWW-Authenticate header.
   - insufficient_credits can come without buy_url, when the company's plan does not buy credits in the app; details says who to talk to.
   - GET /me gained features: what is switched on for the company.
   - In Integrations, the API and MCP card is always on screen and shows what is missing and who fixes it; after a key is created, Vega shows the first call ready and a button to test it.
   - The screen that approves an app checks the company's plan and API before it lets anyone approve.
3. November 25, 2026
   ### Automatic approval by the guidelines
   - Read and choose how each campaign's content is approved and change its rules, through the API and the connector, with the new permission content_approval:write (off by default).
   - A campaign carries content_approval; a deliverable and a post carry guidelines_check, with the points outside the guidelines.
   - Two new events: content_approval.changed and content_check.completed. deliverable.approved gained approved_by.
   - Vega approves or refuses based on what is said in the content's audio and what is written in the caption. Our AI does not watch the video: it does not see the images and has no opinion on the visuals.
4. November 19, 2026
   ### History in the simplified report
   - The report (schema_version 2) carries history: Vega's own follower readings, growth over 30 and 90 days and engagement by month, viral posts left out. Only Vega's own readings leave.
   - A report generated before stays at schema_version 1 with history null.
5. November 17, 2026
   ### More data, actions in campaigns and a connector that does tasks
   - New reads: creators, payments per creator, Monitoramento posts, Gamificação, the Agenda, the campaign summary, what needs attention, find by name, a report's table, the Saved lists and the sales deliveries.
   - A card now carries the contract (status and dates), the deliverables, the coupons and the post metrics measured through the creator's own account. With payments:read, also the agreed value and how much has been billed and paid.
   - Actions in campaigns, behind new permissions that start turned off: add a creator to a campaign, move cards and add notes, review deliverables, create and issue coupons, send sales.
   - Twelve new webhook events, from a card created to sales imported.
   - Lists take fields=compact and, on campaigns and cards, the q filter.
   - The AI connector gained task tools, three ready-made prompts and compact answers.
6. November 16, 2026
   ### Vega AI search and simplified report
   - Find creators, see more results and generate a simplified report through the API and the connector, with the company's credits and the Spend credits permission.
7. November 12, 2026
   ### API, AI connector and webhooks
   - The first version: reads of campaigns, cards, deliverables, coupons, sales, faturas, reports and tax invoices, the MCP connector and signed webhooks.
