VYG Docs

Advocacy

GET/v1/advocacy/programs

Scope: advocacy:read.

List advocacy programs for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/programs"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "name": "string",      "status": "string",      "tier": "string",      "config": {        "property1": null,        "property2": null      },      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/programs

Scope: advocacy:write.

Create an advocacy program for the authenticated brand. Commission is a rate in basis points or a flat amount in minor units of an ISO-4217 currency. Discount is the Shopify discount an advocate code gives shoppers: percentage (value is percent off, 10 = 10%) or fixed_amount (value plus a 3-letter currency). Payouts set the hold window in days, auto-approve, minimum payout, daily caps, and rail (gift_card or stripe_connect). When omitted, discount is 10 percent off and payouts use a 14-day hold, so the program can issue codes and pay out without a follow-up update.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/programs" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "commission": {      "type": "bps",      "bps": 1    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "name": "string",  "status": "string",  "tier": "string",  "config": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/programs/{id}

Scope: advocacy:read.

Get one advocacy program by id for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/programs/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "name": "string",  "status": "string",  "tier": "string",  "config": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
PATCH/v1/advocacy/programs/{id}

Scope: advocacy:write.

Update an advocacy program for the authenticated brand. Send only the fields to change. Name, status, commission, shopper discount, and payout settings merge into the existing program. Discount and payouts use the same shapes as create. A name that already exists in this brand returns 409.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/advocacy/programs/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "name": "string",  "status": "string",  "tier": "string",  "config": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/advocates

Scope: advocacy:read.

List advocates for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/advocates"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",      "contact_id": "string",      "email": "string",      "phone": "string",      "social_handles": {        "property1": "string",        "property2": "string"      },      "capture_source": "string",      "enrichment": {        "property1": null,        "property2": null      },      "status": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/advocates

Scope: advocacy:write.

Create an advocate for the authenticated brand. Phone is stored as E.164. An existing email or phone in this brand returns 409, never an update.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/advocates" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "contact_id": "string",  "email": "string",  "phone": "string",  "social_handles": {    "property1": "string",    "property2": "string"  },  "capture_source": "string",  "enrichment": {    "property1": null,    "property2": null  },  "status": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/advocates/{id}

Scope: advocacy:read.

Get one advocate by id for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/advocates/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",  "contact_id": "string",  "email": "string",  "phone": "string",  "social_handles": {    "property1": "string",    "property2": "string"  },  "capture_source": "string",  "enrichment": {    "property1": null,    "property2": null  },  "status": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/advocates/{id}/profile

Scope: advocacy:read.

Get an advocate plus their memberships, codes, content and attribution edges.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/advocates/497f6eca-6276-4993-bfeb-53cbbbba6f08/profile"
{  "advocate": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",    "contact_id": "string",    "email": "string",    "phone": "string",    "social_handles": {      "property1": "string",      "property2": "string"    },    "capture_source": "string",    "enrichment": {      "property1": null,      "property2": null    },    "status": "string",    "created_at": "string",    "updated_at": "string"  },  "memberships": [    {      "property1": null,      "property2": null    }  ],  "reward_codes": [    {      "property1": null,      "property2": null    }  ],  "content_assets": [    {      "property1": null,      "property2": null    }  ],  "attribution_edges": [    {      "property1": null,      "property2": null    }  ]}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/memberships

Scope: advocacy:read.

List program memberships for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/memberships"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",      "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",      "status": "string",      "joined_at": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/memberships

Scope: advocacy:write.

Enroll an advocate in a program of the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/memberships" \  -H "Content-Type: application/json" \  -d '{    "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",    "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "status": "string",  "joined_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/memberships/{id}/pause

Scope: advocacy:write.

Pause an active membership of the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/memberships/497f6eca-6276-4993-bfeb-53cbbbba6f08/pause"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "status": "string",  "joined_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/memberships/{id}/revoke

Scope: advocacy:write.

Revoke a membership of the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/memberships/497f6eca-6276-4993-bfeb-53cbbbba6f08/revoke"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "status": "string",  "joined_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/memberships/{id}/flag

Requires sign-in (OAuth). Scope: advocacy:admin.

Flag a membership for fraud review. Requires a brand administrator sign-in.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/memberships/497f6eca-6276-4993-bfeb-53cbbbba6f08/flag"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "status": "string",  "joined_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/reward-codes

Scope: advocacy:read.

List reward codes for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/reward-codes"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",      "code": "string",      "link_url": "string",      "kind": "string",      "single_use": true,      "status": "string",      "shopify_discount_gid": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/reward-codes

Scope: advocacy:write.

Issue a discount code or referral link for a membership. Discount codes are created in Shopify first, then stored; a failed insert deletes the Shopify code.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/reward-codes" \  -H "Content-Type: application/json" \  -d '{    "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",    "kind": "discount_code"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "code": "string",  "link_url": "string",  "kind": "string",  "single_use": true,  "status": "string",  "shopify_discount_gid": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/reward-codes/{id}/revoke

Scope: advocacy:write.

Revoke an active reward code and deactivate its Shopify discount when one exists.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/reward-codes/497f6eca-6276-4993-bfeb-53cbbbba6f08/revoke"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "code": "string",  "link_url": "string",  "kind": "string",  "single_use": true,  "status": "string",  "shopify_discount_gid": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/attribution-edges

Scope: advocacy:read.

List order attribution edges for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/attribution-edges"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",      "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",      "reward_code_id": "86774b2b-f584-4517-8beb-9c5fa323e79f",      "order_id": "string",      "join_key": "string",      "amount_cents": 0,      "currency": "string",      "occurred_at": "string",      "commissionable": true,      "non_commissionable_reason": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/directory

Scope: advocacy:read.

Search the authenticated brand’s internal ranked directory, or the cross-brand external directory under double opt-in. External results never include brand_id or contact fields.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

source?string
q?string|null
niche?string|null
limit?integer
cursor?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/directory"
{  "data": [    {      "property1": null,      "property2": null    }  ],  "next_cursor": "string",  "source": "internal",  "total": 0}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/content

Scope: advocacy:write.

Record a content asset for an advocate of the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/content" \  -H "Content-Type: application/json" \  -d '{    "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",    "platform": "instagram"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "platform": "string",  "external_id": "string",  "external_url": "string",  "rights_status": "string",  "metadata": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/content/{id}/rights/request

Scope: advocacy:write.

Mark a content asset as pending rights.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/rights/request"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "platform": "string",  "external_id": "string",  "external_url": "string",  "rights_status": "string",  "metadata": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/content/{id}/rights/grant

Scope: advocacy:write.

Grant usage rights on a content asset.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/rights/grant"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "platform": "string",  "external_id": "string",  "external_url": "string",  "rights_status": "string",  "metadata": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/content/{id}/rights/revoke

Scope: advocacy:write.

Revoke usage rights on a content asset.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/content/497f6eca-6276-4993-bfeb-53cbbbba6f08/rights/revoke"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "platform": "string",  "external_id": "string",  "external_url": "string",  "rights_status": "string",  "metadata": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/campaigns

Scope: advocacy:read.

List UGC campaigns for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/campaigns"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "name": "string",      "brief": "string",      "rules": {        "property1": null,        "property2": null      },      "reward": {        "property1": null,        "property2": null      },      "status": "string",      "starts_at": "string",      "ends_at": "string",      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/campaigns

Scope: advocacy:write.

Create a UGC campaign for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/campaigns" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "name": "string",  "brief": "string",  "rules": {    "property1": null,    "property2": null  },  "reward": {    "property1": null,    "property2": null  },  "status": "string",  "starts_at": "string",  "ends_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/seeding-orders

Scope: advocacy:read.

List manual seeding orders for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/seeding-orders"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",      "items": [        {          "property1": null,          "property2": null        }      ],      "status": "string",      "shopify_order_id": "string",      "tracking_ref": "string",      "idempotency_key": "string",      "total_value_cents": 0,      "metadata": {        "property1": null,        "property2": null      },      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/seeding-orders

Scope: advocacy:write.

Record a manual seeding order. Does not create a Shopify draft order.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/seeding-orders" \  -H "Content-Type: application/json" \  -d '{    "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",    "items": [      {        "product_id": "string"      }    ]  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "advocate_id": "2cecb820-0715-4886-a622-a63c45e19735",  "items": [    {      "property1": null,      "property2": null    }  ],  "status": "string",  "shopify_order_id": "string",  "tracking_ref": "string",  "idempotency_key": "string",  "total_value_cents": 0,  "metadata": {    "property1": null,    "property2": null  },  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/agent-proposals

Scope: advocacy:write.

Record an agent-ops proposal for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/agent-proposals" \  -H "Content-Type: application/json" \  -d '{    "workflow": "string",    "action": "string",    "disposition": "auto_executed"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "workflow": "string",  "action": "string",  "target_ids": [    "df013b73-5002-4203-b545-5ff7f9f8f8cf"  ],  "summary": "string",  "disposition": "string",  "reasons": [    "string"  ],  "money_movement": true,  "decision": "string",  "decided_by": "string",  "decided_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/agent-proposals/{id}/decide

Requires sign-in (OAuth). Scope: advocacy:admin.

Approve or reject an unresolved agent proposal. Requires a brand administrator sign-in.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/agent-proposals/497f6eca-6276-4993-bfeb-53cbbbba6f08/decide" \  -H "Content-Type: application/json" \  -d '{    "decision": "approved"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "workflow": "string",  "action": "string",  "target_ids": [    "df013b73-5002-4203-b545-5ff7f9f8f8cf"  ],  "summary": "string",  "disposition": "string",  "reasons": [    "string"  ],  "money_movement": true,  "decision": "string",  "decided_by": "string",  "decided_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/payouts

Scope: advocacy:read.

List payouts for the authenticated brand. Amounts are calculated by the API.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer
cursor?|

next_cursor from the previous page.

status?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/payouts"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",      "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",      "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",      "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",      "amount_cents": 0,      "currency": "string",      "status": "string",      "hold_reason": "string",      "idempotency_key": "string",      "attempt_no": 0,      "created_at": "string",      "updated_at": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/payouts/{id}

Scope: advocacy:read.

Get one payout by id for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/payouts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "amount_cents": 0,  "currency": "string",  "status": "string",  "hold_reason": "string",  "idempotency_key": "string",  "attempt_no": 0,  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/payouts/{id}/approve

Requires sign-in (OAuth). Scope: advocacy:admin.

Approve a pending payout. Requires a brand administrator sign-in. Repeating the request on an already-approved payout returns 409.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/payouts/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "amount_cents": 0,  "currency": "string",  "status": "string",  "hold_reason": "string",  "idempotency_key": "string",  "attempt_no": 0,  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/payouts/{id}/hold

Requires sign-in (OAuth). Scope: advocacy:admin.

Place a pending or approved payout on hold. Requires a brand administrator sign-in.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/payouts/497f6eca-6276-4993-bfeb-53cbbbba6f08/hold" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "amount_cents": 0,  "currency": "string",  "status": "string",  "hold_reason": "string",  "idempotency_key": "string",  "attempt_no": 0,  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/payouts/{id}/release

Requires sign-in (OAuth). Scope: advocacy:admin.

Release a held payout back to pending. Payouts already being sent cannot be released. Requires a brand administrator sign-in.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/payouts/497f6eca-6276-4993-bfeb-53cbbbba6f08/release"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "amount_cents": 0,  "currency": "string",  "status": "string",  "hold_reason": "string",  "idempotency_key": "string",  "attempt_no": 0,  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/payouts/{id}/cancel

Requires sign-in (OAuth). Scope: advocacy:admin.

Cancel a pending, approved, or held payout. Payouts already being sent cannot be canceled. Requires a brand administrator sign-in.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/payouts/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",  "attribution_edge_id": "63bc4c78-34c7-44f7-9e57-3126e4b53bbf",  "program_id": "70c1146b-e933-4cb2-a789-bbca5312b517",  "amount_cents": 0,  "currency": "string",  "status": "string",  "hold_reason": "string",  "idempotency_key": "string",  "attempt_no": 0,  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/payouts/stripe-connect/onboard

Scope: advocacy:write.

Create or resume a Stripe Connect Express account for a membership and return the hosted onboarding URL. Returns unavailable if Stripe Connect is not configured.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/payouts/stripe-connect/onboard" \  -H "Content-Type: application/json" \  -d '{    "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4",    "refresh_url": "http://example.com",    "return_url": "http://example.com"  }'
{  "account_id": "string",  "url": "http://example.com",  "expires_at": "string",  "status": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/a2p-registration

Scope: advocacy:read.

Get the advocacy-use-case A2P registration record for the authenticated brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/a2p-registration"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "use_case": "string",  "provider": "string",  "campaign_id": "string",  "status": "string",  "approved_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/advocacy/a2p-registration

Requires sign-in (OAuth). Scope: advocacy:admin.

Record the A2P registration used for advocacy SMS for the authenticated brand. Independent of cart-recovery campaign registration.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/advocacy/a2p-registration" \  -H "Content-Type: application/json" \  -d '{    "status": "pending"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",  "use_case": "string",  "provider": "string",  "campaign_id": "string",  "status": "string",  "approved_at": "string",  "created_at": "string",  "updated_at": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/advocacy/consent-status

Scope: advocacy:read.

Consent grant/revoke counts, pending P2P asks, and A2P registration status for the brand.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/advocacy/consent-status"
{  "granted": 0,  "revoked": 0,  "pending_asks": 0,  "a2p": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",    "use_case": "string",    "provider": "string",    "campaign_id": "string",    "status": "string",    "approved_at": "string",    "created_at": "string",    "updated_at": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}