> ## Documentation Index
> Fetch the complete documentation index at: https://docs.growi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Payload reference

## Payload format

The request body is a single JSON object with the following fields:

**event** `string` *required*

Event name that indicates what happened.

**occurred\_at** `string` *required*

ISO-8601 timestamp of the underlying record update.

**campaign\_affiliate\_id** `integer` *required*

Internal ID of the campaign-creator association record.

**campaign\_id** `integer` *required*

Campaign ID.

**organization\_id** `integer` *required*

Organization ID.

**user\_id** `integer` *required*

Creator's user ID.

**status** `string` *required*

The raw status value on the record (e.g., `active`, `removed`, `left`).

**campaign\_name** `string`

Campaign name, when available.

**organization\_slug** `string`

Brand slug, when available.

**user\_email** `string`

Creator email, when available.

**user\_name** `string`

Creator name, when available.

**tag** `string`

Default affiliate tag for the creator on this campaign, when available. For `code_updated`, this is the **new** code.

**previous\_tag** `string`

Present on `campaign_affiliate.code_updated` only. The affiliate code **before** the change.

**idempotency\_key** `string`

Stable key for deduplicating redelivered events (delivery is at-least-once).

**attribution** `object`

Present when the creator was submitted through the [campaign applications API](https://docs.growi.io/api-reference/endpoint/create-campaign-application.md). Echoes the marketing attribution you sent with the applicant — `fbp`, `fbc`, `fbclid`, `event_id`, `event_source_url`, UTM parameters, your `external_id`, and TikTok enrichment — so you can match the creator in your ad platform (for example, forwarding to Meta Conversions API).

> [!NOTE]
>
> Optional fields are omitted when values are not present. For status events, `occurred_at` uses the campaign affiliation record's `updated_at` timestamp. For `code_updated`, it is the time the code change was committed.

## Sale events

`affiliate_sale.created` fires when a sale is attributed to one of your creators (Shopify, website/API conversions, and app sales). On top of the shared fields above (`campaign_name`, `organization_slug`, `user_email`, `user_name`, `tag`, `attribution`), the payload carries:

**affiliate\_sale\_id** `integer` *required*

Growi's id for the sale.

**order\_id** `string` *required*

The external order id (e.g. the Shopify order).

**total\_cents** `integer` *required*

Order total in cents.

**subtotal\_cents** `integer`

Order subtotal in cents.

**commission\_cents** `integer`

The creator's commission in cents.

**currency** `string` *required*

ISO currency code (lowercase, e.g. `usd`).

**platform** `string` *required*

`shopify`, `website`, `ios`, or `android`.

**sale\_type** `string`

`one_time` or `subscription`.

**sale\_occurrence** `string`

`initial` for the customer's first attributed sale, `recurring` for later purchases.

**status** `string`

Payout status of the sale (e.g. `unpaid`).

## Video analysis events

`video_analysis.completed` fires when a [video analysis](https://docs.growi.io/essentials/video-analysis.md) is ready, and `video_analysis.failed` when it couldn't be completed. Every active webhook URL gets them, whatever notification channels the submitting user chose. An upload that never completes (`submission_interrupted`) sends no event. They carry ids and the status only, not the shared campaign fields above. Read the result with [`GET /video_analyses/{id}`](https://docs.growi.io/api-reference/endpoint/video-analyses/get-video-analysis).

**event** `string` *required*

`video_analysis.completed` or `video_analysis.failed`.

**idempotency\_key** `string` *required*

`<event>:<video_analysis_id>`. Deduplicate on it: delivery is at-least-once.

**occurred\_at** `string` *required*

ISO 8601 time the analysis finished.

**video\_analysis\_id** `string` *required*

The analysis id (a UUID), as returned by `POST /video_analyses`.

**external\_id** `string`

The `external_id` you sent with the video, or `null`.

**organization\_id** `integer` *required*

Organization ID.

**organization\_slug** `string`

Brand slug.

**user\_id** `integer` *required*

The user who created the API key that submitted the video.

**status** `string` *required*

The analysis status: `ready` for `completed`, `failed` for `failed`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.