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

# Sync brand billing events

> Pending meter events pushed to the billing provider.

### Path parameters

<ParamField path="brand_id" type="string (uuid)" required />

### Request body

`object`

<ParamField body="limit" type="integer" />

### Response

`object`

<ResponseField name="attempted" type="integer" required />

<ResponseField name="sent" type="integer" required />

<ResponseField name="failed" type="integer" required />

<ResponseField name="skipped" type="integer" required />

<ResponseField name="pending_remaining" type="integer" required />

### Status codes

| Code  | Meaning                                              |
| ----- | ---------------------------------------------------- |
| `200` | Pending meter events pushed to the billing provider. |
| `400` | Validation error                                     |
| `401` | Unauthorized                                         |
| `404` | Not found                                            |
| `429` | Rate limited                                         |
| `500` | Internal error                                       |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/billing/sync' \
    --header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "limit": 20
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "attempted": 1,
    "sent": 1,
    "failed": 1,
    "skipped": 1,
    "pending_remaining": 1
  }
  ```
</ResponseExample>
