comecerodocs

Change usage terms

POST
/usage/entitlements/{id}/change_terms

Revision checked credit operation. Secret and trusted tokens require the applicable resource permission. New writes require header idempotency. Immutable rates do not reprice existing agreements. Core validates exact conversion, current funding, prepared work and protected billing boundaries.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

id*string

Resource identity owned by this account and mode.

Header Parameters

Idempotency-Key*string

Same key and canonical body replay the saved result. A different body returns CreditRequestConflict; pending work returns CreditRequestPending.

Match^[ -~]+$
Length1 <= length <= 128

Request Body

application/json
  1. body
expected_revision?integer
Range0 <= value
effective_from?string
Formatdate-time
rate_plan_id*string
rate_plan_version*integer
Range1 <= value
funding_source_entitlement_id?string|null

Response Body

Success.

application/json
  1. response
command_id?string
completed?unknown
credit_revision?integer
Range0 <= value
effective_from?string
Formatdate-time
funding_effective_from?string
Formatdate-time
agreement_id?string
credit_entitlement?

A metered entitlement bills a metric on a pinned rate plan version. A credit entitlement holds prepaid credit. See https://docs.comecero.com/docs/usage-billing/entitlements

linked_entitlement_ids?array<string>
old_entitlement_ids?array<string>
replacement_entitlement_ids?array<string>
balance?number
credit_balance?string|null
Example Request
curl -X POST 'https://api.comecero.com/api/v1/usage/entitlements/string/change_terms' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "expected_revision": 1,  "effective_from": "2026-12-01T00:00:00Z",  "rate_plan_id": "ai_tokens_standard",  "rate_plan_version": 2}'
Example Response
{  "command_id": "command_terms_1",  "old_entitlement_ids": [    "ent_tokens_1"  ],  "replacement_entitlement_ids": [    "ent_tokens_2"  ],  "effective_from": "2026-12-01T00:00:00Z",  "credit_revision": 2,  "completed": true}