Orishare
Api
GET
/counter_definitions
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions"
{  "data": [    {      "id": "string",      "name": "string",      "event": "string",      "window": "none",      "filter": null,      "status": "backfilling",      "backfill": {        "cutoff": "string",        "pending_events": 0      },      "created_at": "string"    }  ],  "next_cursor": "string",  "has_more": true}
POST
/counter_definitions
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Header Parameters

Idempotency-Key?string

Required by the API on this route (400 idempotency_key_required without it); the official clients generate a UUID when you omit it.

Length1 <= length <= 255

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/counter_definitions" \  -H "Content-Type: application/json" \  -d '{    "name": "purchased_content",    "event": "content.purchased",    "window": "none"  }'
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "string",    "pending_events": 0  },  "created_at": "string"}
GET
/counter_definitions/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions/string"
{  "id": "string",  "name": "string",  "event": "string",  "window": "none",  "filter": null,  "status": "backfilling",  "backfill": {    "cutoff": "string",    "pending_events": 0  },  "created_at": "string"}
DELETE
/counter_definitions/{id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/counter_definitions/string"
Empty
POST
/counter_definitions/{id}/backfill
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/counter_definitions/string/backfill"
{  "status": "ready",  "mode": "inline",  "result": null}
GET
/counter_definitions/{id}/customers/{customer_id}
AuthorizationBearer <token>

Secret key (osk_…), publishable key (opk_…) or personal access token (opat_…).

In: header

Path Parameters

id*string
Length1 <= length
customer_id*string
Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/counter_definitions/string/customers/string"
{  "counter": "string",  "customer_id": "string",  "windows": [    {      "window_key": "string",      "count": 0    }  ]}