curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/billing/contract' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {}
}
]
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "string",
"contract_type": "string",
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contract_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
],
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Upsert brand billing contract
Billing contract created or updated.
PUT
/
v1
/
brands
/
{brand_id}
/
billing
/
contract
curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/billing/contract' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {}
}
]
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "string",
"contract_type": "string",
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contract_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
],
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Path parameters
string (uuid)
required
Request body
object
string
string
string
string
string
integer
integer
integer
string
string
object
object[]
Response
object
string (uuid)
required
string (uuid)
required
string (uuid)
required
string (uuid)
string
required
string
required
string
required
string
required
string
required
string
required
string
required
integer
required
integer
required
integer
required
string (date-time)
string (date-time)
object
required
object[]
required
string (date-time)
required
string (date-time)
required
Status codes
| Code | Meaning |
|---|---|
200 | Billing contract created or updated. |
400 | Validation error |
401 | Unauthorized |
404 | Not found |
429 | Rate limited |
500 | Internal error |
curl --request PUT \
--url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/billing/contract' \
--header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {}
}
]
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"billing_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"provider": "string",
"contract_type": "string",
"status": "pending",
"currency": "USD",
"period": "string",
"display_name": "Ada Lovelace",
"commitment_label": "string",
"commitment_fee_minor": 4900,
"default_unit_amount_minor": 4900,
"included_quantity": 1,
"starts_at": "2026-08-31T14:22:05Z",
"ends_at": "2026-08-31T14:22:05Z",
"metadata": {},
"rates": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"contract_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"outcome_type": "string",
"display_name": "Ada Lovelace",
"unit_amount_minor": 4900,
"included_quantity": 1,
"committed_unit_amount_minor": 4900,
"metadata": {},
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
],
"created_at": "2026-08-31T14:22:05Z",
"updated_at": "2026-08-31T14:22:05Z"
}
Last modified on August 31, 2026