openapi: 3.0.0 info: title: Jambonz API description: Jambonz REST API specification contact: email: daveh@drachtio.org license: name: MIT url: https://opensource.org/licenses/MIT version: 1.0.0 servers: - url: https://api.jambonz.cloud/v1 security: - bearerAuth: [] tags: - name: Users description: User Management - name: Settings description: General Settings - name: Accounts description: Account Settings - name: Clients description: SIP Clients - name: Applications description: Applications - name: Recent Calls description: Details of calls - name: Alerts description: Alerts of Errors and failures - name: Carriers description: SIP Carriers & Trunks - name: Speech description: Text to Speech & Speech to Text Providers - name: Phone Numbers description: Routing of Phone numbers to Applications - name: Call Routing description: Least cost Call Routing paths: /Sbcs: get: tags: - Carriers summary: retrieve public IP addresses of the jambonz SBCs operationId: listSbcs parameters: - in: query name: service_provider_sid required: false schema: type: string description: return only the SBCs operated for the sole use of this service provider responses: '200': description: list of SBC addresses content: application/json: schema: type: array items: properties: ipv4: type: string description: ip address of one of our Sbcs required: - ipv4 '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ApiKeys/{ApiKeySid}: parameters: - name: ApiKeySid in: path required: true schema: type: string /Users: post: tags: - Users summary: create a new user operationId: createUser requestBody: content: application/json: schema: type: object required: - name - is_active - force_change - is_view_only - initial_password - email properties: name: type: string description: username example: my_user email: type: string description: user email address example: user@example.com is_active: type: boolean description: user account is active force_change: type: boolean description: require the user to change password on next login initial_password: type: string description: users password example: MySecurePassword account_sid: type: string format: uuid description: account sid the account the user will have access to, if not set will create a Service Provider account service_provider_sid: type: string format: uuid description: The service provider sid, the account is under, if not set account will be admin level is_view_only: type: boolean description: if set to true the user will not be able to make changes responses: '200': description: user created content: application/json: schema: type: object properties: user_sid: type: string format: uuid description: The sid of the newly created user example: "58b8ec3a-6fcc-4fd7-8f45-cff054c2ebe9" '403': description: user creation failed content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Users/{UserSid}: parameters: - name: UserSid in: path required: true style: simple explode: false schema: type: string get: tags: - Users summary: retrieve user information operationId: getUser responses: '200': description: user information content: application/json: schema: type: object properties: user_sid: type: string format: uuid example: "58b8ec3a-6fcc-4fd7-8f45-cff054c2ebe9" name: type: string description: username example: my_user email: type: string description: user email address example: user@example.com is_active: type: number description: user account is active enum: - 0 - 1 force_change: type: number description: require the user to change password on next login enum: - 0 - 1 account_sid: type: string format: uuid description: account sid the account the user will have access to, if not set will create a Service Provider account service_provider_sid: type: string format: uuid description: The service provider sid, the account is under, if not set account will be admin level is_view_only: type: boolean description: If set to true the user will not be able to make changes provider: type: string enum: - local provider_user_id: type: string scope: type: string enum: - read-write phone_activation_code: type: string email_activation_code: type: string email_validated: type: number enum: - 0 - 1 phone_validated: type: number enum: - 0 - 1 email_content_opt_out: type: number enum: - 0 - 1 pending_email: type: string phone: type: string '403': description: user information content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Users summary: update user information operationId: updateUser requestBody: content: application/json: schema: type: object properties: name: type: string email: type: string email_activation_code: type: string old_password: type: string description: existing password, which is to be replaced new_password: type: string description: new password is_active: type: boolean force_change: type: boolean is_view_only: type: boolean description: if set to true the user will not be able to make changes responses: '204': description: user updated '403': description: user update failed content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' delete: tags: - Users summary: delete a user operationId: deleteUser responses: '204': description: user deleted '403': description: unauthorized '404': description: user not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Availability: get: tags: - Accounts summary: check if a limited-availability entity such as a subdomain, email or phone number is already in use operationId: checkAvailability parameters: - in: query name: type required: true schema: type: string enum: - email - phone - subdomain example: subdomain - in: query name: value required: true schema: type: string example: mycorp.sip.jambonz.cloud responses: '200': description: indicates whether value is already in use content: application/json: schema: type: object properties: available: type: boolean description: true if value requested is available required: - available '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Webhooks/{WebhookSid}: parameters: - name: WebhookSid in: path required: true style: simple explode: false schema: type: string get: tags: - Applications summary: retrieve webhook operationId: getWebhook responses: '200': description: webhook found content: application/json: schema: $ref: '#/components/schemas/Webhook' '404': description: webhook not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /VoipCarriers/{VoipCarrierSid}: parameters: - name: VoipCarrierSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Carriers summary: delete a voip carrier operationId: deleteVoipCarrier responses: '204': description: voip carrier successfully deleted '404': description: voip carrier not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: a service provider with active accounts can not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Carriers summary: retrieve voip carrier operationId: getVoipCarrier responses: '200': description: voip carrier found content: application/json: schema: $ref: '#/components/schemas/VoipCarrier' '404': description: voip carrier not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Carriers summary: update voip carrier operationId: updateVoipCarrier parameters: - name: VoipCarrierSid in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/VoipCarrier' responses: '204': description: voip carrier updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: voip carrier not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /SipGateways: post: tags: - Carriers summary: create sip gateway operationId: createSipGateway requestBody: content: application/json: schema: type: object properties: voip_carrier_sid: type: string description: voip carrier that provides this gateway format: uuid ipv4: type: string netmask: type: integer port: type: integer is_active: type: boolean inbound: type: boolean outbound: type: boolean required: - voip_carrier_sid - ipv4 responses: '201': description: sip gateway successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Carriers summary: list sip gateways operationId: listSipGateways parameters: - in: query name: voip_carrier_sid required: true schema: type: string description: return only the SipGateways operated for this VoipCarrier responses: '200': description: list of sip gateways content: application/json: schema: type: array items: $ref: '#/components/schemas/SipGateway' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /SipGateways/{SipGatewaySid}: parameters: - name: SipGatewaySid in: path required: true style: simple explode: false schema: type: string delete: tags: - Carriers summary: delete a sip gateway operationId: deleteSipGateway responses: '204': description: sip gateway successfully deleted '404': description: sip gateway not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Carriers summary: retrieve sip gateway operationId: getSipGateway responses: '200': description: sip gateway found content: application/json: schema: $ref: '#/components/schemas/SipGateway' '404': description: sip gateway not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Carriers summary: update sip gateway operationId: updateSipGateway requestBody: content: application/json: schema: $ref: '#/components/schemas/SipGateway' responses: '204': description: sip gateway updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: sip gateway not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /SmppGateways/{SmppGatewaySid}: parameters: - name: SmppGatewaySid in: path required: true style: simple explode: false schema: type: string /PhoneNumbers: post: tags: - Phone Numbers summary: provision a phone number into inventory from a Voip Carrier operationId: provisionPhoneNumber requestBody: content: application/json: schema: type: object properties: account_sid: type: string format: uuid application_sid: type: string format: uuid number: type: string description: telephone number voip_carrier_sid: type: string format: uuid required: - number - voip_carrier_sid responses: '201': description: phone number successfully provisioned content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: invalid telephone number format '404': description: voip carrier not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: the phone number provided already exists in inventory '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Phone Numbers summary: list phone numbers operationId: listProvisionedPhoneNumbers responses: '200': description: list of phone numbers content: application/json: schema: type: array items: $ref: '#/components/schemas/PhoneNumber' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /PhoneNumbers/{PhoneNumberSid}: parameters: - name: PhoneNumberSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Phone Numbers summary: delete a phone number operationId: deletePhoneNumber responses: '204': description: phone number successfully deleted '404': description: phone number not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: phone number that is assigned to an account may not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Phone Numbers summary: retrieve phone number operationId: getPhoneNumber responses: '200': description: phone number found content: application/json: schema: $ref: '#/components/schemas/PhoneNumber' '404': description: phone number not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Phone Numbers summary: update phone number operationId: updatePhoneNumber requestBody: content: application/json: schema: $ref: '#/components/schemas/PhoneNumber' responses: '204': description: phone number updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: phone number not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts: post: tags: - Accounts summary: create an account operationId: createAccount requestBody: content: application/json: schema: type: object properties: name: type: string description: account name example: foobar sip_realm: type: string description: sip realm for registration example: sip.mycompany.com registration_hook: $ref: '#/components/schemas/Webhook' description: authentication webhook for registration queue_event_hook: $ref: '#/components/schemas/Webhook' description: webhook called when members join or leave a queue service_provider_sid: type: string format: uuid example: 85f9c036-ba61-4f28-b2f5-617c23fa68ff required: - name - service_provider_sid responses: '201': description: account successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Accounts summary: list accounts operationId: listAccounts responses: '200': description: list of accounts content: application/json: schema: type: array items: $ref: '#/components/schemas/Account' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid delete: tags: - Accounts summary: delete an account operationId: deleteAccount responses: '204': description: account successfully deleted '404': description: account not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Accounts summary: retrieve account operationId: getAccount responses: '200': description: account found content: application/json: schema: $ref: '#/components/schemas/Account' '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Accounts summary: update account operationId: updateAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/Account' responses: '204': description: account updated '404': description: account not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/WebhookSecret: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: regenerate in: query required: false schema: type: boolean get: tags: - Accounts summary: get webhook signing secret, regenerating if requested operationId: getWebhookSecret responses: '200': description: secret content: application/json: schema: type: object properties: webhook_secret: type: string '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/SipRealms/{SipRealm}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: SipRealm in: path required: true schema: type: string post: tags: - Accounts summary: add or change the sip realm operationId: createSipRealm responses: '204': description: sip_realm updated and DNS entries successfully created '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/SpeechCredentials: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid post: tags: - Speech summary: add a speech credential operationId: createSpeechCredential requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeechCredential' responses: '201': description: speech credential successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Speech summary: retrieve all speech credentials for an account operationId: listSpeechCredentials responses: '200': description: retrieve speech credentials for a specified account content: application/json: schema: type: array items: $ref: '#/components/schemas/SpeechCredential' '404': description: account not found /Accounts/{AccountSid}/SpeechCredentials/{SpeechCredentialSid}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: SpeechCredentialSid in: path required: true schema: type: string format: uuid get: tags: - Speech summary: get a specific speech credential operationId: getSpeechCredentialByAccount responses: '200': description: retrieve speech credentials for a specified account content: application/json: schema: $ref: '#/components/schemas/SpeechCredential' '404': description: credential not found put: tags: - Speech summary: update a speech credential operationId: updateSpeechCredentialByAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeechCredentialUpdate' responses: '204': description: credential successfully deleted '404': description: credential not found '422': description: credential not found content: application/json: schema: $ref: '#/components/schemas/GeneralError' delete: tags: - Speech summary: delete a speech credential operationId: deleteSpeechCredentialByAccount responses: '204': description: credential successfully deleted '404': description: credential not found /Accounts/{AccountSid}/SpeechCredentials/speech/supportedLanguagesAndVoices: get: tags: - Speech summary: get supported languages, voices and models operationId: supportedLanguagesAndVoicesByAccount parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: vendor in: query required: true schema: type: string - name: label in: query schema: type: string responses: '200': description: get supported languages, voices and models content: application/json: schema: $ref: '#/components/schemas/SpeechLanguagesVoices' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/SpeechCredentials/{SpeechCredentialSid}/test: get: tags: - Speech summary: test a speech credential operationId: testSpeechCredentialByAccount parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: SpeechCredentialSid in: path required: true schema: type: string format: uuid responses: '200': description: credential test results content: application/json: schema: type: object properties: tts: type: object properties: status: type: string enum: - success - fail - not tested reason: type: string stt: type: object properties: status: type: string enum: - success - fail reason: type: string '404': description: credential not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/RecentCalls: get: tags: - Recent Calls summary: retrieve recent calls for an account operationId: listRecentCalls parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - in: query name: page required: true schema: type: integer description: page number of data to retrieve - in: query name: count required: true schema: type: integer description: number of rows to retrieve in each page set minimum: 1 maximum: 500 - in: query name: days required: false schema: type: integer description: number of days back to retrieve, minimum: 1 maximum: 30 - in: query name: start required: false schema: type: string format: date-time description: start date to retrieve - in: query name: end required: false schema: type: string format: date-time description: end date to retrieve - in: query name: answered required: false schema: type: string enum: - "true" - "false" description: retrieve only answered calls - in: query name: direction required: false schema: type: string enum: - inbound - outbound - in: query name: filter required: false schema: type: string description: Filter value can be caller ID, callee ID or call Sid responses: '200': description: retrieve recent call records for a specified account content: application/json: schema: type: object properties: total: type: integer description: total number of records in that database that match the filter criteria batch: type: integer description: total number of records returned in this page set page: type: integer description: page number that was requested, and is being returned data: type: array items: type: object properties: account_sid: type: string format: uuid call_sid: type: string format: uuid from: type: string to: type: string answered: type: boolean sip_call_id: type: string sip_status: type: integer duration: type: integer attempted_at: type: integer answered_at: type: integer terminated_at: type: integer termination_reason: type: string host: type: string remote_host: type: string direction: type: string enum: - inbound - outbound trunk: type: string required: - account_sid - call_sid - attempted_at - terminated_at - answered - direction - from - to - sip_status - duration '404': description: account not found /Accounts/{AccountSid}/RecentCalls/trace/{CallId}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: CallId in: path required: true schema: type: string get: tags: - Recent Calls summary: retrieve jaeger trace detail for a call operationId: getRecentCallTrace responses: '200': description: retrieve trace data content: application/json: schema: type: object '404': description: account or call not found /Accounts/{AccountSid}/RecentCalls/{CallSid}/record/{YYYY}/{MM}/{DD}/{FORMAT}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: CallSid in: path required: true schema: type: string format: uuid - name: YYYY in: path required: true schema: type: string - name: MM in: path required: true schema: type: string - name: DD in: path required: true schema: type: string - name: FORMAT in: path required: true schema: type: string enum: - wav - mp3 get: tags: - Recent Calls summary: retrieve recording for a call operationId: getRecentCallRecording responses: '200': description: call audio file content: application/octet-stream: schema: type: object '404': description: recording or call not found /Accounts/{AccountSid}/PredefinedCarriers/{PredefinedCarrierSid}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: PredefinedCarrierSid in: path required: true schema: type: string format: uuid /Accounts/{AccountSid}/Limits: post: tags: - Accounts summary: create a limit for an account description: This endpoint is only availble with an Admin or Service Provider API key operationId: addLimitForAccount parameters: - name: AccountSid in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/Limits' responses: '201': description: limit successfully created or updated content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Accounts summary: retrieve call capacity and other limits from the account operationId: getAccountLimits parameters: - name: AccountSid in: path required: true schema: type: string format: uuid responses: '200': description: account limits content: application/json: schema: type: array items: $ref: '#/components/schemas/Limits' '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/RecentCalls/{CallId}/pcap: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: CallId in: path required: true schema: type: string get: tags: - Recent Calls summary: retrieve pcap for a call operationId: getRecentCallTraceByAccount responses: '200': description: retrieve sip trace data content: application/octet-stream: schema: type: object '404': description: account or call not found /Accounts/{AccountSid}/Alerts: get: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: page in: query required: true schema: type: integer description: page number of data to retrieve - name: count in: query required: true schema: type: integer description: number of rows to retrieve in each page set minimum: 1 maximum: 500 - name: days in: query required: false schema: type: integer description: number of days back to retrieve, minimum: 1 maximum: 30 - name: start in: query required: false schema: type: string format: date-time description: start date to retrieve - name: end in: query required: false schema: type: string format: date-time description: end date to retrieve - name: alert_type in: query required: false schema: type: string enum: - webhook-failure - webhook-connection-failure - webhook-auth-failure - no-tts - no-stt - tts-failure - stt-failure - no-carrier - call-limit - device-limit - api-limit tags: - Alerts summary: retrieve alerts for an account operationId: listAlertsByAccount responses: '200': description: retrieve alerts for a specified account content: application/json: schema: type: object properties: total: type: integer description: total number of records in that database that match the filter criteria batch: type: integer description: total number of records returned in this page set page: type: integer description: page number that was requested, and is being returned data: type: array items: type: object properties: time: type: string format: date-time account_sid: type: string format: uuid alert_type: type: string message: type: string detail: type: string required: - time - account_sid - alert_type - message '404': description: account not found /Applications: post: tags: - Applications summary: create application operationId: createApplication requestBody: content: application/json: schema: type: object properties: name: type: string description: application name account_sid: type: string format: uuid call_hook: $ref: '#/components/schemas/Webhook' description: application webhook to handle inbound voice calls call_status_hook: $ref: '#/components/schemas/Webhook' description: webhook to report call status events messaging_hook: $ref: '#/components/schemas/Webhook' description: application webhook to handle inbound SMS/MMS messages app_json: type: string description: Voice Application Json, call_hook will not be invoked if app_json is provided speech_synthesis_vendor: type: string speech_synthesis_voice: type: string speech_recognizer_vendor: type: string speech_recognizer_language: type: string env_vars: type: object description: Object containing the Application Environment Variables as key/value to be sent with the call_hook payload required: - name - account_sid - call_hook - call_status_hook responses: '201': description: application successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Applications summary: list applications operationId: listApplications responses: '200': description: list of applications content: application/json: schema: type: array items: $ref: '#/components/schemas/Application' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Applications/{ApplicationSid}: parameters: - name: ApplicationSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Applications summary: delete an application operationId: deleteApplication responses: '204': description: application successfully deleted '404': description: application not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Applications summary: retrieve an application responses: '200': description: application found content: application/json: schema: $ref: '#/components/schemas/Application' '404': description: application not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Applications summary: update application operationId: updateApplication requestBody: content: application/json: schema: $ref: '#/components/schemas/Application' responses: '204': description: application updated '404': description: application not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Accounts/{AccountSid}/RegisteredSipUsers: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid get: tags: - Clients summary: retrieve online sip users for an account operationId: listRegisteredSipUsers responses: '200': description: retrieve online sip users for an account content: application/json: schema: type: array items: type: string post: tags: - Clients summary: retrieve online sip users for an account by list of sip username operationId: listRegisteredSipUsersByUsername requestBody: content: application/json: schema: type: array items: type: string responses: '200': description: retrieve online sip users for an account content: application/json: schema: type: array items: $ref: '#/components/schemas/RegisteredClient' /Accounts/{AccountSid}/RegisteredSipUsers/{Client}: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid - name: Client in: path required: true style: simple explode: false schema: type: string get: tags: - Clients summary: retrieve registered client registration operationId: getRegisteredClient responses: '200': description: registered client found content: application/json: schema: $ref: '#/components/schemas/RegisteredClient' /Accounts/{AccountSid}/TtsCache/Synthesize: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid post: tags: - Speech summary: get TTS from provider operationId: Synthesize requestBody: content: application/json: schema: type: object properties: speech_credential_sid: type: string description: Speech credential Sid example: 553b4b6b-8918-4394-a46d-1e3c5a3c717b text: type: string description: the text to convert to audio example: Hello How are you language: type: string description: language is used in text example: en-US voice: type: string description: voice ID example: en-US-Standard-C encodingMp3: type: boolean description: convert audio to mp3. example: true required: - speech_credential_sid - text - language - voice responses: '200': description: Audio is created content: audio/mpeg: schema: type: string format: binary '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ApiKeys: get: tags: - Accounts summary: get all api keys for an account operationId: getAccountApiKeys responses: '200': description: list of api keys content: application/json: schema: type: array items: $ref: '#/components/schemas/ApiKey' '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' post: tags: - Accounts summary: create an API key for an account operationId: createApiKey requestBody: content: application/json: schema: type: object required: - account_sid properties: account_sid: type: string format: uuid example: '9d26a637-1679-471f-8da8-7150266e1254' responses: '200': description: new API key content: application/json: schema: type: object properties: sid: type: string format: uuid token: type: string format: uuid '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Clients: get: summary: List Clients description: Returns a list of clients operationId: getClients tags: - Clients security: - bearerAuth: [] responses: '200': description: retrieve online sip users for an account content: application/json: schema: type: array items: type: object properties: account_sid: type: string format: uuid example: '9d26a637-1679-471f-8da8-7150266e1254' client_sid: type: string format: uuid example: 'f8d264b7-c26d-4829-be15-299e97b4ba8a' username: type: string example: "1234" password: type: string example: "sxxxxxxxxxx" description: in the response the password will only show the first character with subsequnet ones replaces by an x is_active: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_app_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_queue_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_user_calling: type: number example: 1 default: 1 enum: - 1 - 0 post: summary: Create a new client description: Creates a new sip client operationId: createClient tags: - Clients security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - account_sid - username - password properties: account_sid: type: string format: uuid example: '9d26a637-1679-471f-8da8-7150266e1254' username: type: string example: "1234" password: type: string example: "secure_password_123" is_active: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_app_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_queue_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_user_calling: type: number example: 1 default: 1 enum: - 1 - 0 responses: '201': description: Client created successfully content: application/json: schema: type: object properties: sid: type: string format: uuid example: sid: "a691e220-80cd-4949-829b-2033e135e30a" '400': description: Bad Request content: application/json: schema: type: object properties: msg: type: string format: text example: msg: "the client's username already exists" /Clients/{ClientSid}: parameters: - name: ClientSid in: path required: true style: simple explode: false schema: type: string get: summary: Get a client description: Get details of a single client operationId: getClient tags: - Clients security: - bearerAuth: [] responses: '200': description: details of a client content: application/json: schema: type: object properties: account_sid: type: string format: uuid example: '9d26a637-1679-471f-8da8-7150266e1254' client_sid: type: string format: uuid example: 'f8d264b7-c26d-4829-be15-299e97b4ba8a' username: type: string example: "1234" password: type: string example: "sxxxxxxxxxx" description: in the response the password will only show the first character with subsequnet ones replaces by an x is_active: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_app_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_queue_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_user_calling: type: number example: 1 default: 1 enum: - 1 - 0 put: summary: Update a client description: Changes properties on an existing client operationId: updateClient tags: - Clients security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - account_sid - username - password properties: is_active: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_app_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_queue_calling: type: number example: 1 default: 1 enum: - 1 - 0 allow_direct_user_calling: type: number example: 1 default: 1 enum: - 1 - 0 responses: '204': description: Client updated '404': description: ClientSid not found delete: summary: delete a client description: removes an existing client operationId: deleteClient tags: - Clients responses: '204': description: Client deleted '404': description: ClientSid not found /Lcrs: post: tags: - Call Routing summary: create a Least Cost Routing operationId: createLcr requestBody: content: application/json: schema: type: object properties: name: type: string description: name or Least Cost Routing example: twilioLcr required: - name responses: '201': description: Least Cost Routing successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: list least cost routings operationId: listLeastCostRoutings responses: '200': description: list of least cost routings content: application/json: schema: type: array items: $ref: '#/components/schemas/Lcr' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Lcrs/{LcrSid}: parameters: - name: LcrSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Call Routing summary: delete a least cost routing operationId: deleteLeastCostRouting responses: '204': description: least cost routing successfully deleted '404': description: least cost routing not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: a service provider with active accounts can not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: retrieve least cost routing operationId: getLeastCostRouting responses: '200': description: least cost routing found content: application/json: schema: $ref: '#/components/schemas/Lcr' '404': description: least cost routing not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Call Routing summary: update least cost routing operationId: updateLeastCostRouting requestBody: content: application/json: schema: $ref: '#/components/schemas/Lcr' responses: '204': description: least cost routing updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /Lcrs/{LcrSid}/Routes: parameters: - name: LcrSid in: path required: true style: simple explode: false schema: type: string post: tags: - Call Routing summary: Create least cost routing routes and carrier set entries operationId: createLeastCostRoutingRoutesAndCarrierEntries requestBody: content: application/json: schema: $ref: '#/components/schemas/LcrRoutes' responses: '204': description: least cost routing routes and carrier set entries created '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Call Routing summary: update least cost routing routes and carrier set entries operationId: updateLeastCostRoutingRoutesAndCarrierEntries requestBody: content: application/json: schema: $ref: '#/components/schemas/LcrRoutes' responses: '204': description: least cost routing ruoutes and carrier entries updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /LcrRoutes: post: tags: - Call Routing summary: create a Least Cost Routing Routes operationId: createLcrRoutes requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/LcrRoute' required: - lcr_sid - regex - priority responses: '201': description: Least Cost Routing Route successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: list least cost routings routes operationId: listLeastCostRoutingRoutes parameters: - in: query name: lcr_sid schema: type: string required: true responses: '200': description: list of least cost routing routes content: application/json: schema: type: array items: $ref: '#/components/schemas/LcrRoute' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /LcrRoutes/{LcrRouteSid}: parameters: - name: LcrRouteSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Call Routing summary: delete a least cost routing route operationId: deleteLeastCostRoutingRoute responses: '204': description: least cost routing route successfully deleted '404': description: least cost routing route not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: a service provider with active accounts can not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: retrieve least cost routing route operationId: getLeastCostRoutingRoute responses: '200': description: least cost routing route found content: application/json: schema: $ref: '#/components/schemas/LcrRoute' '404': description: least cost routing route not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Call Routing summary: update least cost routing route operationId: updateLeastCostRoutingRoute requestBody: content: application/json: schema: $ref: '#/components/schemas/LcrRoute' responses: '204': description: least cost routing route updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing route not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /LcrCarrierSetEntries: post: tags: - Call Routing summary: create a Least Cost Routing Carrier Set Entry operationId: createLcrCarrierSetEntry requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/LcrCarrierSetEntry' required: - lcr_route_sid - voip_carrier_sid - priority responses: '201': description: Least Cost Routing Carrier Set Entry successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: list least cost routings routes operationId: listLeastCostRoutingCarrierSetEntries responses: '200': description: list of least cost routing carrier set entries content: application/json: schema: type: array items: $ref: '#/components/schemas/LcrCarrierSetEntry' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /LcrCarrierSetEntries/{LcrCarrierSetEntrySid}: parameters: - name: LcrCarrierSetEntrySid in: path required: true style: simple explode: false schema: type: string delete: tags: - Call Routing summary: delete a least cost routing carrier set entry operationId: deleteLeastCostRoutingCarrierSetEntry responses: '204': description: least cost routing carrier set entry successfully deleted '404': description: least cost routing carrier set entry not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: a service provider with active accounts can not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Call Routing summary: retrieve least cost routing carrier set entry operationId: getLeastCostRoutingCarrierSetEntry responses: '200': description: least cost routing carrier set entry found content: application/json: schema: $ref: '#/components/schemas/LcrCarrierSetEntry' '404': description: least cost routing carrier set entry not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Call Routing summary: update least cost routing carrier set entry operationId: updateLeastCostRoutingCarrierSetEntry requestBody: content: application/json: schema: $ref: '#/components/schemas/LcrCarrierSetEntry' responses: '204': description: least cost routing carrier set entry updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing carrier set entry not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /GoogleCustomVoices: post: tags: - Speech summary: create a Google custom voice operationId: createGoogleCustomVoice requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/GoogleCustomVoice' required: - speech_credential_sid - name - reported_usage - model responses: '201': description: Least Cost Routing Carrier Set Entry successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Speech parameters: - in: query name: service_provider_sid required: false schema: type: string description: return only the google voice custom operated belong to this service provider - in: query name: account_sid required: false schema: type: string description: return only the google voice custom operated belong to this account_sid - in: query name: speech_credential_sid required: false schema: type: string description: return only the google voice custom operated belong to this speech credential summary: list google custom voices operationId: listGoogleCustomVoices responses: '200': description: list oflist google custom voices content: application/json: schema: type: array items: $ref: '#/components/schemas/GoogleCustomVoice' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /GoogleCustomVoices/{GoogleCustomVoiceSid}: parameters: - name: GoogleCustomVoiceSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Speech summary: delete a google custom voice operationId: deleteGoogleCustomVoice responses: '204': description: google custom voice successfully deleted '404': description: google custom voice not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' example: msg: a service provider with active accounts can not be deleted '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Speech summary: retrieve google custom voice operationId: getGoogleCustomVoice responses: '200': description: google custom voice found content: application/json: schema: $ref: '#/components/schemas/GoogleCustomVoice' '404': description: google custom voice not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Speech summary: update google custom voice operationId: updateGoogleCustomVoice requestBody: content: application/json: schema: $ref: '#/components/schemas/GoogleCustomVoice' responses: '204': description: google custom voice updated '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '404': description: least cost routing carrier set entry not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders: post: tags: - Service Providers summary: create service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: createServiceProvider requestBody: content: application/json: schema: type: object properties: name: type: string description: service provider name example: fastcomms description: type: string root_domain: type: string description: root domain for group of accounts that share a registration hook example: example.com registration_hook: $ref: '#/components/schemas/Webhook' description: authentication webhook for registration ms_teams_fqdn: type: string description: SBC domain name for Microsoft Teams example: contoso.com required: - name responses: '201': description: service provider successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Service Providers summary: list service providers description: This endpoint is only availble with an Admin or Service Provider API key operationId: listServiceProviders responses: '200': description: list of service providers content: application/json: schema: type: array items: $ref: '#/components/schemas/ServiceProvider' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}: parameters: - name: ServiceProviderSid in: path required: true style: simple explode: false schema: type: string delete: tags: - Service Providers summary: delete a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: deleteServiceProvider responses: '204': description: service provider successfully deleted '404': description: service provider not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Service Providers summary: retrieve service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: getServiceProvider responses: '200': description: service provider found content: application/json: schema: $ref: '#/components/schemas/ServiceProvider' '404': description: service provider not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Service Providers summary: update service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: updateServiceProvider requestBody: content: application/json: schema: $ref: '#/components/schemas/ServiceProvider' responses: '204': description: service provider updated '404': description: service provider not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/Accounts: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid get: tags: - Service Providers summary: get all accounts for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: getServiceProviderAccounts responses: '200': description: account listing content: application/json: schema: type: array items: $ref: '#/components/schemas/Account' '403': description: unauthorized '404': description: service provider not found /ServiceProviders/{ServiceProviderSid}/VoipCarriers: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid get: tags: - Carriers summary: get all carriers availlble to the account operationId: getServiceProviderCarriers responses: '200': description: account listing content: application/json: schema: type: array items: $ref: '#/components/schemas/VoipCarrier' '403': description: unauthorized '404': description: service provider not found post: tags: - Carriers summary: create a carrier as a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: createCarrierForServiceProvider requestBody: content: application/json: schema: $ref: '#/components/schemas/VoipCarrier' responses: '201': description: service provider successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: service provider not found /Accounts/{AccountSid}/VoipCarriers: parameters: - name: AccountSid in: path required: true schema: type: string format: uuid get: tags: - Carriers summary: get all carriers for an account operationId: getAccountCarriers responses: '200': description: carrier listing content: application/json: schema: type: array items: allOf: - $ref: '#/components/schemas/VoipCarrier' - type: object properties: voip_carrier_sid: type: string format: uuid '403': description: unauthorized '404': description: service provider not found post: tags: - Carriers summary: create a carrier for an account operationId: createCarrierForAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/VoipCarrier' responses: '201': description: service provider successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: service provider not found /ServiceProviders/{ServiceProviderSid}/PredefinedCarriers/{PredefinedCarrierSid}: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: PredefinedCarrierSid in: path required: true schema: type: string format: uuid post: tags: - Carriers summary: add a carrier to a service provider using a template description: This endpoint is only availble with an Admin or Service Provider API key operationId: createVoipCarrierFromTemplateBySP responses: '201': description: voip carrier successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/SpeechCredentials: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid post: tags: - Speech summary: create a speech credential for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: addSpeechCredentialForSeerviceProvider requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeechCredential' responses: '201': description: speech credential successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: credential not found /ServiceProviders/{ServiceProviderSid}/SpeechCredentials/{SpeechCredentialSid}: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: SpeechCredentialSid in: path required: true schema: type: string format: uuid get: tags: - Speech summary: get a specific speech credential description: This endpoint is only availble with an Admin or Service Provider API key operationId: getSpeechCredential responses: '200': description: retrieve speech credentials for a specified account content: application/json: schema: $ref: '#/components/schemas/SpeechCredential' '404': description: credential not found put: tags: - Speech summary: update a speech credential description: This endpoint is only availble with an Admin or Service Provider API key operationId: updateSpeechCredential requestBody: content: application/json: schema: $ref: '#/components/schemas/SpeechCredentialUpdate' responses: '204': description: credential successfully updated '404': description: credential not found '422': description: credential not found content: application/json: schema: $ref: '#/components/schemas/GeneralError' delete: tags: - Speech summary: delete a speech credential description: This endpoint is only availble with an Admin or Service Provider API key operationId: deleteSpeechCredential responses: '204': description: credential successfully deleted '404': description: credential not found /ServiceProviders/{ServiceProviderSid}/SpeechCredentials/speech/supportedLanguagesAndVoices: get: tags: - Speech summary: get supported languages, voices and models description: This endpoint is only availble with an Admin or Service Provider API key operationId: supportedLanguagesAndVoices parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: vendor in: query required: true schema: type: string - name: label in: query schema: type: string responses: '200': description: get supported languages, voices and models content: application/json: schema: $ref: '#/components/schemas/SpeechLanguagesVoices' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/SpeechCredentials/{SpeechCredentialSid}/test: get: tags: - Speech summary: test a speech credential description: This endpoint is only availble with an Admin or Service Provider API key operationId: testSpeechCredential parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: SpeechCredentialSid in: path required: true schema: type: string format: uuid responses: '200': description: credential test results content: application/json: schema: type: object properties: tts: type: object properties: status: type: string enum: - success - fail - not tested reason: type: string stt: type: object properties: status: type: string enum: - success - fail reason: type: string '404': description: credential not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/Limits: post: tags: - Service Providers summary: create a limit for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: addLimitForServiceProvider parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid requestBody: content: application/json: schema: $ref: '#/components/schemas/Limits' responses: '201': description: limit successfully created or updated content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: service provider not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Service Providers summary: retrieve call capacity and other limits from the service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: getServiceProviderLimits parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid responses: '200': description: service provider limits content: application/json: schema: type: array items: $ref: '#/components/schemas/Limits' '404': description: service provider not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/RecentCalls/{CallId}/pcap: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: CallId in: path required: true schema: type: string get: tags: - Recent Calls summary: retrieve pcap for a call description: This endpoint is only availble with an Admin or Service Provider API key operationId: getRecentCallTraceBySP responses: '200': description: retrieve sip trace data content: application/octet-stream: schema: type: object '404': description: account or call not found /ServiceProviders/{ServiceProviderSid}/RecentCalls: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - in: query name: page required: true schema: type: integer description: page number of data to retrieve - in: query name: count required: true schema: type: integer description: number of rows to retrieve in each page set - in: query name: days required: false schema: type: integer description: number of days back to retrieve, must be ge 1 and le 30 - in: query name: start required: false schema: type: string format: date-time description: start date to retrieve - in: query name: end required: false schema: type: string format: date-time description: end date to retrieve - in: query name: answered required: false schema: type: string enum: - "true" - "false" description: retrieve only answered calls - in: query name: direction required: false schema: type: string enum: - inbound - outbound - in: query name: from required: false schema: type: string description: calling number to retrieve - in: query name: to required: false schema: type: string description: called number to retrieve get: tags: - Recent Calls summary: retrieve recent calls for an account description: This endpoint is only availble with an Admin or Service Provider API key operationId: listRecentCallsBySP responses: '200': description: retrieve recent call records for a specified account content: application/json: schema: type: object properties: total: type: integer description: total number of records in that database that match the filter criteria batch: type: integer description: total number of records returned in this page set page: type: integer description: page number that was requested, and is being returned data: type: array items: type: object properties: service_provider_sid: type: string format: uuid account_sid: type: string format: uuid call_sid: type: string format: uuid from: type: string to: type: string answered: type: boolean sip_call_id: type: string sip_status: type: integer duration: type: integer attempted_at: type: integer answered_at: type: integer terminated_at: type: integer termination_reason: type: string host: type: string remote_host: type: string direction: type: string enum: - inbound - outbound trunk: type: string required: - account_sid - call_sid - attempted_at - terminated_at - answered - direction - from - to - sip_status - duration '404': description: account not found /ServiceProviders/{ServiceProviderSid}/RecentCalls/trace/{CallId}: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - name: CallId in: path required: true schema: type: string get: tags: - Recent Calls summary: retrieve jaeger trace detail for a call description: This endpoint is only availble with an Admin or Service Provider API key operationId: getRecentCallTraceByCallId responses: '200': description: retrieve trace data content: application/json: schema: type: object '404': description: service provider or call not found /ServiceProviders/{ServiceProviderSid}/Lcrs: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid get: tags: - Call Routing summary: get all Least Cost Routings for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: getServiceProviderLcrs responses: '200': description: Least cost routing listing content: application/json: schema: type: array items: $ref: '#/components/schemas/Lcr' '403': description: unauthorized '404': description: service provider not found post: tags: - Call Routing summary: create a Lest cost routing for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: createLcrForServiceProvider requestBody: content: application/json: schema: type: object properties: name: type: string description: name or Least Cost Routing example: twilioLcr required: - name responses: '201': description: service provider Lcr successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '404': description: service provider not found /MicrosoftTeamsTenants: post: tags: - Settings summary: provision a customer tenant for MS Teams operationId: createMsTeamsTenant requestBody: content: application/json: schema: type: object properties: service_provider_sid: type: string format: uuid example: 85f9c036-ba61-4f28-b2f5-617c23fa68ff account_sid: type: string format: uuid example: 85f9c036-ba61-4f28-b2f5-617c23fa68ff application_sid: type: string format: uuid example: 85f9c036-ba61-4f28-b2f5-617c23fa68ff tenant_fqdn: type: string example: customer.contoso.com required: - service_provider_sid - account - tenant_fqdn responses: '201': description: tenant successfully created content: application/json: schema: $ref: '#/components/schemas/SuccessfulAdd' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Settings summary: list MS Teams tenants operationId: listMsTeamsTenants responses: '200': description: list of tenants content: application/json: schema: type: array items: $ref: '#/components/schemas/MsTeamsTenant' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /MicrosoftTeamsTenants/{TenantSid}: parameters: - name: TenantSid in: path required: true schema: type: string format: uuid delete: tags: - Settings summary: delete an MS Teams tenant operationId: deleteTenant responses: '204': description: tenant successfully deleted '404': description: tenant not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' get: tags: - Settings summary: retrieve an MS Teams tenant operationId: getTenant responses: '200': description: tenant found content: application/json: schema: $ref: '#/components/schemas/MsTeamsTenant' '404': description: account not found '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' put: tags: - Settings summary: update an MS Teams tenant operationId: putTenant requestBody: content: application/json: schema: $ref: '#/components/schemas/MsTeamsTenant' responses: '204': description: tenant updated '404': description: tenant not found '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/GeneralError' '500': description: system error content: application/json: schema: $ref: '#/components/schemas/GeneralError' /ServiceProviders/{ServiceProviderSid}/Alerts: parameters: - name: ServiceProviderSid in: path required: true schema: type: string format: uuid - in: query name: page required: true schema: type: integer description: page number of data to retrieve - in: query name: count required: true schema: type: integer description: number of rows to retrieve in each page set - in: query name: days required: false schema: type: integer description: number of days back to retrieve, must be ge 1 and le 30 - in: query name: start required: false schema: type: string format: date-time description: start date to retrieve - in: query name: end required: false schema: type: string format: date-time description: end date to retrieve - in: query name: alert_type required: false schema: type: string enum: - webhook-failure - webhook-connection-failure - webhook-auth-failure - no-tts - no-stt - tts-failure - stt-failure - no-carrier - call-limit - device-limit - api-limit get: tags: - Recent Calls summary: retrieve alerts for a service provider description: This endpoint is only availble with an Admin or Service Provider API key operationId: listAlerts responses: '200': description: retrieve alerts for a specified account content: application/json: schema: type: object properties: total: type: integer description: total number of records in that database that match the filter criteria batch: type: integer description: total number of records returned in this page set page: type: integer description: page number that was requested, and is being returned data: type: array items: type: object properties: time: type: string format: date-time service_provider_sid: type: string format: uuid account_sid: type: string format: uuid alert_type: type: string message: type: string detail: type: string required: - time - account_sid - alert_type - message '404': description: service provider not found /AppEnv: get: summary: Get App Env Schema operationId: getAppEnvSchema tags: - Applications parameters: - name: url in: query required: true schema: type: string responses: '200': description: App Env Schema content: application/json: schema: type: object '204': description: No App Env Schema was found at the url '400': description: The App Env Schma that was returned was invalid components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: token schemas: SuccessfulLogin: type: object required: - username - password properties: token: type: string user_sid: type: string scope: type: string force_change: type: boolean Login: type: object properties: username: type: string password: type: string required: - username - password SuccessfulApiKeyAdd: type: object required: - sid - token properties: sid: type: string token: type: string example: sid: 9d26a637-1679-471f-8da8-7150266e1254 token: 589cead6-de24-4689-8ac3-08ffaf102811 SuccessfulAdd: type: object required: - sid properties: sid: type: string example: sid: 9d26a637-1679-471f-8da8-7150266e1254 GeneralError: type: object required: - msg properties: msg: type: string example: msg: specific error detail will be provided here ServiceProvider: type: object properties: service_provider_sid: type: string format: uuid name: type: string description: type: string root_domain: type: string registration_hook: $ref: '#/components/schemas/Webhook' description: authentication webhook for registration ms_teams_fqdn: type: string test_number: type: string description: used for inbound testing for accounts on free plan test_application_name: type: string description: name of test application that can be used for new signups test_application_sid: type: string description: identifies test application that can be used for new signups required: - service_provider_sid - name VoipCarrier: type: object properties: service_provider_sid: type: string format: uuid example: 6072f617-6151-4c15-8eb9-74a4967ab701 name: type: string example: my carrier description: type: string account_sid: type: string format: uuid application_sid: type: string format: uuid e164_leading_plus: type: boolean requires_register: type: boolean register_username: type: string register_sip_realm: type: string register_password: type: string tech_prefix: type: string diversion: type: string is_active: type: boolean smpp_system_id: type: string smpp_password: type: string smpp_inbound_system_id: type: string smpp_inbound_password: type: string smpp_enquire_link_interval: type: integer trunk_type: type: string enum: - static_ip - auth - reg default: static_ip description: The type of trunk to create, see the [guide](/guides/using-the-jambonz-portal/basic-concepts/creating-carriers) for details inbound_auth_username: type: string maxLength: 64 description: username for an auth trunk inbound_auth_password: type: string maxLength: 64 description: password for an auth trunk required: - service_provider_sid - name SipGateway: type: object properties: sip_gateway_sid: type: string format: uuid ipv4: type: string port: type: integer netmask: type: integer voip_carrier_sid: type: string format: uuid inbound: type: boolean outbound: type: boolean required: - sip_gateway_sid - voip_carrier_sid - ipv4 - port - netmask SmppGateway: type: object properties: smpp_gateway_sid: type: string format: uuid ipv4: type: string port: type: integer netmask: type: integer voip_carrier_sid: type: string format: uuid is_primary: type: boolean use_tls: type: boolean inbound: type: boolean outbound: type: boolean required: - smpp_gateway_sid - voip_carrier_sid - ipv4 - port - netmask Account: type: object properties: account_sid: type: string format: uuid name: type: string sip_realm: type: string registration_hook: $ref: '#/components/schemas/Webhook' description: authentication webhook for registration device_calling_application_sid: type: string format: uuid service_provider_sid: type: string format: uuid record_all_calls: type: boolean record_format: type: string enum: - wav - mp3 bucket_credential: type: object description: Credentials for recording storage properties: vendor: type: string enum: - aws_s3 - s3_compatible - azure - google region: type: string name: type: string description: name of the bucket access_key_id: type: string secret_access_key: type: string required: - account_sid - name - service_provider_sid Application: type: object properties: application_sid: type: string format: uuid readOnly: true name: type: string account_sid: type: string format: uuid call_hook: $ref: '#/components/schemas/Webhook' description: application webhook for inbound voice calls call_status_hook: $ref: '#/components/schemas/Webhook' description: webhhok for reporting call status events messaging_hook: $ref: '#/components/schemas/Webhook' description: application webhook for inbound SMS/MMS speech_synthesis_vendor: type: string speech_synthesis_voice: type: string speech_recognizer_vendor: type: string speech_recognizer_language: type: string env_vars: type: object description: Object containing the Application Environment Variables as key/value to be sent with the call_hook payload record_all_calls: type: boolean required: - name - account_sid ApiKey: type: object properties: api_key_sid: type: string format: uuid token: type: string format: uuid account_sid: type: string format: uuid service_provider_sid: type: string format: uuid expires_at: type: string format: date-time created_at: type: string format: date-time last_used: type: string format: date-time required: - api_key_sid - token PhoneNumber: type: object properties: phone_number_sid: type: string format: uuid number: type: string voip_carrier_sid: type: string format: uuid account_sid: type: string format: uuid application_sid: type: string format: uuid required: - phone_number_sid - number - voip_carrier_sid Registration: type: object properties: registration_sid: type: string format: uuid username: type: string domain: type: string sip_contact: type: string sip_user_agent: type: string required: - registration_sid - username - domain - sip_contact Webhook: type: object properties: webhook_sid: type: string format: uuid url: type: string format: url method: type: string enum: - get - post username: type: string password: type: string required: - url example: url: https://acme.com method: POST MsTeamsTenant: type: object properties: service_provider_sid: type: string format: uuid account_sid: type: string format: uuid application_sid: type: string format: uuid tenant_fqdn: type: string required: - service_provider_sid - tenant_fqdn Call: type: object properties: account_sid: type: string format: uuid application_sid: type: string format: uuid call_id: type: string call_sid: type: string format: uuid call_status: type: string enum: - trying - ringing - alerting - in-progress - completed - busy - no-answer - failed - queued caller_name: type: string direction: type: string enum: - inbound - outbound duration: type: integer from: type: string originating_sip_trunk_name: type: string parent_call_sid: type: string format: uuid service_url: type: string sip_status: type: integer to: type: string required: - account_sid - call_id - call_sid - call_status - direction - from - service_url - sip_status - to Target: properties: type: type: string enum: - phone - sip - user - teams number: type: string sipUri: type: string tenant: type: string description: Microsoft Teams customer tenant domain name trunk: type: string vmail: type: boolean description: Dial directly into user's voicemail to leave a message overrideTo: type: string name: type: string auth: type: object properties: username: type: string password: type: string required: - type example: type: phone number: '+16172375080' Message: properties: provider: type: string from: type: string to: type: string text: type: string media: type: string required: - from - to example: from: '13394445678' to: '16173333456' text: please call when you can SpeechCredential: properties: speech_credential_sid: type: string format: uuid account_sid: type: string format: uuid vendor: type: string enum: - google - aws service_key: type: string access_key_id: type: string secret_access_key: type: string aws_region: type: string last_used: type: string format: date-time last_tested: type: string format: date-time use_for_tts: type: boolean use_for_stt: type: boolean tts_tested_ok: type: boolean stt_tested_ok: type: boolean riva_server_uri: type: string SpeechCredentialUpdate: properties: use_for_tts: type: boolean use_for_stt: type: boolean UserAndAccountDetail: type: object properties: user: type: object properties: user_sid: type: string name: type: string email: type: string phone: type: string service_provider_sid: type: string force_change: type: boolean provider: type: string provider_userid: type: string scope: type: string email_validated: type: boolean phone_validated: type: string account: type: object properties: account_sid: type: string sip_realm: type: string service_provider_sid: type: string registration_hook_sid: type: string queue_event_hook_sid: type: string device_calling_application_sid: type: string is_active: type: boolean created_at: type: string format: date-time testapp: type: object properties: application_sid: type: string name: type: string service_provider_sid: type: string account_sid: type: string call_hook_sid: type: string call_status_hook_sid: type: string messaging_hook_sid: type: string speech_synthesis_vendor: type: string speech_synthesis_language: type: string speech_synthesis_voice: type: string speech_recognizer_vendor: type: string speech_recognizer_language: type: string balance: type: object properties: currency: type: string enum: - USD - EUR balance: type: integer last_updated_at: type: string format: date-time created_at: type: string format: date-time last_transaction_id: type: string capacities: type: object properties: effective_start_date: type: string format: date-time effective_end_date: type: string format: date-time limit_sessions: type: integer limit_registrations: type: integer api_keys: type: array items: type: object properties: token: type: string last_used: type: string format: date-time created_at: type: string format: date-time products: type: array items: type: object properties: name: type: string description: type: string category: type: string quantity: type: string in_starter_set: type: boolean product_sid: type: string effective_start_date: type: string format: date-time effective_end_date: type: string format: date-time UserProfile: type: object properties: user_sid: type: string example: a5bce31e-a028-45cd-94c4-f121b72fec61 account_sid: type: string example: a5bce31e-a028-45cd-94c4-f121b72fec61 is_active: type: boolean description: indicates whether account is active example: true name: type: string description: full user name example: Dave Horton email: type: string description: email associated with user example: daveh@drachtio.org phone: type: string description: phone associated with user provider: type: string description: authentication provider enum: - github - google - local example: github scope: type: string description: scope of user permissions enum: - read-only - read-write example: read-write pristine: type: boolean description: true if account was newly created example: true email_validated: type: boolean description: indicates whether user has validated their email address example: true phone_validated: type: boolean description: indicates whether user has validated their mobile phone example: true tutorial_completion: type: integer description: bitmask indicating which tutorials have been completed example: 1 jwt: type: string description: json web token to be used as bearer token in API requests required: - user_sid - provider - name - email - scope - account_validated - pristine - jwt - is_active Charge: type: object properties: charge_sid: type: string format: uuid account_sid: type: string format: uuid application_sid: type: string format: uuid billed_at: type: string format: date-time billed_activity: type: string enum: - inbound-call - outbound-call - inbound-sms - outbound-sms - inbound-mms - outbound-mms - tts - stt call_billing_record_sid: type: string format: uuid message_record_sid: type: string format: uuid call_secs_billed: type: integer tts_chars_billed: type: integer stt_secs_billed: type: integer amount_charged: type: integer format: double required: - account_sid - billed_activity - amount_charged RecentCalls: type: object properties: account_sid: type: string format: uuid call_sid: type: string format: uuid from: type: string to: type: string answered: type: boolean sip_call_id: type: string sip_status: type: integer duration: type: integer attempted_at: type: integer answered_at: type: integer terminated_at: type: integer termination_reason: type: string host: type: string remote_host: type: string direction: type: string enum: - inbound - outbound trunk: type: string required: - account_sid - call_sid - attempted_at - terminated_at - answered - direction - from - to - sip_status - duration Alert: type: object properties: alert_sid: type: string format: uuid call_sid: type: string format: uuid account_sid: type: string format: uuid application_sid: type: string format: uuid occurred_at: type: string format: date-time alert_type: type: string enum: - webhook-failed - bad-application-syntax - speech-operation-failed - limit-exceeded details: type: string required: - alert_sid - account_sid - occurred_at - alert_type Product: type: object properties: product_sid: type: string name: type: string description: type: string unit_label: type: string category: type: string required: - product_sid - name - unit_label - category PredefinedCarrier: type: object properties: predefined_carrier_sid: type: string format: uuid name: type: string requires_static_ip: type: boolean e164_leading_plus: type: boolean requires_register: type: boolean register_username: type: string register_sip_realm: type: string register_password: type: string register_from_user: type: string register_from_domain: type: string register_public_ip_in_contact: type: boolean tech_prefix: type: string inbound_auth_username: type: string inbound_auth_password: type: string diversion: type: string required: - predefined_carrier_sid - name - requires_static_ip - e164_leading_plus - requires_register Limits: type: object properties: category: type: string enum: - voice_call_session - api_limit - devices Lcr: type: object properties: name: type: string example: twilioLcr default_carrier_set_entry_sid: type: string example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 required: - name LcrRoute: type: object properties: lcr_sid: type: string example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 regex: type: string description: out going call Phone number regex example: 1* priority: type: integer example: 1 description: type: string example: this is example description required: - lcr_sid - regex - priority LcrCarrierSetEntry: type: object properties: workload: type: integer example: 90 description: traffic distribution value lcr_route_sid: type: string example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 voip_carrier_sid: type: string example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 priority: type: integer example: 1 required: - lcr_route_sid - voip_carrier_sid - priority LcrRouteAndCarrierEntries: allOf: - $ref: '#/components/schemas/LcrRoute' - type: object properties: lcr_carrier_set_entries: type: array items: $ref: '#/components/schemas/LcrCarrierSetEntry' LcrRoutes: type: array items: $ref: '#/components/schemas/LcrRouteAndCarrierEntries' GoogleCustomVoice: type: object properties: speech_credential_sid: type: string example: 3fa85f64-5717-4562-b3fc-2c963f66afa6 name: type: string example: Sally reported_usage: type: string example: REALTIME model: type: string example: projects/12412312/locations/global/models/2134124123-2dbf-43be-9593-12314123 required: - speech_credential_sid - name - reported_usage - model RegisteredClient: type: object properties: name: type: string example: xhoaluu description: the client username contact: type: string example: sip:0dluqjt6@od41sl9jfc9m.invalid;transport=ws description: The value in the contact header of the registration expiryTime: type: integer example: 1698981449173 description: The timestamp (in ms since 00:00:00.000 01/01/1970) that the current registraion will expire protocol: type: string enum: - wss - udp - tcp - tls allow_direct_app_calling: type: integer example: 1 description: set to 1 if client is allowed to call app sids directly allow_direct_queue_calling: type: integer example: 1 description: set to 1 if client is allowed to dial into queues to dequeue calls allow_direct_user_calling: type: integer example: 1 description: set to 1 if client is allowed to call other users by name directly. registered_status: type: string enum: - active - inactive description: if there is a current registered session from the client proxy: type: string example: sip:192.0.0.1:12345 description: The source IP and Port used for the registration request. TtsModel: type: object properties: name: type: string example: Turbo v2 value: type: string example: eleven_turbo_v2 LanguageVoice: type: object properties: name: type: string example: Standard-A (Female) value: type: string example: ar-XA-Standard-A LanguageVoices: type: object properties: name: type: string example: English (US) value: type: string example: en-US voices: type: array items: $ref: '#/components/schemas/LanguageVoice' SpeechLanguagesVoices: type: object properties: tts: type: array items: $ref: '#/components/schemas/LanguageVoices' stt: type: array items: $ref: '#/components/schemas/LanguageVoice' ttsModel: type: array items: $ref: '#/components/schemas/TtsModel' UserList: type: object properties: name: type: string email: type: string is_active: type: boolean force_change: type: boolean scope: type: string permissions: type: array items: type: string