File: //home/arjun/projects/buyercall_forms/buyercall/buyercall/static/swagger/doc/swagger.json
{
"info": {
"version": "2.0",
"description": "Available API calls",
"title": "BuyerCall API"
},
"paths": {
"/accounts/": {
"post": {
"responses": {
"200": {
"description": "Partnership account successfully added."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Account"
}
}
],
"tags": [
"Accounts"
],
"description": "The Accounts POST endpoint should be used to create new partner accounts.\nFor example, if you manage multiple dealers, you would want to create a separate account for each dealer you manage.\nYou will only require a partner authentication token to create a new partner account.\nThe Accounts POST endpoint is the first endpoint you will utilize in the BuyerCall API.\nMost other endpoint requests in the BuyerCall Partner API requires an partner account id.\nThis endpoint POST request will return a partner account id.",
"summary": "Adds a partnership account",
"operationId": "post_account"
}
},
"/accounts/{paid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Partnership account not found."
},
"204": {
"description": "Partnership account successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Account"
}
}
],
"tags": [
"Accounts"
],
"description": "This API endpoint can be used to to update an account associated with a partnership.",
"summary": "Update a partnership account",
"operationId": "put_account_details"
},
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
],
"get": {
"operationId": "get_account_details",
"summary": "Retrieves partnership account details",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Partnership account not found."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Accounts"
],
"description": "This API endpoint can be used to to retrieve usage data for an account associated with a partnership."
}
},
"/accounts/{paid}/agents": {
"post": {
"responses": {
"200": {
"description": "Agent successfully added."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Agent"
}
}
],
"tags": [
"Agents"
],
"description": "This API endpoint can be used to create new agents for an account associated with a partnership.\n\nNB: If \"ALL HOURS\" is true, agents will be set to active 24/7.\n\nOtherwise, agents will be added by default as active between 8AM and 5PM during week days.",
"summary": "Adds a partnership account agent",
"operationId": "post_api_agent_collection"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_api_agent_collection",
"summary": "Retrieves agents of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Agents"
],
"description": "This API endpoint can be used to retrieve all agents for an account associated with a partnership."
}
},
"/accounts/{paid}/agents/{aid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Agent not found."
},
"204": {
"description": "Agent successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Agent"
}
}
],
"tags": [
"Agents"
],
"description": "This API endpoint can be used to update an agent for an account associated with a partnership.",
"summary": "Update an agent",
"operationId": "put_api_agent"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The agent ID.",
"in": "path",
"name": "aid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"delete": {
"operationId": "delete_api_agent",
"summary": "Deactivate a partnership account agent",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Agent not found."
},
"204": {
"description": "Agent successfully deactivated."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Agents"
],
"description": "This API endpoint can be used to delete an agent for an account associated with a partnership."
}
},
"/accounts/{paid}/agents/{aid}/schedule": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"401": {
"description": "Unauthorized request."
},
"404": {
"description": "Agent not found."
},
"204": {
"description": "Agent schedule successfully updated."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Schedule"
}
}
],
"tags": [
"Agents"
],
"description": "This API endpoint can be used to retrieve an agents schedule for an account associated with a partnership.",
"summary": "Update schedule of an agent",
"operationId": "put_api_agent_schedule"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The agent ID.",
"in": "path",
"name": "aid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_api_agent_schedule",
"summary": "Retrieves agent schedule of an agent",
"responses": {
"200": {
"description": "OK"
},
"401": {
"description": "Unauthorized request."
},
"404": {
"description": "Agent not found."
}
},
"tags": [
"Agents"
],
"description": "This API endpoint can be used to retrieve an agents schedule for an account associated with a partnership."
}
},
"/accounts/{paid}/audiourls": {
"post": {
"responses": {
"200": {
"description": "Audio URL successfully created."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_audio_url"
}
}
],
"tags": [
"Audio URLs"
],
"description": "This API endpoint can be used to create an audio urls for a phone number of an account agent associated with a partnership.",
"summary": "Add an phone number audio URL",
"operationId": "post_audio_urls"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_audio_urls",
"summary": "Retrieves all phone number audio URLs",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Audio URLs"
],
"description": "This API endpoint can be used to retrieve all audio urls for a specific partnership account."
}
},
"/accounts/{paid}/audiourls/{auid}": {
"put": {
"responses": {
"200": {
"description": "Audio URL successfully updated."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_audio_url"
}
}
],
"tags": [
"Audio URLs"
],
"description": "This API endpoint can be used to update a audio url entry for a partnership account.",
"summary": "Update a phone number audio URL",
"operationId": "put_audio_urls_edit"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The phone number audio URL ID.",
"in": "path",
"name": "auid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"delete": {
"operationId": "delete_audio_urls_edit",
"summary": "Deletes a phone number audio URL",
"responses": {
"200": {
"description": "Audio URL successfully deleted."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Audio URLs"
],
"description": "This API endpoint can be used to delete a audio url entry for a partnership account."
}
},
"/accounts/{paid}/blockednumbers": {
"post": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Blocked phone number successfully added."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Block"
}
}
],
"tags": [
"Blocked Numbers"
],
"description": "This API endpoint can be used to create blocked numbers for an account associated with a partnership.",
"summary": "Adds a partnership account blocked number",
"operationId": "post_blocked_numbers_collection"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_blocked_numbers_collection",
"summary": "Retrieves the blocked numbers of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Blocked Numbers"
],
"description": "This API endpoint can be used to retrieve all blocked numbers for an account associated with a partnership."
}
},
"/accounts/{paid}/blockednumbers/{bpnid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Blocked number successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Block"
}
}
],
"tags": [
"Blocked Numbers"
],
"description": "This API endpoint can be used to update a blocked number for an account associated with a partnership.",
"summary": "Update a partnership account blocked number",
"operationId": "put_blocked_number"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
},
{
"required": true,
"type": "integer",
"description": "The blocked phone number ID.",
"in": "path",
"name": "bpnid"
}
],
"delete": {
"operationId": "delete_blocked_number",
"summary": "Delete a partnership account blocked number",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Blocked number successfully deleted."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Blocked Numbers"
],
"description": "This API endpoint can be used to delete a blocked number for an account associated with a partnership."
}
},
"/accounts/{paid}/calls": {
"post": {
"responses": {
"200": {
"description": "Call successfully triggered."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/CALL_outbound"
}
}
],
"tags": [
"Calls"
],
"description": "This API endpoint can be used to create an outbound call to phone number using an account agent associated with a partnership.",
"summary": "Performs an outbound call",
"operationId": "post_calls"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_calls",
"summary": "Retrieves all call lead details for a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Calls"
],
"description": "This API endpoint can be used to retrieve all the call data for an partnership account."
}
},
"/accounts/{paid}/calls/{cid}": {
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
},
{
"required": true,
"type": "integer",
"description": "The call ID.",
"in": "path",
"name": "cid"
}
],
"get": {
"operationId": "get_call",
"summary": "Retrieves call lead details of a call",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Calls"
],
"description": "This API endpoint can be used to retrieve a single calls data for an partnership account"
}
},
"/accounts/{paid}/messages": {
"post": {
"responses": {
"200": {
"description": "Message successfully sent."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/Message"
}
}
],
"tags": [
"Messages"
],
"description": "This API endpoint can be used to create an outbound text message to phone number using an partnership account standard phone number.",
"summary": "Sends a text message to a lead",
"operationId": "post_api_messages"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_api_messages",
"summary": "Retrieves all the messages for a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Messages"
],
"description": "This API endpoint can be used to retrieve all messages for an account associated with a partnership."
}
},
"/accounts/{paid}/messages/{mid}": {
"parameters": [
{
"required": true,
"type": "integer",
"description": "The message ID.",
"in": "path",
"name": "mid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_api_messages",
"summary": "Retrieve a message for a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Messages"
],
"description": "This API endpoint can be used to retrieve a single message data for an partnership account"
}
},
"/accounts/{paid}/mobile": {
"post": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Phone number successfully created."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Mobile"
}
}
],
"tags": [
"Mobile Phone Numbers"
],
"description": "This API endpoint can be used to provision bandwidth phone numbers used for mobile apps. This will work similar to the provisioning of the operational phone number.",
"summary": "Provision phone numbers for a partnership account",
"operationId": "post_api_mobile_numbers"
},
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
]
},
"/accounts/{paid}/mobile/availablenumbers": {
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
],
"get": {
"operationId": "get_api_mobile_numbers_search",
"summary": "Retrieves the available phone numbers of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Mobile Phone Numbers"
],
"description": "This API endpoint can be used to find and search for available bandwidth phone numbers used for mobile apps."
}
},
"/accounts/{paid}/mobile/{pnid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Phone number successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Phone"
}
}
],
"tags": [
"Mobile Phone Numbers"
],
"description": "This API endpoint can be used to update a mobile phone number for an account associated with a partnership.",
"summary": "Update a phone number of a partnership account",
"operationId": "put_api_mobile_numbers"
},
"delete": {
"operationId": "delete_api_mobile_numbers",
"summary": "Delete a phone number of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Phone number successfully deleted."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Mobile Phone Numbers"
],
"description": "This API endpoint can be used to release and deactivate a mobile phone number as well delete/deactivate an endpoint for an account associated with a partnership."
},
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
},
{
"required": true,
"type": "integer",
"name": "pnid",
"in": "path"
}
],
"get": {
"operationId": "get_api_mobile_numbers",
"summary": "Retrieves a phone number of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Mobile Phone Numbers"
],
"description": "This API endpoint can be used to retrieve a mobile phone number and sip endpoint details for an account associated with a partnership."
}
},
"/accounts/{paid}/phonenumbers": {
"post": {
"responses": {
"200": {
"description": "Phone number successfully provisioned."
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Phone"
}
}
],
"tags": [
"Operational Phone Numbers"
],
"description": "This API endpoint can be used to provision either a twilio phone number (priority) or a Bandwidth phone number (tracking or mobile) based on the type.",
"summary": "Provision a phone number",
"operationId": "post_api_operational_phone_numbers"
},
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
]
},
"/accounts/{paid}/phonenumbers/availablenumbers": {
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
],
"get": {
"operationId": "get_api_search_operational_phone_numbers",
"summary": "Retrieves the phone numbers of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Operational Phone Numbers"
],
"description": "This API endpoint can be used to find all available phone numbers based on the type, if its tollfree and area code.\nThe type can only be \"priority\" or \"tracking\".\nBased on the type the number will either be purchased from Twilio (priority) or Brandwidth (tracking)."
}
},
"/accounts/{paid}/phonenumbers/{pnid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Phone number not found."
},
"204": {
"description": "Phone number successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Phone"
}
}
],
"tags": [
"Operational Phone Numbers"
],
"description": "This API endpoint can be used to update a phone number for an account associated with a partnership.",
"summary": "Update a phone number",
"operationId": "put_api_operational_phone_numbers"
},
"delete": {
"operationId": "delete_api_operational_phone_numbers",
"summary": "Delete a phone number",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Phone number not found."
},
"204": {
"description": "Phone number successfully deleted."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Operational Phone Numbers"
],
"description": "This API endpoint can be used to release and deactivate a phone number for an account associated with a partnership."
},
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
},
{
"required": true,
"type": "integer",
"name": "pnid",
"in": "path"
}
],
"get": {
"operationId": "get_api_operational_phone_numbers",
"summary": "Get a phone number",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Phone number not found."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Operational Phone Numbers"
],
"description": "This API endpoint can be used to retrieve a phone number for an account associated with a partnership."
}
},
"/accounts/{paid}/usage": {
"parameters": [
{
"required": true,
"type": "integer",
"name": "paid",
"in": "path"
}
],
"get": {
"operationId": "get_usage",
"summary": "Retrieves partnership usage measurements",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Partnership account not found."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Accounts"
],
"description": "This API endpoint can be used to to retrieve usage data for an account associated with a partnership."
}
},
"/accounts/{paid}/widgets": {
"post": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"204": {
"description": "Widget successfully created."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/ADD_Widget"
}
}
],
"tags": [
"Widgets"
],
"description": "This API endpoint can be used to create widgets for an account associated with a partnership.",
"summary": "Create a widget for a partnership account",
"operationId": "post_api_widget_collection"
},
"parameters": [
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"get": {
"operationId": "get_api_widget_collection",
"summary": "Retrieves widgets of a partnership account",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Widgets"
],
"description": "This API endpoint can be used to retrieve widgets for an account associated with a partnership."
}
},
"/accounts/{paid}/widgets/{guid}": {
"put": {
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Widget not found."
},
"204": {
"description": "Widget successfully updated."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/EDIT_Widget"
}
}
],
"tags": [
"Widgets"
],
"description": "This API endpoint can be used to update widgets for an account associated with a partnership.",
"summary": "Update a widget for a partnership account",
"operationId": "put_api_widget"
},
"parameters": [
{
"required": true,
"type": "string",
"description": "The widget GUID.",
"in": "path",
"name": "guid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
],
"delete": {
"operationId": "delete_api_widget",
"summary": "Deletes widget details",
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Widget not found."
},
"204": {
"description": "Widget successfully deleted."
},
"401": {
"description": "Unauthorized request."
}
},
"tags": [
"Widgets"
],
"description": "This API endpoint can be used to delete a widget for an account associated with a partnership."
}
},
"/accounts/{paid}/widgets/{guid}/Call": {
"post": {
"responses": {
"200": {
"description": "Widget call successfully triggered."
},
"400": {
"description": "Error performing operation."
},
"404": {
"description": "Widget not found."
},
"401": {
"description": "Unauthorized request."
}
},
"parameters": [
{
"required": true,
"in": "body",
"name": "payload",
"schema": {
"$ref": "#/definitions/CALL_Widget"
}
}
],
"tags": [
"Widgets"
],
"description": "This API endpoint can be used to create an outbound call to phone number.",
"summary": "Perform a call with a widget",
"operationId": "post_api_widget_call"
},
"parameters": [
{
"required": true,
"type": "string",
"description": "The widget GUID.",
"in": "path",
"name": "guid"
},
{
"required": true,
"type": "integer",
"description": "The partnership account ID.",
"in": "path",
"name": "paid"
}
]
}
},
"responses": {
"MaskError": {
"description": "When any error occurs on mask"
},
"ParseError": {
"description": "When a mask can't be parsed"
}
},
"produces": [
"application/json"
],
"basePath": "/api/v2",
"tags": [
{
"name": "Accounts",
"description": "accounts"
},
{
"name": "Accounts",
"description": "Operations related to partnership accounts."
},
{
"name": "Agents",
"description": "Operations related to agents."
},
{
"name": "Audio URLs",
"description": "Operations related to phone number audio URLs."
},
{
"name": "Blocked Numbers",
"description": "Operations related to blocked numbers."
},
{
"name": "Calls",
"description": "Operations related to calls."
},
{
"name": "Messages",
"description": "Operations related to messages."
},
{
"name": "Mobile Phone Numbers",
"description": "Operations related to mobile phone numbers."
},
{
"name": "Operational Phone Numbers",
"description": "Operations related to operational phone numbers."
},
{
"name": "Widgets",
"description": "Operations related to widgets."
}
],
"securityDefinitions": {
"apikey": {
"type": "apiKey",
"name": "Authorize",
"in": "header"
}
},
"host": "localhost:8000",
"definitions": {
"EDIT_Phone": {
"required": [
"friendly_name",
"is_deactivated",
"local",
"phonenumber",
"routing_config",
"tollfree",
"type"
],
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "The source of the phone number",
"maxLength": 256
},
"phonenumber": {
"type": "string",
"description": "The phone number",
"maxLength": 20
},
"tollfree": {
"type": "boolean",
"description": "If the phone number is tollfree"
},
"is_deactivated": {
"type": "boolean",
"description": "If the phone number is deactivated"
},
"friendly_name": {
"type": "string",
"description": "The friendly name of the phone number",
"maxLength": 128
},
"local": {
"type": "boolean",
"description": "If the phone number is local"
},
"type": {
"type": "string",
"description": "This can only be one of the following options: mobile, tracking or priority",
"maxLength": 20
},
"routing_config": {
"description": "The route configuration of the phonenumber",
"$ref": "#/definitions/EDIT_Phone_Route_Config"
},
"channel": {
"type": "string",
"description": "The channel of the phonenumber",
"maxLength": 256
}
}
},
"EDIT_Phone_Route_Config_Default": {
"required": [
"agents"
],
"type": "object",
"properties": {
"agents": {
"items": {
"$ref": "#/definitions/EDIT_Phone_Agents"
},
"type": "array",
"description": "The list of agents"
}
}
},
"EDIT_Schedule": {
"required": [
"id"
],
"type": "object",
"properties": {
"available_from": {
"type": "string",
"description": "When the agent is available from on this day"
},
"available_to": {
"type": "string",
"description": "When the agent becomes unavailable on this day"
},
"is_active": {
"type": "boolean",
"description": "If the agent is active on this day"
},
"id": {
"type": "integer",
"description": "The unique identifier of the scheduled day"
}
}
},
"ADD_Mobile_Route_Config_Default": {
"required": [
"agents"
],
"type": "object",
"properties": {
"agents": {
"items": {
"$ref": "#/definitions/ADD_Mobile_Agents"
},
"type": "array",
"description": "The list of agents"
}
}
},
"ADD_Mobile_Agents": {
"required": [
"agent_id",
"fullName"
],
"type": "object",
"properties": {
"fullName": {
"default": "",
"type": "string",
"description": "The fullname of an agent",
"maxLength": 256
},
"agent_id": {
"type": "integer",
"description": "The unique identifier of an agent"
}
}
},
"EDIT_Agent": {
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": "Timezone of the Agent"
},
"all_hours": {
"type": "boolean",
"description": "If the agent is available 24/7"
},
"phonenumber": {
"type": "string",
"description": "Phonenumber of the Agent",
"maxLength": 20
},
"description": {
"type": "string",
"description": "Description of the Agent"
},
"firstname": {
"type": "string",
"description": "First name of the Agent",
"maxLength": 128
},
"title": {
"type": "string",
"description": "User title",
"maxLength": 128
},
"department": {
"type": "string",
"description": "Department of the Agent",
"maxLength": 128
},
"lastname": {
"type": "string",
"description": "Last name of the Agent",
"maxLength": 128
},
"email": {
"type": "string",
"description": "Email address of the Agent",
"maxLength": 254
}
}
},
"ADD_Widget_Options": {
"required": [
"addHiddenInformation",
"agents",
"hiddenInformation",
"language",
"recordCalls",
"voicemail",
"voicemailMessage"
],
"type": "object",
"properties": {
"voicemailMessage": {
"default": "Sorry we are not available at the moment. Please leave a message and we will get back to you as soon as possible.",
"type": "string",
"description": "The voicemail message that will be used for the widget",
"maxLength": 256
},
"recordCalls": {
"default": false,
"type": "boolean",
"description": "If calls will be recorded"
},
"language": {
"default": "en",
"type": "string",
"description": "The language used for the widget"
},
"voicemail": {
"default": true,
"type": "boolean",
"description": "If voicemail will be enabled"
},
"agents": {
"items": {
"$ref": "#/definitions/ADD_Widget_Options_Agent"
},
"type": "array",
"description": "The list of agents"
},
"hiddenInformation": {
"default": "",
"type": "string",
"description": "The hidden information add to the widget",
"maxLength": 256
},
"addHiddenInformation": {
"default": false,
"type": "boolean",
"description": "If hidden information will be added to the widget"
}
}
},
"EDIT_Block": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The status of the blocked phonenumber"
},
"global_exclusion": {
"type": "boolean",
"description": "If the blocked phonenumber is a global exclusion"
},
"phonenumber": {
"type": "string",
"description": "The blocked phonenumber",
"maxLength": 20
}
}
},
"EDIT_Phone_Route_Config": {
"required": [
"SMSAutoReply",
"SMSAutoReplyImage",
"SMSAutoReplyImageUrl",
"SMSAutoReplyText",
"configSMSSetup",
"defaultRouting",
"greetingMessage",
"language",
"recordCalls",
"routingType",
"voicemail",
"voicemailMessage",
"voicemailMessageType",
"whisperMessage",
"whisperMessageType",
"transcribeAnsweredCall",
"transcribeVoiceMail"
],
"type": "object",
"properties": {
"voicemailMessage": {
"default": "",
"type": "string",
"description": "The voicemail message"
},
"recordCalls": {
"default": false,
"type": "boolean",
"description": "If recording of calls will be enabled"
},
"SMSAutoReplyImageUrl": {
"default": "",
"type": "string",
"description": "The URL for the image used in the SMS automatic reply"
},
"routingType": {
"default": "default",
"type": "string",
"description": "The routing type"
},
"defaultRouting": {
"description": "The route configuration default settings",
"$ref": "#/definitions/EDIT_Phone_Route_Config_Default"
},
"configSMSSetup": {
"default": false,
"type": "boolean",
"description": "If SMS configuration setup will be enabled"
},
"voicemailMessageType": {
"default": "",
"type": "string",
"description": "The voicemail message type"
},
"whisperMessageType": {
"default": "",
"type": "string",
"description": "The whisper message type"
},
"SMSAutoReplyText": {
"default": "",
"type": "string",
"description": "The text used in the SMS automatic reply"
},
"greetingMessage": {
"default": false,
"type": "boolean",
"description": "If greeting message will be enabled"
},
"language": {
"default": "en",
"type": "string",
"description": "The language used for the phone number"
},
"voicemail": {
"default": false,
"type": "boolean",
"description": "If voicemail will be enabled"
},
"SMSAutoReplyImage": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply image will be enabled"
},
"whisperMessage": {
"default": "",
"type": "string",
"description": "The whisper message"
},
"SMSAutoReply": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply will be enabled"
},
"transcribeAnsweredCall": {
"default": false,
"type": "boolean",
"description": "If transcription for recorded calls will be enabled"
},
"transcribeVoiceMail": {
"default": false,
"type": "boolean",
"description": "If transcription for voicemails will be enabled"
}
}
},
"ADD_Widget": {
"required": [
"_options",
"enabled",
"name",
"phonenumber_id",
"type"
],
"type": "object",
"properties": {
"enabled": {
"default": true,
"type": "boolean",
"description": "Whether or not the widget is enabled"
},
"_options": {
"description": "The options of the widget",
"$ref": "#/definitions/ADD_Widget_Options"
},
"type": {
"default": "widget",
"type": "string",
"description": "The widget type",
"maxLength": 128
},
"name": {
"type": "string",
"description": "The name of the widget",
"maxLength": 128
},
"phonenumber_id": {
"type": "integer",
"description": "The ID of inbound_id/phone_number_id"
}
}
},
"ADD_Phone_Route_Config_Default": {
"required": [
"agents"
],
"type": "object",
"properties": {
"agents": {
"items": {
"$ref": "#/definitions/ADD_Phone_Agents"
},
"type": "array",
"description": "The list of agents"
}
}
},
"EDIT_Widget_Options_Agent": {
"required": [
"contactUsing",
"fullName",
"id"
],
"type": "object",
"properties": {
"fullName": {
"default": "",
"type": "string",
"description": "The fullname of an agent",
"maxLength": 256
},
"contactUsing": {
"default": "phone",
"type": "string",
"description": "The type of device the agent is using"
},
"id": {
"type": "integer",
"description": "The unique identifier of an agent"
}
}
},
"ADD_audio_url": {
"required": [
"audio_url",
"enabled",
"phonenumber_id",
"whisper_message_type"
],
"type": "object",
"properties": {
"audio_url": {
"type": "string",
"description": "The URL for the audio",
"maxLength": 256
},
"widget_guid": {
"type": "string",
"description": "The widget guid the audio URL relates to",
"maxLength": 128
},
"enabled": {
"default": false,
"type": "boolean",
"description": "If the audio URL is enabled"
},
"whisper_message_type": {
"type": "string",
"description": "The whisper message type",
"maxLength": 128
},
"phonenumber_id": {
"type": "integer",
"description": "The ID of inbound_id/phone_number_id"
}
}
},
"ADD_Block": {
"required": [
"phonenumber",
"status"
],
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "The status of the blocked phonenumber"
},
"global_exclusion": {
"default": false,
"type": "boolean",
"description": "If the blocked phonenumber is a global exclusion"
},
"phonenumber": {
"type": "string",
"description": "The blocked phonenumber",
"maxLength": 20
}
}
},
"EDIT_Widget_Options": {
"required": [
"addHiddenInformation",
"agents",
"hiddenInformation",
"language",
"recordCalls",
"voicemail",
"voicemailMessage"
],
"type": "object",
"properties": {
"voicemailMessage": {
"default": "Sorry we are not available at the moment. Please leave a message and we will get back to you as soon as possible.",
"type": "string",
"description": "The voicemail message that will be used for the widget",
"maxLength": 256
},
"recordCalls": {
"default": false,
"type": "boolean",
"description": "If calls will be recorded"
},
"language": {
"default": "en",
"type": "string",
"description": "The language used for the widget"
},
"voicemail": {
"default": true,
"type": "boolean",
"description": "If voicemail will be enabled"
},
"agents": {
"items": {
"$ref": "#/definitions/EDIT_Widget_Options_Agent"
},
"type": "array",
"description": "The list of agents"
},
"hiddenInformation": {
"default": "",
"type": "string",
"description": "The hidden information add to the widget",
"maxLength": 256
},
"addHiddenInformation": {
"default": false,
"type": "boolean",
"description": "If hidden information will be added to the widget"
}
}
},
"EDIT_Widget": {
"required": [
"_options",
"enabled",
"name",
"phonenumber_id",
"type"
],
"type": "object",
"properties": {
"enabled": {
"default": true,
"type": "boolean",
"description": "Whether or not the widget is enabled"
},
"_options": {
"description": "The options of the widget",
"$ref": "#/definitions/EDIT_Widget_Options"
},
"type": {
"default": "widget",
"type": "string",
"description": "The widget type",
"maxLength": 128
},
"name": {
"type": "string",
"description": "The name of the widget",
"maxLength": 128
},
"phonenumber_id": {
"type": "integer",
"description": "The ID of inbound_id/phone_number_id"
}
}
},
"EDIT_Account": {
"type": "object",
"properties": {
"is_active": {
"type": "boolean",
"description": "Whether or not the partnership account is active"
},
"name": {
"type": "string",
"description": "The name of the partnership account",
"maxLength": 255
},
"partner_account_code": {
"type": "string",
"description": "The partnership account code",
"maxLength": 64
}
}
},
"ADD_Widget_Options_Agent": {
"required": [
"contactUsing",
"fullName",
"id"
],
"type": "object",
"properties": {
"fullName": {
"default": "",
"type": "string",
"description": "The fullname of an agent",
"maxLength": 256
},
"contactUsing": {
"default": "phone",
"type": "string",
"description": "The type of device the agent is using"
},
"id": {
"type": "integer",
"description": "The unique identifier of an agent"
}
}
},
"ADD_Phone_Route_Config": {
"required": [
"SMSAutoReply",
"SMSAutoReplyImage",
"SMSAutoReplyImageUrl",
"SMSAutoReplyText",
"configSMSSetup",
"defaultRouting",
"greetingMessage",
"language",
"recordCalls",
"routingType",
"voicemail",
"voicemailMessage",
"voicemailMessageType",
"whisperMessage",
"whisperMessageType",
"transcribeAnsweredCall",
"transcribeVoiceMail"
],
"type": "object",
"properties": {
"voicemailMessage": {
"default": "",
"type": "string",
"description": "The voicemail message"
},
"recordCalls": {
"default": false,
"type": "boolean",
"description": "If recording of calls will be enabled"
},
"SMSAutoReplyImageUrl": {
"default": "",
"type": "string",
"description": "The URL for the image used in the SMS automatic reply"
},
"routingType": {
"default": "default",
"type": "string",
"description": "The routing type"
},
"defaultRouting": {
"description": "The route configuration default settings",
"$ref": "#/definitions/ADD_Phone_Route_Config_Default"
},
"configSMSSetup": {
"default": false,
"type": "boolean",
"description": "If SMS configuration setup will be enabled"
},
"voicemailMessageType": {
"default": "",
"type": "string",
"description": "The voicemail message type"
},
"whisperMessageType": {
"default": "",
"type": "string",
"description": "The whisper message type"
},
"SMSAutoReplyText": {
"default": "",
"type": "string",
"description": "The text used in the SMS automatic reply"
},
"greetingMessage": {
"default": false,
"type": "boolean",
"description": "If greeting message will be enabled"
},
"language": {
"default": "en",
"type": "string",
"description": "The language used for the phone number"
},
"voicemail": {
"default": false,
"type": "boolean",
"description": "If voicemail will be enabled"
},
"SMSAutoReplyImage": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply image will be enabled"
},
"whisperMessage": {
"default": "",
"type": "string",
"description": "The whisper message"
},
"SMSAutoReply": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply will be enabled"
},
"transcribeAnsweredCall": {
"default": false,
"type": "boolean",
"description": "If transcription for recorded calls will be enabled"
},
"transcribeVoiceMail": {
"default": false,
"type": "boolean",
"description": "If transcription for voicemails will be enabled"
}
}
},
"EDIT_Phone_Agents": {
"required": [
"agent_id",
"fullName"
],
"type": "object",
"properties": {
"fullName": {
"default": "",
"type": "string",
"description": "The fullname of an agent",
"maxLength": 256
},
"agent_id": {
"type": "integer",
"description": "The unique identifier of an agent"
}
}
},
"EDIT_audio_url": {
"type": "object",
"properties": {
"audio_url": {
"type": "string",
"description": "The URL for the audio",
"maxLength": 256
},
"widget_guid": {
"type": "string",
"description": "The widget guid the audio URL relates to",
"maxLength": 128
},
"enabled": {
"default": false,
"type": "boolean",
"description": "If the audio URL is enabled"
},
"whisper_message_type": {
"type": "string",
"description": "The whisper message type",
"maxLength": 128
},
"phonenumber_id": {
"type": "integer",
"description": "The ID of inbound_id/phone_number_id"
}
}
},
"ADD_Account": {
"required": [
"is_active",
"name"
],
"type": "object",
"properties": {
"is_active": {
"type": "boolean",
"description": "Whether or not the partnership account is active"
},
"name": {
"type": "string",
"description": "The name of the partnership account",
"maxLength": 255
},
"partner_account_code": {
"type": "string",
"description": "The partnership account code",
"maxLength": 64
}
}
},
"ADD_Agent": {
"required": [
"phonenumber"
],
"type": "object",
"properties": {
"timezone": {
"type": "string",
"description": "Timezone of the Agent"
},
"all_hours": {
"type": "boolean",
"description": "If the agent is available 24/7"
},
"phonenumber": {
"type": "string",
"description": "Phonenumber of the Agent",
"maxLength": 20
},
"description": {
"type": "string",
"description": "Description of the Agent"
},
"firstname": {
"type": "string",
"description": "First name of the Agent",
"maxLength": 128
},
"title": {
"type": "string",
"description": "User title",
"maxLength": 128
},
"department": {
"type": "string",
"description": "Department of the Agent",
"maxLength": 128
},
"lastname": {
"type": "string",
"description": "Last name of the Agent",
"maxLength": 128
},
"email": {
"type": "string",
"description": "Email address of the Agent",
"maxLength": 254
}
}
},
"CALL_outbound": {
"required": [
"agent_id",
"number",
"phone_number_id"
],
"type": "object",
"properties": {
"phone_number_id": {
"type": "integer",
"description": "The BuyCall phone number associated with an account to make a call"
},
"agent_id": {
"type": "integer",
"description": "The unique identifier of the agent that needs to be called first"
},
"number": {
"type": "string",
"description": "The phone that will be called. This will be the lead phone number",
"maxLength": 20
}
}
},
"ADD_Mobile": {
"required": [
"friendly_name",
"local",
"phonenumber",
"routing_config",
"sip_password",
"sip_username"
],
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "The source of the phone number",
"maxLength": 256
},
"phonenumber": {
"type": "string",
"description": "The phone number",
"maxLength": 20
},
"friendly_name": {
"type": "string",
"description": "The friendly name of the phone number",
"maxLength": 128
},
"sip_username": {
"type": "string",
"description": "The phone number",
"maxLength": 20
},
"local": {
"type": "boolean",
"description": "If the phone number is local"
},
"sip_password": {
"type": "string",
"description": "The phone number",
"maxLength": 20
},
"routing_config": {
"description": "The route configuration of the phonenumber",
"$ref": "#/definitions/ADD_Mobile_Route_Config"
},
"channel": {
"type": "string",
"description": "The channel of the phonenumber",
"maxLength": 256
}
}
},
"ADD_Mobile_Route_Config": {
"required": [
"SMSAutoReply",
"SMSAutoReplyImage",
"SMSAutoReplyImageUrl",
"SMSAutoReplyText",
"configSMSSetup",
"defaultRouting",
"greetingMessage",
"language",
"recordCalls",
"routingType",
"voicemail",
"voicemailMessage",
"voicemailMessageType",
"whisperMessage",
"whisperMessageType",
"transcribeAnsweredCall",
"transcribeVoiceMail"
],
"type": "object",
"properties": {
"voicemailMessage": {
"default": "",
"type": "string",
"description": "The voicemail message"
},
"recordCalls": {
"default": false,
"type": "boolean",
"description": "If recording of calls will be enabled"
},
"SMSAutoReplyImageUrl": {
"default": "",
"type": "string",
"description": "The URL for the image used in the SMS automatic reply"
},
"routingType": {
"default": "default",
"type": "string",
"description": "The routing type"
},
"defaultRouting": {
"description": "The route configuration default settings",
"$ref": "#/definitions/ADD_Mobile_Route_Config_Default"
},
"configSMSSetup": {
"default": false,
"type": "boolean",
"description": "If SMS configuration setup will be enabled"
},
"voicemailMessageType": {
"default": "",
"type": "string",
"description": "The voicemail message type"
},
"whisperMessageType": {
"default": "",
"type": "string",
"description": "The whisper message type"
},
"SMSAutoReplyText": {
"default": "",
"type": "string",
"description": "The text used in the SMS automatic reply"
},
"greetingMessage": {
"default": false,
"type": "boolean",
"description": "If greeting message will be enabled"
},
"language": {
"default": "en",
"type": "string",
"description": "The language used for the phone number"
},
"voicemail": {
"default": false,
"type": "boolean",
"description": "If voicemail will be enabled"
},
"SMSAutoReplyImage": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply image will be enabled"
},
"whisperMessage": {
"default": "",
"type": "string",
"description": "The whisper message"
},
"SMSAutoReply": {
"default": false,
"type": "boolean",
"description": "If SMS automatic reply will be enabled"
},
"transcribeAnsweredCall": {
"default": false,
"type": "boolean",
"description": "If transcription for recorded calls will be enabled"
},
"transcribeVoiceMail": {
"default": false,
"type": "boolean",
"description": "If transcription for voicemails will be enabled"
}
}
},
"ADD_Phone": {
"required": [
"friendly_name",
"local",
"phonenumber",
"routing_config",
"tollfree",
"type"
],
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "The source of the phone number",
"maxLength": 256
},
"phonenumber": {
"type": "string",
"description": "The phone number",
"maxLength": 20
},
"tollfree": {
"type": "boolean",
"description": "If the phone number is tollfree"
},
"friendly_name": {
"type": "string",
"description": "The friendly name of the phone number",
"maxLength": 128
},
"local": {
"type": "boolean",
"description": "If the phone number is local"
},
"type": {
"type": "string",
"description": "This can only be one of the following options: mobile, tracking or priority",
"maxLength": 20
},
"routing_config": {
"description": "The route configuration of the phonenumber",
"$ref": "#/definitions/ADD_Phone_Route_Config"
},
"channel": {
"type": "string",
"description": "The channel of the phonenumber",
"maxLength": 256
}
}
},
"ADD_Phone_Agents": {
"required": [
"agent_id",
"fullName"
],
"type": "object",
"properties": {
"fullName": {
"default": "",
"type": "string",
"description": "The fullname of an agent",
"maxLength": 256
},
"agent_id": {
"type": "integer",
"description": "The unique identifier of an agent"
}
}
},
"CALL_Widget": {
"required": [
"number"
],
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "The phone that will be called. This will be the lead phone number.",
"maxLength": 20
}
}
},
"Message": {
"required": [
"body",
"number",
"phone_number_id"
],
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The content of text message",
"maxLength": 1024
},
"media": {
"type": "string",
"description": "The url to media that can be included if a image is attached to the text message",
"maxLength": 512
},
"phone_number_id": {
"type": "integer",
"description": "The BuyCall phone number associated with an account to send the text message"
},
"number": {
"type": "string",
"description": "The number of the lead that will received the message",
"maxLength": 20
}
}
}
},
"security": [
{
"apikey": []
}
],
"swagger": "2.0",
"consumes": [
"application/json"
]
}