{ "status": "error", "message": "start_timestamp.lower_threshold and upper_threshold are required (Unix milliseconds)"}
{ "status": "error", "message": "Too many requests: this API key is limited to 600 requests per minute. Retry after 23 seconds."}
Returns the billable usage of your own phone numbers over a time window: the seconds and the
number of calls that count toward billing. It applies the same rule that bills your account, so
a platform that resells Voicy can read its customers’ usage here instead of measuring calls
itself.What counts: a call counts only if it was answered and completed, it lasted more than zero
seconds, and it is not a test call. Each counted call is billed per second with a 60-second
minimum. A call whose content was later deleted still counts. Text-simulator calls never count.The window is half-open: a call counts toward the window its start time falls in, from
lower_threshold (included) up to upper_threshold (not included). Two adjacent windows,
for example consecutive billing periods, therefore never count the same call twice. A window
may be at most 366 days.
A number is matched as your number on the call: the number that was dialed on an inbound
call, the caller ID on an outbound call. A number that is not on your account returns zeros.
Body Parameters
object
required
Show Filter options
array
required
Your numbers, in E.164 (+972771234567), 1 to 100. A value that is not E.164, or an empty
list, is a 400.
object
required
The window, Unix milliseconds: lower_threshold (inclusive) and upper_threshold
(exclusive), both required, the first before the second.
string
incoming or outgoing: count only inbound or only outbound calls. Both when omitted.
boolean
default:"true"
Leave test calls (calls from a contact flagged as a test user) out of the totals, as Voicy’s
billing rule does. Send false to count them too, at their real duration (the same 60-second
minimum per call), so you can see the usage of your own test numbers. The setting applies to this
request only: it does not change how a call is billed to your account anywhere else in Voicy.
Anything but a boolean is a 400.
array
Leave out calls that carry a given saved variable. A list of 1 to 5 { "name": ..., "value": ... }
pairs: a call is left out when its latest saved value of any one of those variables is exactly the
listed text (when a variable was saved more than once, the latest save decides; values saved
together all count). Use it to keep calls you handle differently out of a total, for example calls your
agent declined at their start ({ "name": "declined", "value": "true" }, with your flow setting
that variable). name is a lowercase variable name (letters, digits and _, starting with a letter)
and must not start with z_: a z_ variable is call-local and is never saved, so it could never
match. value is non-empty text of at most 200 characters. A malformed list is a 400.Only text variables can match. A list variable or an enum answer has no text to compare, so a
call is never left out because of one.The filter applies to this request only. It does not change how a call is billed to your account
anywhere else in Voicy.A call is left out only while its variables exist. If the call’s content is deleted, its saved
variables are deleted with it, and the call is counted again by this request. A total you already
read for a closed period can therefore grow later.A call also counts until its variables are saved, which happens just after it ends. A request made
right after a call ends can still count it, and the same request repeated once the call is fully
processed leaves it out, so a total can shrink. Repeat the read once your calls are processed.
Response
integer
Total billable seconds across the requested numbers.
integer
Total number of calls that counted.
array
One entry per requested number, in the order requested, zeros included.
{ "status": "error", "message": "start_timestamp.lower_threshold and upper_threshold are required (Unix milliseconds)"}
{ "status": "error", "message": "Too many requests: this API key is limited to 600 requests per minute. Retry after 23 seconds."}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Voicy API","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"api":{"playground":{}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"voicy-a20ff56e","hasAudioNarration":false,"actualSubdomain":"voicy-a20ff56e","customDomains":["docs.voicy.co"],"gitSource":{"type":"github","owner":"voicy-co","repo":"voiceagent","deployBranch":"main","contentDirectory":"docs/public-api","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b02efad3ca2a55c0067018d","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API Reference","count":16},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Build","count":10},{"language":"default","tag":"Documentation","count":8},{"language":"default","tag":"Resources","count":5},{"language":"default","tag":"Agents","count":4},{"language":"default","tag":"Calls","count":4},{"language":"default","tag":"Phone Numbers","count":4},{"language":"default","tag":"Models","count":3},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/call-usage","slug":"/api-reference/call-usage","pageMetadata":{"title":"Get Usage","api":"POST /v1/call-usage","description":"Billable seconds and calls for your numbers over a time window","href":"/api-reference/call-usage"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Billable seconds and calls for your numbers over a time window\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Returns the billable usage of your own phone numbers over a time window: the seconds and the\nnumber of calls that count toward billing. It applies the same rule that bills your account, so\na platform that resells Voicy can read its customers’ usage here instead of measuring calls\nitself.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What counts:`}),` a call counts only if it was answered and completed, it lasted more than zero\nseconds, and it is not a test call. Each counted call is billed per second with a `,_jsx(_components.strong,{children:`60-second\nminimum`}),`. A call whose content was later deleted still counts. Text-simulator calls never count.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The window`}),` is half-open: a call counts toward the window its `,_jsx(_components.strong,{children:`start time`}),` falls in, from\n`,_jsx(_components.code,{children:`lower_threshold`}),` (included) up to `,_jsx(_components.code,{children:`upper_threshold`}),` (not included). Two adjacent windows,\nfor example consecutive billing periods, therefore never count the same call twice. A window\nmay be at most 366 days.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A number is matched as `,_jsx(_components.strong,{children:`your number on the call`}),`: the number that was dialed on an inbound\ncall, the caller ID on an outbound call. A number that is not on your account returns zeros.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`filter_criteria`,type:`object`,required:true,id:`param-filter-criteria`,children:_jsxs(Expandable,{title:`Filter options`,children:[_jsx(ParamField,{body:`agent_numbers`,type:`array`,required:true,id:`param-agent-numbers`,children:_jsxs(_components.p,{children:[`Your numbers, in E.164 (`,_jsx(_components.code,{children:`+972771234567`}),`), 1 to 100. A value that is not E.164, or an empty\nlist, is a `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsx(ParamField,{body:`start_timestamp`,type:`object`,required:true,id:`param-start-timestamp`,children:_jsxs(_components.p,{children:[`The window, Unix milliseconds: `,_jsx(_components.code,{children:`lower_threshold`}),` (inclusive) and `,_jsx(_components.code,{children:`upper_threshold`}),`\n(exclusive), both required, the first before the second.`]})}),_jsx(ParamField,{body:`direction`,type:`string`,id:`param-direction`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`incoming`}),` or `,_jsx(_components.code,{children:`outgoing`}),`: count only inbound or only outbound calls. Both when omitted.`]})}),_jsx(ParamField,{body:`exclude_test_calls`,type:`boolean`,default:`true`,id:`param-exclude-test-calls`,children:_jsxs(_components.p,{children:[`Leave test calls (calls from a contact flagged as a test user) out of the totals, as Voicy’s\nbilling rule does. Send `,_jsx(_components.code,{children:`false`}),` to count them too, at their real duration (the same 60-second\nminimum per call), so you can see the usage of your own test numbers. The setting applies to this\nrequest only: it does not change how a call is billed to your account anywhere else in Voicy.\nAnything but a boolean is a `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsxs(ParamField,{body:`exclude_vars`,type:`array`,id:`param-exclude-vars`,children:[_jsxs(_components.p,{children:[`Leave out calls that carry a given saved variable. A list of 1 to 5 `,_jsx(_components.code,{children:`{ \"name\": ..., \"value\": ... }`}),`\npairs: a call is left out when its latest saved value of any one of those variables is exactly the\nlisted text (when a variable was saved more than once, the latest save decides; values saved\ntogether all count). Use it to keep calls you handle differently out of a total, for example calls your\nagent declined at their start (`,_jsx(_components.code,{children:`{ \"name\": \"declined\", \"value\": \"true\" }`}),`, with your flow setting\nthat variable). `,_jsx(_components.code,{children:`name`}),` is a lowercase variable name (letters, digits and `,_jsx(_components.code,{children:`_`}),`, starting with a letter)\nand must not start with `,_jsx(_components.code,{children:`z_`}),`: a `,_jsx(_components.code,{children:`z_`}),` variable is call-local and is never saved, so it could never\nmatch. `,_jsx(_components.code,{children:`value`}),` is non-empty text of at most 200 characters. A malformed list is a `,_jsx(_components.code,{children:`400`}),`.`]}),_jsxs(_components.p,{children:[`Only `,_jsx(_components.strong,{children:`text variables`}),` can match. A list variable or an enum answer has no text to compare, so a\ncall is never left out because of one.`]}),_jsx(_components.p,{children:`The filter applies to this request only. It does not change how a call is billed to your account\nanywhere else in Voicy.`}),_jsx(_components.p,{children:`A call is left out only while its variables exist. If the call’s content is deleted, its saved\nvariables are deleted with it, and the call is counted again by this request. A total you already\nread for a closed period can therefore grow later.`}),_jsx(_components.p,{children:`A call also counts until its variables are saved, which happens just after it ends. A request made\nright after a call ends can still count it, and the same request repeated once the call is fully\nprocessed leaves it out, so a total can shrink. Repeat the read once your calls are processed.`})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`billable_seconds`,type:`integer`,id:`param-billable-seconds`,children:`Total billable seconds across the requested numbers.`}),`\n`,_jsx(ResponseField,{name:`billable_calls`,type:`integer`,id:`param-billable-calls`,children:`Total number of calls that counted.`}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`array`,id:`param-usage`,children:[_jsx(_components.p,{children:`One entry per requested number, in the order requested, zeros included.`}),_jsxs(Expandable,{title:`Usage properties`,children:[_jsx(ResponseField,{name:`agent_number`,type:`string`,id:`param-agent-number`,children:`The number in E.164.`}),_jsx(ResponseField,{name:`billable_seconds`,type:`integer`,id:`param-billable-seconds-1`,children:`Billable seconds for this number.`}),_jsx(ResponseField,{name:`billable_calls`,type:`integer`,id:`param-billable-calls-1`,children:`Calls that counted for this number.`})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Usage","api":"POST /v1/call-usage","description":"Billable seconds and calls for your numbers over a time window","href":"/api-reference/call-usage"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Returns the billable usage of your own phone numbers over a time window: the seconds and the\nnumber of calls that count toward billing. It applies the same rule that bills your account, so\na platform that resells Voicy can read its customers’ usage here instead of measuring calls\nitself.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What counts:`}),` a call counts only if it was answered and completed, it lasted more than zero\nseconds, and it is not a test call. Each counted call is billed per second with a `,_jsx(_components.strong,{children:`60-second\nminimum`}),`. A call whose content was later deleted still counts. Text-simulator calls never count.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The window`}),` is half-open: a call counts toward the window its `,_jsx(_components.strong,{children:`start time`}),` falls in, from\n`,_jsx(_components.code,{children:`lower_threshold`}),` (included) up to `,_jsx(_components.code,{children:`upper_threshold`}),` (not included). Two adjacent windows,\nfor example consecutive billing periods, therefore never count the same call twice. A window\nmay be at most 366 days.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A number is matched as `,_jsx(_components.strong,{children:`your number on the call`}),`: the number that was dialed on an inbound\ncall, the caller ID on an outbound call. A number that is not on your account returns zeros.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`filter_criteria`,type:`object`,required:true,id:`param-filter-criteria`,children:_jsxs(Expandable,{title:`Filter options`,children:[_jsx(ParamField,{body:`agent_numbers`,type:`array`,required:true,id:`param-agent-numbers`,children:_jsxs(_components.p,{children:[`Your numbers, in E.164 (`,_jsx(_components.code,{children:`+972771234567`}),`), 1 to 100. A value that is not E.164, or an empty\nlist, is a `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsx(ParamField,{body:`start_timestamp`,type:`object`,required:true,id:`param-start-timestamp`,children:_jsxs(_components.p,{children:[`The window, Unix milliseconds: `,_jsx(_components.code,{children:`lower_threshold`}),` (inclusive) and `,_jsx(_components.code,{children:`upper_threshold`}),`\n(exclusive), both required, the first before the second.`]})}),_jsx(ParamField,{body:`direction`,type:`string`,id:`param-direction`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`incoming`}),` or `,_jsx(_components.code,{children:`outgoing`}),`: count only inbound or only outbound calls. Both when omitted.`]})}),_jsx(ParamField,{body:`exclude_test_calls`,type:`boolean`,default:`true`,id:`param-exclude-test-calls`,children:_jsxs(_components.p,{children:[`Leave test calls (calls from a contact flagged as a test user) out of the totals, as Voicy’s\nbilling rule does. Send `,_jsx(_components.code,{children:`false`}),` to count them too, at their real duration (the same 60-second\nminimum per call), so you can see the usage of your own test numbers. The setting applies to this\nrequest only: it does not change how a call is billed to your account anywhere else in Voicy.\nAnything but a boolean is a `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsxs(ParamField,{body:`exclude_vars`,type:`array`,id:`param-exclude-vars`,children:[_jsxs(_components.p,{children:[`Leave out calls that carry a given saved variable. A list of 1 to 5 `,_jsx(_components.code,{children:`{ \"name\": ..., \"value\": ... }`}),`\npairs: a call is left out when its latest saved value of any one of those variables is exactly the\nlisted text (when a variable was saved more than once, the latest save decides; values saved\ntogether all count). Use it to keep calls you handle differently out of a total, for example calls your\nagent declined at their start (`,_jsx(_components.code,{children:`{ \"name\": \"declined\", \"value\": \"true\" }`}),`, with your flow setting\nthat variable). `,_jsx(_components.code,{children:`name`}),` is a lowercase variable name (letters, digits and `,_jsx(_components.code,{children:`_`}),`, starting with a letter)\nand must not start with `,_jsx(_components.code,{children:`z_`}),`: a `,_jsx(_components.code,{children:`z_`}),` variable is call-local and is never saved, so it could never\nmatch. `,_jsx(_components.code,{children:`value`}),` is non-empty text of at most 200 characters. A malformed list is a `,_jsx(_components.code,{children:`400`}),`.`]}),_jsxs(_components.p,{children:[`Only `,_jsx(_components.strong,{children:`text variables`}),` can match. A list variable or an enum answer has no text to compare, so a\ncall is never left out because of one.`]}),_jsx(_components.p,{children:`The filter applies to this request only. It does not change how a call is billed to your account\nanywhere else in Voicy.`}),_jsx(_components.p,{children:`A call is left out only while its variables exist. If the call’s content is deleted, its saved\nvariables are deleted with it, and the call is counted again by this request. A total you already\nread for a closed period can therefore grow later.`}),_jsx(_components.p,{children:`A call also counts until its variables are saved, which happens just after it ends. A request made\nright after a call ends can still count it, and the same request repeated once the call is fully\nprocessed leaves it out, so a total can shrink. Repeat the read once your calls are processed.`})]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`billable_seconds`,type:`integer`,id:`param-billable-seconds`,children:`Total billable seconds across the requested numbers.`}),`\n`,_jsx(ResponseField,{name:`billable_calls`,type:`integer`,id:`param-billable-calls`,children:`Total number of calls that counted.`}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`array`,id:`param-usage`,children:[_jsx(_components.p,{children:`One entry per requested number, in the order requested, zeros included.`}),_jsxs(Expandable,{title:`Usage properties`,children:[_jsx(ResponseField,{name:`agent_number`,type:`string`,id:`param-agent-number`,children:`The number in E.164.`}),_jsx(ResponseField,{name:`billable_seconds`,type:`integer`,id:`param-billable-seconds-1`,children:`Billable seconds for this number.`}),_jsx(ResponseField,{name:`billable_calls`,type:`integer`,id:`param-billable-calls-1`,children:`Calls that counted for this number.`})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.voicy.co/functions/v1/call-usage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer voicy_sk_live_xxx\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"filter_criteria\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent_numbers\": [\"+972771234567\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"direction\": \"incoming\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"start_timestamp\": { \"lower_threshold\": 1790812800000, \"upper_threshold\": 1793491200000 }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` usage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.voicy.co/functions/v1/call-usage'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer voicy_sk_live_xxx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` filter_criteria:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` agent_numbers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'+972771234567'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` direction:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'incoming'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` start_timestamp:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`lower_threshold:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1790812800000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`upper_threshold:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1793491200000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`usage `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.voicy.co/functions/v1/call-usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer voicy_sk_live_xxx'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'filter_criteria'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'agent_numbers'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'+972771234567'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'direction'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'incoming'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'start_timestamp'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'lower_threshold'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1790812800000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'upper_threshold'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1793491200000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).json()`})}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"billable_seconds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4380`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"billable_calls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`41`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"agent_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+972771234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"billable_seconds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4380`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"billable_calls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`41`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 Bad Request`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"start_timestamp.lower_threshold and upper_threshold are required (Unix milliseconds)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`429 Too Many Requests`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Too many requests: this API key is limited to 600 requests per minute. Retry after 23 seconds.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get Usage","api":"POST /v1/call-usage","description":"Billable seconds and calls for your numbers over a time window","href":"/api-reference/call-usage"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.voicy.co/functions/v1/call-usage\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer voicy_sk_live_xxx\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"filter_criteria\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"agent_numbers\": [\"+972771234567\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"direction\": \"incoming\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"start_timestamp\": { \"lower_threshold\": 1790812800000, \"upper_threshold\": 1793491200000 }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> usage\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.voicy.co/functions/v1/call-usage'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'POST'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Bearer voicy_sk_live_xxx'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'application/json'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> filter_criteria:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> agent_numbers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'+972771234567'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> direction:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'incoming'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> start_timestamp:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">lower_threshold:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1790812800000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">upper_threshold:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1793491200000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">})).\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">usage \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.voicy.co/functions/v1/call-usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Authorization'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Bearer voicy_sk_live_xxx'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'filter_criteria'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'agent_numbers'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'+972771234567'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'direction'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'incoming'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'start_timestamp'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'lower_threshold'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1790812800000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'upper_threshold'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1793491200000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">).json()\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 OK","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"billable_seconds\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4380\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"billable_calls\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">41\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"agent_number\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"+972771234567\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"billable_seconds\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4380\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"billable_calls\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">41\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 Bad Request","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"start_timestamp.lower_threshold and upper_threshold are required (Unix milliseconds)\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"429 Too Many Requests","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Too many requests: this API key is limited to 600 requests per minute. Retry after 23 seconds.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Get Usage","path":"/v1/call-usage","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"filter_criteria":[{"type":"object","properties":{"agent_numbers":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Your numbers, in E.164 ( `+972771234567` ), 1 to 100. A value that is not E.164, or an empty list, is a `400` .","required":true}],"start_timestamp":[{"type":"object","properties":{},"description":"The window, Unix milliseconds: `lower_threshold` (inclusive) and `upper_threshold` (exclusive), both required, the first before the second.","required":true}],"direction":[{"type":"string","description":"`incoming` or `outgoing` : count only inbound or only outbound calls. Both when omitted."}],"exclude_test_calls":[{"type":"boolean","description":"Leave test calls (calls from a contact flagged as a test user) out of the totals, as Voicy’s billing rule does. Send `false` to count them too, at their real duration (the same 60-second minimum per call), so you can see the usage of your own test numbers. The setting applies to this request only: it does not change how a call is billed to your account anywhere else in Voicy. Anything but a boolean is a `400` ."}],"exclude_vars":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Leave out calls that carry a given saved variable. A list of 1 to 5 `{ \"name\": ..., \"value\": ... }` pairs: a call is left out when its latest saved value of any one of those variables is exactly the listed text (when a variable was saved more than once, the latest save decides; values saved together all count). Use it to keep calls you handle differently out of a total, for example calls your agent declined at their start ( `{ \"name\": \"declined\", \"value\": \"true\" }` , with your flow setting that variable). `name` is a lowercase variable name (letters, digits and `_` , starting with a letter) and must not start with `z_` : a `z_` variable is call-local and is never saved, so it could never match. `value` is non-empty text of at most 200 characters. A malformed list is a `400` . Only text variables can match. A list variable or an enum answer has no text to compare, so a call is never left out because of one. The filter applies to this request only. It does not change how a call is billed to your account anywhere else in Voicy. A call is left out only while its variables exist. If the call’s content is deleted, its saved variables are deleted with it, and the call is counted again by this request. A total you already read for a closed period can therefore grow later. A call also counts until its variables are saved, which happens just after it ends. A request made right after a call ends can still count it, and the same request repeated once the call is fully processed leaves it out, so a total can shrink. Repeat the read once your calls are processed."}]},"required":true}]}}],"examples":{"example":{"value":{"filter_criteria":{"agent_numbers":[{}],"start_timestamp":{},"direction":"\u003cstring>","exclude_test_calls":true,"exclude_vars":[{}]}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"billable_seconds":[{"type":"integer","description":"Total billable seconds across the requested numbers."}],"billable_calls":[{"type":"integer","description":"Total number of calls that counted."}],"usage":[{"type":"array","items":[{"type":"object","properties":{"agent_number":[{"type":"string","description":"The number in E.164."}],"billable_seconds":[{"type":"integer","description":"Billable seconds for this number."}],"billable_calls":[{"type":"integer","description":"Calls that counted for this number."}]}}],"description":"One entry per requested number, in the order requested, zeros included."}]}}],"examples":{"example":{"value":{"billable_seconds":123,"billable_calls":123,"usage":[{"agent_number":"\u003cstring>","billable_seconds":123,"billable_calls":123}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"voicy-a20ff56e","siteName":"Voicy API","title":"Get Usage - Voicy API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T10:30:48.559Z","originalFileLocation":"api-reference/call-usage.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Billable seconds and calls for your numbers over a time window\">\u003cmeta data-mint-head name=\"application-name\" content=\"Voicy API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/voicy-a20ff56e/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/voicy-a20ff56e/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/voicy-a20ff56e/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/voicy-a20ff56e/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Usage - Voicy API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Billable seconds and calls for your numbers over a time window\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Voicy API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.voicy.co/api-reference/call-usage\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://voicy-a20ff56e.mintlify.site/_mintlify/api/og/v2?division=Calls\u0026amp;title=Get+Usage\u0026amp;description=Billable+seconds+and+calls+for+your+numbers+over+a+time+window\u0026amp;theme=0a3a852175ddc8e5bfd2cfca\u0026amp;signature=22568028672091406097e940f932bb9c46cc11f456afee6f31a80a2700e26a81\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get Usage - Voicy API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Billable seconds and calls for your numbers over a time window\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://voicy-a20ff56e.mintlify.site/_mintlify/api/og/v2?division=Calls\u0026amp;title=Get+Usage\u0026amp;description=Billable+seconds+and+calls+for+your+numbers+over+a+time+window\u0026amp;theme=0a3a852175ddc8e5bfd2cfca\u0026amp;signature=22568028672091406097e940f932bb9c46cc11f456afee6f31a80a2700e26a81\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/voicy-a20ff56e/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Voicy API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.voicy.co/api-reference/call-usage\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/call-usage.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.voicy.co/#organization\",\"name\":\"Voicy API\",\"url\":\"https://docs.voicy.co\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.voicy.co#website\",\"name\":\"Voicy API\",\"url\":\"https://docs.voicy.co\",\"publisher\":{\"@id\":\"https://docs.voicy.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.voicy.co/api-reference/call-usage#webpage\",\"url\":\"https://docs.voicy.co/api-reference/call-usage\",\"name\":\"Get Usage\",\"description\":\"Billable seconds and calls for your numbers over a time window\",\"dateModified\":\"2026-11-16T10:30:48.559Z\",\"isPartOf\":{\"@id\":\"https://docs.voicy.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.voicy.co/api-reference/call-usage#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.voicy.co/api-reference/call-usage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Calls\",\"item\":\"https://docs.voicy.co/api-reference/call-dial\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Usage\",\"item\":\"https://docs.voicy.co/api-reference/call-usage\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.voicy.co/api-reference/call-usage#apireference\",\"headline\":\"Get Usage\",\"name\":\"Get Usage\",\"description\":\"Billable seconds and calls for your numbers over a time window\",\"url\":\"https://docs.voicy.co/api-reference/call-usage\",\"mainEntityOfPage\":{\"@id\":\"https://docs.voicy.co/api-reference/call-usage#webpage\"},\"dateModified\":\"2026-11-16T10:30:48.559Z\",\"publisher\":{\"@id\":\"https://docs.voicy.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.voicy.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Voicy API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Voicy API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/call-usage.md","siteName":"Voicy API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Overview","href":"/api-reference/overview"}]},{"group":"Models","pages":[{"title":"Call","href":"/api-reference/models/call"},{"title":"Agent","href":"/api-reference/models/agent"},{"title":"Phone","href":"/api-reference/models/phone"}]},{"group":"Calls","pages":[{"title":"Call Dial","api":"POST /v1/call-dial","href":"/api-reference/call-dial"},{"title":"Call Get","api":"GET /v1/call-get/{call_id}","href":"/api-reference/call-get"},{"title":"Call List","api":"POST /v1/call-list","description":"List calls with optional filtering and pagination","href":"/api-reference/call-list"},{"title":"Get Usage","api":"POST /v1/call-usage","href":"/api-reference/call-usage"}]},{"group":"Agents","pages":[{"title":"List Agents","api":"GET /v1/agent-list","description":"List the agents in your account","href":"/api-reference/agent-list"},{"title":"Get Agent","api":"GET /v1/agent-get/{agent_id}","href":"/api-reference/agent-get"},{"title":"Create Agent","api":"POST /v1/agent-create","href":"/api-reference/agent-create"},{"title":"Update Agent","api":"PATCH /v1/agent-modify/{agent_id}","href":"/api-reference/agent-modify"}]},{"group":"Phone Numbers","pages":[{"title":"List Phone Numbers","api":"GET /v1/phone-number-list","href":"/api-reference/phone-number-list"},{"title":"Assign Phone Number","api":"PATCH /v1/phone-number-modify/{phone_number}","href":"/api-reference/phone-number-modify"},{"title":"Allocate Phone Number","api":"POST /v1/phone-number-allocate","href":"/api-reference/phone-number-allocate"},{"title":"Release Phone Number","api":"POST /v1/phone-number-release","href":"/api-reference/phone-number-release"}]}]}]},"basePath":"","title":"Get Usage - Voicy API","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-_HcdDqS2.js","snippetPresets-CXnm-WO6.js","utils-Dg59J__o.js","style-to-object-BY3JEAdk.js","utils-D8TRpdk7.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-B6QaxWc5.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DeMZ-lcM.js","_Uint8Array-BjA2mcVW.js","isObject-FP1Yky1u.js","ApiExamples-cjPyMv63.js","usePlaygroundInputsStore-D7BWoaw4.js","shallow-Z1ceDNSG.js","isEqual-BObTuQrO.js","CodeSnippets-D1UZ1AE-.js","CodeSnippet-B373COAT.js","getApiPlaygroundDisplay-CfL-UuDS.js","Page-DuqezyvM.js","DynamicMarkdown-5yMTCLas.js","SectionHeading-BxT1HYfP.js","icon-DYJTTD3g.js","MethodPill-4AyycJeu.js","getPastedJson-Bp3WV6cN.js","Check2Icon-PhZu6Gry.js","axios-CsQoIw0U.js"]}