{"openapi":"3.1.0","info":{"title":"AIMERICA API","description":"The AIMERICA public API: people, numbers, devices, calls, recordings, presence, messages, voicemails, faxes and webhooks for one company. Authenticate with a company API key (`Authorization: Bearer aim_live_...`, Settings > Developer) or an OAuth 2.0 access token (`aim_at_...`, authorization code + PKCE or client credentials). Every list pages with `limit` and `cursor`; calls and messages also take a `sync_token`. Errors are `{\"error\": {\"type\", \"message\", \"request_id\"}}`.","version":"1.0"},"servers":[{"url":"https://api.a1merica.ai/v1"}],"paths":{"/oauth/authorize":{"get":{"tags":["OAuth"],"summary":"Start an authorization (browser redirect)","description":"The app sends the user here. AIMERICA checks the request and redirects the browser to the consent page; after the user allows, the browser comes back to `redirect_uri` with `code` and `state`. PKCE (S256) is required for public apps and recommended for all.","operationId":"authorize_oauth_authorize_get","parameters":[{"name":"response_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Always `code`","title":"Response Type"},"description":"Always `code`"},{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of the app's registered addresses, exactly","title":"Redirect Uri"},"description":"One of the app's registered addresses, exactly"},{"name":"scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space-separated scopes, within what the app registered","title":"Scope"},"description":"Space-separated scopes, within what the app registered"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"State"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PKCE: base64url(sha256(code_verifier))","title":"Code Challenge"},"description":"PKCE: base64url(sha256(code_verifier))"},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`S256` (the only method accepted)","title":"Code Challenge Method"},"description":"`S256` (the only method accepted)"}],"responses":{"302":{"description":"Redirect to the consent page, or back to redirect_uri with `error`"},"400":{"description":"The redirect_uri or client_id itself is wrong (an HTML page, nothing is redirected)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"light","security":[]}},"/oauth/authorize/request":{"get":{"tags":["OAuth"],"summary":"What the consent page shows (customer session)","operationId":"authorize_request_info_oauth_authorize_request_get","parameters":[{"name":"req","in":"query","required":true,"schema":{"type":"string","minLength":10,"maxLength":200,"title":"Req"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"light","security":[]}},"/oauth/authorize/decision":{"post":{"tags":["OAuth"],"summary":"Allow or deny (customer session)","operationId":"authorize_decision_oauth_authorize_decision_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentDecision"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRedirect"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"light","security":[]}},"/oauth/token":{"post":{"tags":["OAuth"],"summary":"Get or refresh tokens","description":"`grant_type=authorization_code` (+ code, redirect_uri, client_id, code_verifier; confidential apps also client_secret or HTTP Basic), `client_credentials` (confidential apps, for their own company, no user) or `refresh_token` (rotation: a new pair every time; the old refresh token dies when the new access token is first used, or after 60 s). Access tokens last 60 minutes, refresh tokens 30 days. Errors follow RFC 6749.","operationId":"token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"grant_type":{"type":"string","enum":["authorization_code","client_credentials","refresh_token"]},"code":{"type":"string","description":"authorization_code: the code from the redirect"},"redirect_uri":{"type":"string","description":"authorization_code: the same redirect_uri as at /oauth/authorize"},"code_verifier":{"type":"string","description":"authorization_code: the PKCE verifier (43-128 chars)"},"refresh_token":{"type":"string","description":"refresh_token: the aim_rt_... token"},"scope":{"type":"string","description":"client_credentials: space-separated scopes within the app's"},"client_id":{"type":"string","description":"aim_app_... (or HTTP Basic)"},"client_secret":{"type":"string","description":"confidential apps (or HTTP Basic)"}},"type":"object","required":["grant_type"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorBody"}}}}},"x-rate-tier":"medium","security":[]}},"/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Revoke a token (RFC 7009)","description":"Form fields `token` (an access or refresh token) and optional `token_type_hint`; client-authenticated. Always 200 once the client is known - revoking a token that is already dead is not an error.","operationId":"revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string"},"token_type_hint":{"type":"string","enum":["access_token","refresh_token"]},"client_id":{"type":"string"},"client_secret":{"type":"string"}},"type":"object","required":["token"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorBody"}}}}},"x-rate-tier":"medium","security":[]}},"/oauth/introspect":{"post":{"tags":["OAuth"],"summary":"Is this token live? (RFC 7662)","description":"Form field `token`; client-authenticated. Answers `{active: false}` for anything that is not a live token of the calling app.","operationId":"introspect_oauth_introspect_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"token":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"}},"type":"object","required":["token"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntrospectResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthErrorBody"}}}}},"x-rate-tier":"medium","security":[]}},"/account":{"get":{"tags":["account"],"summary":"Get Account","operationId":"get_account_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}}},"x-rate-tier":"light","x-scope":"account:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/users":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_users_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|disabled)$"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"description":"Part of a name, email or extension","title":"Q"},"description":"Part of a name, email or extension"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_User_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"users:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/users/me":{"get":{"tags":["users"],"summary":"Get Me","description":"The person this credential acts as (a key or app token: whoever created it, else the owner).","operationId":"get_me_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"x-rate-tier":"medium","x-scope":"users:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","operationId":"get_user_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"users:read","security":[{"bearerAuth":[]},{"apiKey":[]}]},"patch":{"tags":["users"],"summary":"Patch User","description":"Name, extension, role — through api/team.update_member, so the same checks and the company's\nactivity log apply (the owner's role cannot change; an extension must be free). No password, no email.","operationId":"patch_user_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"users:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/numbers":{"get":{"tags":["numbers"],"summary":"List Numbers","operationId":"list_numbers_numbers_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|pending|porting)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_Number_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"numbers:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/numbers/{number_id}":{"get":{"tags":["numbers"],"summary":"Get Number","operationId":"get_number_numbers__number_id__get","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","title":"Number Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"numbers:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/numbers/{number_id}/assign":{"post":{"tags":["numbers"],"summary":"Assign Number","description":"Give the line to one person, or to nobody (`user_id: null`) — through api/phone_numbers.assign_number,\nso the assignment log and the desk-phone revocation run as they do from Settings.","operationId":"assign_number_numbers__number_id__assign_post","parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","title":"Number Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberAssign"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"numbers:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/devices":{"get":{"tags":["devices"],"summary":"List Devices","description":"Every device in the company. Built in memory (a company has tens of people, not thousands), so\nthe cursor is simply the position in that list.","operationId":"list_devices_devices_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_Device_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"devices:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/users/{user_id}/devices":{"get":{"tags":["devices"],"summary":"List User Devices","operationId":"list_user_devices_users__user_id__devices_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_Device_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"devices:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls":{"get":{"tags":["calls"],"summary":"List Calls","description":"The call log, newest first. Send back `sync_token` to get only what changed since (oldest change\nfirst). An explicit `since`/`until` replaces the 30-day window of a full sync.","operationId":"list_calls_calls_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only calls from this moment on (ISO-8601)","title":"Since"},"description":"Only calls from this moment on (ISO-8601)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only calls up to this moment","title":"Until"},"description":"Only calls up to this moment"},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound)$"},{"type":"null"}],"title":"Direction"}},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(answered|missed|voicemail|busy|no_answer|blocked|failed|in_progress)$"},{"type":"null"}],"title":"Result"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},{"name":"number","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"A number on either side of the call (E.164 or digits)","title":"Number"},"description":"A number on either side of the call (E.164 or digits)"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"Part of a number on either side of the call","title":"Q"},"description":"Part of a number on either side of the call"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"sync_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the previous response; omit for a full 30-day window","title":"Sync Token"},"description":"From the previous response; omit for a full 30-day window"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPaginated_Call_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"calls:read","security":[{"bearerAuth":[]},{"apiKey":[]}]},"post":{"tags":["calls"],"summary":"Create Call","description":"Click-to-dial: the person's open AIMERICA app places the call (see the module note). 409 when\nthat app is not open. `caller_id` must be one of the company's numbers the person may use.","operationId":"create_call_calls_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/active":{"get":{"tags":["calls"],"summary":"Active Calls","description":"Calls in progress right now, among those this credential may see (the live monitor's view,\nwithout the supervisor-only exclusions).","operationId":"active_calls_calls_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paginated_Call_"}}}}},"x-rate-tier":"medium","x-scope":"calls:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}":{"get":{"tags":["calls"],"summary":"Get Call","operationId":"get_call_calls__call_id__get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/status":{"get":{"tags":["calls"],"summary":"Get Call Status","description":"`ringing`, `in_progress`, `ended` or `failed` — for a call, or for the id `POST /calls` returned.","operationId":"get_call_status_calls__call_id__status_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/transcript":{"get":{"tags":["calls"],"summary":"Get Transcript","operationId":"get_transcript_calls__call_id__transcript_get","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"transcripts:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/hold":{"post":{"tags":["calls"],"summary":"Hold","operationId":"hold_calls__call_id__hold_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/unhold":{"post":{"tags":["calls"],"summary":"Unhold","operationId":"unhold_calls__call_id__unhold_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/transfer":{"post":{"tags":["calls"],"summary":"Transfer","description":"A blind transfer to a colleague (their user id or extension) or to an outside number, through\nservices/call_transfer.start — the same path as the app's Transfer button.","operationId":"transfer_calls__call_id__transfer_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/park":{"post":{"tags":["calls"],"summary":"Park","operationId":"park_calls__call_id__park_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/record":{"post":{"tags":["calls"],"summary":"Record","description":"Start plays the recording notice to everyone first and logs the consent, exactly as the app's\nRecord button does (owner's rule of 15 Sep); a call on hold or mid-transfer refuses.","operationId":"record_calls__call_id__record_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/calls/{call_id}/hangup":{"post":{"tags":["calls"],"summary":"Hangup","description":"Through api/calls.hangup_call, so declining a ringing call, leaving a transfer or a conference\nbehave as they do from the app.","operationId":"hangup_calls__call_id__hangup_post","parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ControlOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"calls:control","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/recordings/{recording_id}":{"get":{"tags":["recordings"],"summary":"Get Recording","operationId":"get_recording_recordings__recording_id__get","parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","title":"Recording Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recording"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"recordings:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/recordings/{recording_id}/media":{"get":{"tags":["recordings"],"summary":"Get Recording Media","description":"The audio (audio/ogg). Signed link, or a credential with `recordings:read`.","operationId":"get_recording_media_recordings__recording_id__media_get","parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","title":"Recording Id"}},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the signed media_url","title":"Sig"},"description":"From the signed media_url"},{"name":"exp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"From the signed media_url","title":"Exp"},"description":"From the signed media_url"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"recordings:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/presence/me":{"get":{"tags":["presence"],"summary":"Presence Me","operationId":"presence_me_presence_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Presence"}}}}},"x-rate-tier":"medium","x-scope":"presence:read","security":[{"bearerAuth":[]},{"apiKey":[]}]},"put":{"tags":["presence"],"summary":"Put Presence Me","description":"`dnd` is Do Not Disturb (nothing rings); `status: away` with a `message` is the softer one the\nteam queues skip while the person's own line still rings; `status: available` clears it.","operationId":"put_presence_me_presence_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresencePut"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Presence"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"presence:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/presence":{"get":{"tags":["presence"],"summary":"Presence Of","operationId":"presence_of_presence_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"A colleague's user id","title":"User Id"},"description":"A colleague's user id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Presence"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"presence:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/messages":{"post":{"tags":["messages"],"summary":"Send a text (SMS or MMS)","operationId":"send_message_messages_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"messages:write","security":[{"bearerAuth":[]},{"apiKey":[]}]},"get":{"tags":["messages"],"summary":"Messages on your lines, newest first; with sync_token only what changed since","operationId":"list_messages_messages_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601; default 30 days back","title":"Since"},"description":"ISO-8601; default 30 days back"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound)$"},{"type":"null"}],"title":"Direction"}},{"name":"number","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Either party, E.164","title":"Number"},"description":"Either party, E.164"},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(queued|sent|delivered|failed|received)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"},{"name":"sync_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"From the previous response; omit for a full 30-day window","title":"Sync Token"},"description":"From the previous response; omit for a full 30-day window"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"messages:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/messages/{message_id}":{"get":{"tags":["messages"],"summary":"Get Message","operationId":"get_message_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"messages:read","security":[{"bearerAuth":[]},{"apiKey":[]}]},"patch":{"tags":["messages"],"summary":"Mark read or unread","operationId":"update_message_messages__message_id__patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"messages:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/conversations":{"get":{"tags":["messages"],"summary":"One row per (your line, other number), most recent first","operationId":"list_conversations_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"messages:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/voicemails":{"get":{"tags":["voicemails"],"summary":"Voicemails on your lines, newest first","operationId":"list_voicemails_voicemails_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601","title":"Since"},"description":"ISO-8601"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only the lines assigned to this person","title":"User Id"},"description":"Only the lines assigned to this person"},{"name":"read","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Read"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"voicemails:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/voicemails/{voicemail_id}":{"get":{"tags":["voicemails"],"summary":"Get Voicemail","operationId":"get_voicemail_voicemails__voicemail_id__get","parameters":[{"name":"voicemail_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voicemail Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voicemail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"voicemails:read","security":[{"bearerAuth":[]},{"apiKey":[]}]},"patch":{"tags":["voicemails"],"summary":"Mark read or unread (the desk phone's light follows)","operationId":"update_voicemail_voicemails__voicemail_id__patch","parameters":[{"name":"voicemail_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voicemail Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicemailUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voicemail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"voicemails:write","security":[{"bearerAuth":[]},{"apiKey":[]}]},"delete":{"tags":["voicemails"],"summary":"Delete Voicemail","operationId":"delete_voicemail_voicemails__voicemail_id__delete","parameters":[{"name":"voicemail_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voicemail Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"voicemails:write","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/voicemails/{voicemail_id}/media":{"get":{"tags":["voicemails"],"summary":"The audio (Ogg): a signed link, or a bearer with voicemails:read","operationId":"voicemail_media_voicemails__voicemail_id__media_get","parameters":[{"name":"voicemail_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Voicemail Id"}},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sig"}},{"name":"exp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","security":[]}},"/faxes":{"post":{"tags":["faxes"],"summary":"Send a PDF as a fax","operationId":"send_fax_faxes_post","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_fax_faxes_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fax"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"faxes:write","security":[{"bearerAuth":[]},{"apiKey":[]}]},"get":{"tags":["faxes"],"summary":"The fax log, newest first","operationId":"list_faxes_faxes_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601","title":"Since"},"description":"ISO-8601"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Until"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(inbound|outbound)$"},{"type":"null"}],"title":"Direction"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(queued|sending|sent|failed|received)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"faxes:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/faxes/{fax_id}":{"get":{"tags":["faxes"],"summary":"Get Fax","operationId":"get_fax_faxes__fax_id__get","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fax"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"faxes:read","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/faxes/{fax_id}/media":{"get":{"tags":["faxes"],"summary":"The PDF: a signed link, or a bearer with faxes:read","operationId":"fax_media_faxes__fax_id__media_get","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"sig","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sig"}},{"name":"exp","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","security":[]}},"/webhooks":{"get":{"tags":["webhooks"],"summary":"Your subscriptions","operationId":"list_webhooks_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]},"post":{"tags":["webhooks"],"summary":"Subscribe to events (the address must echo X-AIMERICA-Validation-Token)","operationId":"create_webhook_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/webhooks/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Get Webhook","operationId":"get_webhook_webhooks__webhook_id__get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]},"put":{"tags":["webhooks"],"summary":"Change the filters or the address, or reactivate","operationId":"update_webhook_webhooks__webhook_id__put","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]},"delete":{"tags":["webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/webhooks/{webhook_id}/renew":{"post":{"tags":["webhooks"],"summary":"Push the expiry out (30 days default, 365 at most)","operationId":"renew_webhook_webhooks__webhook_id__renew_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookRenew"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Send a test.ping now and report the answer","operationId":"test_webhook_webhooks__webhook_id__test_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"medium","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]}},"/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"Recent deliveries, newest first","operationId":"list_deliveries_webhooks__webhook_id__deliveries_get","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page (1-200)","default":50,"title":"Limit"},"description":"Items per page (1-200)"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor from the previous page's next_cursor","title":"Cursor"},"description":"Opaque cursor from the previous page's next_cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-rate-tier":"heavy","x-scope":"webhooks:manage","security":[{"bearerAuth":[]},{"apiKey":[]}]}}},"components":{"schemas":{"Account":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"country":{"type":"string","title":"Country"},"timezone":{"type":"string","title":"Timezone"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"additionalProperties":false,"type":"object","required":["id","name","country","timezone","plan"],"title":"Account"},"Body_send_fax_faxes_post":{"properties":{"to":{"type":"string","title":"To","description":"E.164"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"PDF, 15 MB at most"},"cover_text":{"anyOf":[{"type":"string","maxLength":1500},{"type":"null"}],"title":"Cover Text","description":"Adds a cover page with this note"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From","description":"One of your fax numbers; default: your fax line"}},"type":"object","required":["to","file"],"title":"Body_send_fax_faxes_post"},"Call":{"properties":{"id":{"type":"string","title":"Id"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"result":{"type":"string","enum":["answered","missed","voicemail","busy","no_answer","blocked","failed","in_progress"],"title":"Result"},"from":{"$ref":"#/components/schemas/CallParty"},"to":{"$ref":"#/components/schemas/CallParty"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"answered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answered At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration S"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Id"},"recording":{"anyOf":[{"$ref":"#/components/schemas/CallRecordingRef"},{"type":"null"}]},"transcript_available":{"type":"boolean","title":"Transcript Available"},"ai":{"anyOf":[{"$ref":"#/components/schemas/CallAi"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","direction","result","from","to","started_at","answered_at","ended_at","duration_s","user_id","number_id","recording","transcript_available","ai","updated_at"],"title":"Call"},"CallAi":{"properties":{"handled":{"type":"boolean","title":"Handled"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"additionalProperties":false,"type":"object","required":["handled","outcome","summary"],"title":"CallAi"},"CallCreate":{"properties":{"from":{"$ref":"#/components/schemas/CallFrom"},"to":{"$ref":"#/components/schemas/CallTo"},"caller_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Caller Id"}},"additionalProperties":false,"type":"object","required":["from","to"],"title":"CallCreate","description":"`POST /calls` (click-to-dial): ring this person's open app, which dials the number."},"CallCreated":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","const":"ringing","title":"Status"}},"additionalProperties":false,"type":"object","required":["id","status"],"title":"CallCreated"},"CallFrom":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"}},"additionalProperties":false,"type":"object","title":"CallFrom"},"CallParty":{"properties":{"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"additionalProperties":false,"type":"object","required":["number","name","user_id"],"title":"CallParty"},"CallRecordingRef":{"properties":{"id":{"type":"string","title":"Id"},"available":{"type":"boolean","title":"Available"}},"additionalProperties":false,"type":"object","required":["id","available"],"title":"CallRecordingRef"},"CallStatusOut":{"properties":{"status":{"type":"string","enum":["ringing","in_progress","ended","failed"],"title":"Status"}},"additionalProperties":false,"type":"object","required":["status"],"title":"CallStatusOut"},"CallTo":{"properties":{"number":{"type":"string","maxLength":32,"minLength":3,"title":"Number"}},"additionalProperties":false,"type":"object","required":["number"],"title":"CallTo"},"ConsentApp":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ConsentApp"},"ConsentDecision":{"properties":{"req":{"type":"string","maxLength":200,"minLength":10,"title":"Req","description":"The signed request id from the consent URL"},"decision":{"type":"string","enum":["allow","deny"],"title":"Decision"}},"additionalProperties":false,"type":"object","required":["req","decision"],"title":"ConsentDecision"},"ConsentOrg":{"properties":{"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"ConsentOrg"},"ConsentRedirect":{"properties":{"redirect_to":{"type":"string","title":"Redirect To"}},"additionalProperties":false,"type":"object","required":["redirect_to"],"title":"ConsentRedirect"},"ConsentRequest":{"properties":{"app":{"$ref":"#/components/schemas/ConsentApp"},"scopes":{"items":{"$ref":"#/components/schemas/ConsentScope"},"type":"array","title":"Scopes"},"org":{"$ref":"#/components/schemas/ConsentOrg"},"user":{"additionalProperties":{"type":"string"},"type":"object","title":"User","description":"{id, email, name} of the signed-in person"}},"additionalProperties":false,"type":"object","required":["app","scopes","org"],"title":"ConsentRequest"},"ConsentScope":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"label_fr":{"type":"string","title":"Label Fr"}},"additionalProperties":false,"type":"object","required":["name","label","label_fr"],"title":"ConsentScope"},"ControlOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"on_hold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"On Hold"},"park_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Park Code"}},"additionalProperties":false,"type":"object","required":["id","status"],"title":"ControlOut","description":"What a control route hands back: the call's state and, for park, the code to retrieve it with."},"Conversation":{"properties":{"id":{"type":"string","title":"Id"},"number":{"type":"string","title":"Number","description":"Your line, E.164"},"number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Id"},"contact":{"$ref":"#/components/schemas/Party"},"last_message_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message At"},"unread":{"type":"integer","title":"Unread"}},"additionalProperties":false,"type":"object","required":["id","number","contact","last_message_at","unread"],"title":"Conversation"},"ConversationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Conversation"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"ConversationList"},"Device":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["desk_phone","softphone","mobile","web"],"title":"Type"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"mac":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac"},"user_id":{"type":"string","title":"User Id"},"status":{"type":"string","enum":["online","offline","unknown"],"title":"Status"},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen At"}},"additionalProperties":false,"type":"object","required":["id","type","model","mac","user_id","status","last_seen_at"],"title":"Device"},"Fax":{"properties":{"id":{"type":"string","title":"Id"},"direction":{"type":"string","title":"Direction"},"from":{"type":"string","title":"From"},"to":{"type":"string","title":"To"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages"},"status":{"type":"string","title":"Status","description":"queued | sending | sent | failed | received"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url","description":"Signed link to the PDF, good for 15 minutes"},"number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"additionalProperties":false,"type":"object","required":["id","direction","from","to","pages","status","created_at"],"title":"Fax"},"FaxList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Fax"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"FaxList"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntrospectResponse":{"properties":{"active":{"type":"boolean","title":"Active"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"token_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type"},"exp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp"},"iat":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iat"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"sub":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"additionalProperties":false,"type":"object","required":["active"],"title":"IntrospectResponse"},"Media":{"properties":{"url":{"type":"string","title":"Url"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"additionalProperties":false,"type":"object","required":["url"],"title":"Media"},"Message":{"properties":{"id":{"type":"string","title":"Id"},"conversation_id":{"type":"string","title":"Conversation Id"},"direction":{"type":"string","title":"Direction","description":"inbound | outbound"},"from":{"type":"string","title":"From"},"to":{"type":"string","title":"To"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"media":{"items":{"$ref":"#/components/schemas/Media"},"type":"array","title":"Media"},"status":{"type":"string","title":"Status","description":"queued | sent | delivered | failed | received"},"read":{"type":"boolean","title":"Read"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Id","description":"The line (see /numbers)"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Who sent it, when a person did"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","conversation_id","direction","from","to","text","media","status","read","sent_at","delivered_at","created_at","updated_at"],"title":"Message"},"MessageCreate":{"properties":{"from":{"type":"string","maxLength":20,"minLength":10,"title":"From","description":"One of your numbers, E.164"},"to":{"items":{"type":"string"},"type":"array","maxItems":1,"minItems":1,"title":"To","description":"The recipient, E.164 (one per message in this version)"},"text":{"anyOf":[{"type":"string","maxLength":1600},{"type":"null"}],"title":"Text"},"media":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Media","description":"Public https links the carrier can fetch (MMS)"}},"additionalProperties":false,"type":"object","required":["from","to"],"title":"MessageCreate"},"MessageList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"sync_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Token"}},"additionalProperties":false,"type":"object","required":["items"],"title":"MessageList"},"MessageUpdate":{"properties":{"read":{"type":"boolean","title":"Read","description":"true marks the message read"}},"additionalProperties":false,"type":"object","required":["read"],"title":"MessageUpdate"},"Number":{"properties":{"id":{"type":"string","title":"Id"},"number":{"type":"string","title":"Number"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"type":{"type":"string","enum":["local","toll_free"],"title":"Type"},"capabilities":{"items":{"type":"string","enum":["voice","sms","fax"]},"type":"array","title":"Capabilities"},"assigned_to":{"anyOf":[{"$ref":"#/components/schemas/NumberAssignee"},{"type":"null"}]},"routing":{"type":"string","enum":["user","ivr","ai_agent","group","unassigned"],"title":"Routing"},"status":{"type":"string","enum":["active","pending","porting"],"title":"Status"},"created_at":{"type":"string","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","number","label","type","capabilities","assigned_to","routing","status","created_at"],"title":"Number"},"NumberAssign":{"properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"additionalProperties":false,"type":"object","title":"NumberAssign","description":"`POST /numbers/{id}/assign`: a person, or null to unassign."},"NumberAssignee":{"properties":{"user_id":{"type":"string","title":"User Id"}},"additionalProperties":false,"type":"object","required":["user_id"],"title":"NumberAssignee"},"OAuthErrorBody":{"properties":{"error":{"type":"string","title":"Error"},"error_description":{"type":"string","title":"Error Description"}},"additionalProperties":false,"type":"object","required":["error","error_description"],"title":"OAuthErrorBody"},"Paginated_Call_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Call"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"Paginated[Call]"},"Paginated_Device_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Device"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"Paginated[Device]"},"Paginated_Number_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Number"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"Paginated[Number]"},"Paginated_User_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/User"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"Paginated[User]"},"Party":{"properties":{"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["number"],"title":"Party"},"Presence":{"properties":{"user_id":{"type":"string","title":"User Id"},"status":{"type":"string","enum":["available","busy","away","offline"],"title":"Status"},"dnd":{"type":"boolean","title":"Dnd"},"on_call":{"type":"boolean","title":"On Call"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","required":["user_id","status","dnd","on_call","message"],"title":"Presence"},"PresencePut":{"properties":{"dnd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dnd"},"message":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Message"},"status":{"anyOf":[{"type":"string","enum":["available","away"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"PresencePut","description":"`PUT /presence/me`: `status` may be `available` or `away`; busy and offline are observed, not set."},"RecordIn":{"properties":{"action":{"type":"string","enum":["start","stop"],"title":"Action"}},"additionalProperties":false,"type":"object","required":["action"],"title":"RecordIn"},"Recording":{"properties":{"id":{"type":"string","title":"Id"},"call_id":{"type":"string","title":"Call Id"},"duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration S"},"content_type":{"type":"string","title":"Content Type"},"media_url":{"type":"string","title":"Media Url"},"created_at":{"type":"string","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","call_id","duration_s","content_type","media_url","created_at"],"title":"Recording"},"SyncPaginated_Call_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Call"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"sync_token":{"type":"string","title":"Sync Token"}},"additionalProperties":false,"type":"object","required":["items","sync_token"],"title":"SyncPaginated[Call]"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","const":"Bearer","title":"Token Type"},"expires_in":{"type":"integer","title":"Expires In"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"refresh_token_expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refresh Token Expires In"},"scope":{"type":"string","title":"Scope"},"org_id":{"type":"string","title":"Org Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"additionalProperties":false,"type":"object","required":["access_token","token_type","expires_in","scope","org_id"],"title":"TokenResponse"},"Transcript":{"properties":{"call_id":{"type":"string","title":"Call Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"available":{"type":"boolean","title":"Available"}},"additionalProperties":false,"type":"object","required":["call_id","text","source","available"],"title":"Transcript"},"TransferIn":{"properties":{"to":{"type":"string","maxLength":64,"minLength":1,"title":"To"}},"additionalProperties":false,"type":"object","required":["to"],"title":"TransferIn","description":"`to` is a colleague's extension, a teammate's user id, or an outside number."},"User":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"},"status":{"type":"string","enum":["active","disabled"],"title":"Status"},"presence":{"anyOf":[{"$ref":"#/components/schemas/UserPresence"},{"type":"null"}]},"created_at":{"type":"string","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","email","name","extension","role","status","created_at"],"title":"User"},"UserPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"extension":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Extension"},"role":{"anyOf":[{"type":"string","enum":["admin","member"]},{"type":"null"}],"title":"Role"}},"additionalProperties":false,"type":"object","title":"UserPatch","description":"`PATCH /users/{id}`: name, extension, role. No password, no email change (contract)."},"UserPresence":{"properties":{"status":{"type":"string","enum":["available","busy","away","offline"],"title":"Status"},"dnd":{"type":"boolean","title":"Dnd"}},"additionalProperties":false,"type":"object","required":["status","dnd"],"title":"UserPresence"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Voicemail":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"number_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number Id"},"from":{"$ref":"#/components/schemas/Party"},"to":{"anyOf":[{"$ref":"#/components/schemas/Party"},{"type":"null"}]},"duration_s":{"type":"integer","title":"Duration S"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"read":{"type":"boolean","title":"Read"},"media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Url","description":"Signed link, good for 15 minutes, no token needed"},"received_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Received At"}},"additionalProperties":false,"type":"object","required":["id","user_id","from","duration_s","transcript","read","received_at"],"title":"Voicemail"},"VoicemailList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Voicemail"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"VoicemailList"},"VoicemailUpdate":{"properties":{"read":{"type":"boolean","title":"Read"}},"additionalProperties":false,"type":"object","required":["read"],"title":"VoicemailUpdate"},"Webhook":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"filters":{"items":{"type":"string"},"type":"array","title":"Filters"},"status":{"type":"string","title":"Status","description":"active | suspended | expired"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","title":"Created At"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"failure_count":{"type":"integer","title":"Failure Count"}},"additionalProperties":false,"type":"object","required":["id","url","filters","status","expires_at","created_at","last_delivery_at","failure_count"],"title":"Webhook"},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":1000,"minLength":8,"title":"Url","description":"https only, public address; it must echo X-AIMERICA-Validation-Token"},"filters":{"items":{"type":"string"},"type":"array","maxItems":8,"minItems":1,"title":"Filters","description":"calls.sessions, calls.log, messages, voicemails, faxes, presence, recordings.ready, test"},"secret":{"anyOf":[{"type":"string","maxLength":80,"minLength":16},{"type":"null"}],"title":"Secret","description":"Your own signing secret; one is made for you when omitted"},"expires_in":{"anyOf":[{"type":"integer","maximum":31536000.0,"minimum":60.0},{"type":"null"}],"title":"Expires In","description":"Seconds until the subscription stops delivering (default 30 days, at most 365)"}},"additionalProperties":false,"type":"object","required":["url","filters"],"title":"WebhookCreate"},"WebhookCreated":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"filters":{"items":{"type":"string"},"type":"array","title":"Filters"},"status":{"type":"string","title":"Status","description":"active | suspended | expired"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","title":"Created At"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Delivery At"},"failure_count":{"type":"integer","title":"Failure Count"},"secret":{"type":"string","title":"Secret","description":"Shown once: verify X-AIMERICA-Signature with it"}},"additionalProperties":false,"type":"object","required":["id","url","filters","status","expires_at","created_at","last_delivery_at","failure_count","secret"],"title":"WebhookCreated"},"WebhookDelivery":{"properties":{"id":{"type":"string","title":"Id"},"event":{"type":"string","title":"Event"},"status":{"type":"string","title":"Status","description":"pending | delivered | failed"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"attempt":{"type":"integer","title":"Attempt"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"additionalProperties":false,"type":"object","required":["id","event","status","status_code","attempt","delivered_at","error"],"title":"WebhookDelivery"},"WebhookDeliveryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"WebhookDeliveryList"},"WebhookList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","required":["items"],"title":"WebhookList"},"WebhookRenew":{"properties":{"expires_in":{"anyOf":[{"type":"integer","maximum":31536000.0,"minimum":60.0},{"type":"null"}],"title":"Expires In"}},"additionalProperties":false,"type":"object","title":"WebhookRenew"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":1000,"minLength":8},{"type":"null"}],"title":"Url","description":"A new address is validated again"},"filters":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":8,"minItems":1},{"type":"null"}],"title":"Filters"},"status":{"anyOf":[{"type":"string","pattern":"^active$"},{"type":"null"}],"title":"Status","description":"Only 'active': switches a suspended subscription back on"}},"additionalProperties":false,"type":"object","title":"WebhookUpdate"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"aim_at_...","description":"An OAuth 2.0 access token from POST /oauth/token (authorization code + PKCE, or client credentials)."},"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"aim_live_...","description":"A company API key from Settings > Developer, sent as `Authorization: Bearer aim_live_...`."}}},"security":[{"bearerAuth":[]},{"apiKey":[]}]}