Skip to main content

Set a billing service rate.

POST/api/v1/company/billing-ratessettings:write

Sets the company's own billing tenant's rate for a service, model and unit from now on: the rate in force for the same service_type, model_type and rate_unit is closed (its effective_to is now) and this one opens, so one stays in force. Global defaults cannot be set here, only the company's own. Needs Create Service Rates; 403 when the company has no billing tenant. Written to the identity primary.

Version 2026-12-01. The billing_rate_id of the write receipt is declared as an integer ID, not a string key. The value is a string in both versions.

Scopesettings:write (sensitive)
AsynchronousNo
MCP toolcreate_company_billing_rate
Portal permissionscreate_service_rates

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonBillingRateCreateInput

Responses​

StatusDescriptionBody
201Success.application/json BillingRate or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

BillingRate​

FieldTypeRequiredDescription
billing_rate_idstringRequired
created_by_emailstring or nullRequiredThe e-mail address of the administrator who set the rate; null for a seeded one.
currencystringRequiredThe currency symbol or code the rate is stated in.
effective_fromstring (date-time)Required
effective_tostring (date-time) or nullRequiredWhen a newer rate for the same service replaced it; null while it is in force.
is_global_defaultbooleanRequiredtrue for a default every organisation falls back to (set by Docwize, never through this API); false for a rate of the caller's own billing tenant.
model_typestring or nullRequiredThe model or engine the rate is for; null for a service without one.
rate_amountstringRequiredThe price per rate_unit, in currency.
rate_unitstringRequiredWhat the amount is per, e.g. page or 1m_tokens.
service_typestringRequiredThe billed service, e.g. ocr, table_extraction or llm.

BillingRateCreateInput​

FieldTypeRequiredDescription
currencystring or nullOptionalAt most 3 characters; the default is $.
model_typestring or nullOptionalThe model or engine the rate is for; null (the default) for a service without one. At most 100 characters.
rate_amountstringRequiredThe price per rate_unit: not negative, up to 8 digits before the point and 10 after.
rate_unitstringRequiredWhat the amount is per. At most 30 characters.
service_typestringRequiredThe billed service. At most 50 characters.