Set client pricing
Set what an agency charges one of its clients. It never changes what the platform charges the agency. mode picks how the client is billed: per_minute charges minuteRateCents for every call minute; monthly_overage charges monthlyFeeCents a month, which covers includedMinutes call minutes, then minuteRateCents for each minute past them; monthly_capped charges monthlyFeeCents a month for includedMinutes call minutes and nothing past them; none removes the client's pricing. A call is rounded up to the next minute. textRateCents and chatRateCents charge per text and per website chat conversation, and 0 means not charged. numberChargeCents is a monthly amount per phone number, and null means the number is included in the price. All amounts are in cents. Every value is saved together, so pass the full pricing every time. list_clients shows each client's current pricing. Only works on an agency account, for an owner or admin of the agency.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/set_client_pricing" \ -H "Content-Type: application/json" \ -d '{ "workspace": "string", "client": "string", "mode": "per_minute" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Set chat hand-off POST
Hand website chats to a person by text. When a visitor writes in the chat widget, every recipient gets an SMS from the sender number with a short ref (e.g. KQ47), the visitor's first message and a link to the full chat. The AI keeps answering until someone replies to that text: their reply appears in the visitor's chat under their name, the AI stops answering that chat, and the visitor's later messages are texted to whoever replied. A reply that starts with a ref goes to that chat; otherwise it goes to the newest chat that texted that person. One alert per chat, at most 10 a workspace an hour. Every text is billed to the workspace as SMS usage. Applies at once, with no publish. Needs the website chat switched on (set_channel) to do anything.
Set client spending limit POST
Set how much one client of an agency may spend in a calendar month (UTC). limitCents is the limit in cents, from 1000 ($10) to 1000000 ($10,000); null removes the limit. At the limit the client's tests, Builder, website chat and campaigns stop until the next month or a higher limit, and calls in progress finish. Incoming phone calls keep being answered unless blockCallsAtLimit is true. The agency is emailed at 80% and 100% of the limit. Both values are saved together, so pass both every time. list_clients shows each client's current spend and limit. Only works on an agency account, for an owner or admin of the agency.