Add inbound numbers to a project
Add inbound numbers to project
Assign one or more inbound phone numbers to a specific project.
Note: A maximum of 500 phone numbers can be assigned in a single request. The operation is idempotent: numbers already assigned to the project succeed without error. Numbers assigned to another project, unknown numbers, or numbers with a PCI mismatch will fail individually and be reported in
errors.
| Request | |
|---|---|
| Method | POST |
| Resource | https://[customer].asp.virtual-call-center.eu/v2/projects/[projectid]/inbound_numbers |
| Options | N/A |
| Body | JSON object containing an array of phone numbers to assign. |
| Response | |
| Body | Object containing status per phone number and any errors encountered, encoded in JSON. |
Request
Resource parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| customer | string | yes | Your account name. |
| projectid | integer | yes | Unique project identifier. |
Body parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| numbers | array of strings | yes | List of inbound phone numbers to assign to the project (maximum 500 numbers). |
Response
Response object
| Name | Type | Comment |
|---|---|---|
| [number] | boolean | Indicates whether the phone number was successfully assigned (true). |
Errors object
| Name | Type | Comment |
|---|---|---|
| errorcode | integer | Error code identifying the error type (e.g. 600). |
| errormessage | string | Error message describing why assignment failed (e.g. error.phone_number_assigned_to_other_project). |
| property | string | Property associated with the error (e.g. numbers). |
| index | integer | 0-based index of the failed number in the request array. |
Example
URL: https://mycc.asp.virtual-call-center.eu/v2/projects/123/inbound_numbers
Request Body:
{
"numbers": [
"3619999001",
"3619999002"
]
}
Response:
{
"response": {
"3619999001": true
},
"errors": [
{
"errorcode": 600,
"errormessage": "error.phone_number_assigned_to_other_project",
"property": "numbers",
"index": 1
}
]
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.