Buy a Number
Last updated
Last updated
Purchase numbers and assign them to the workspace. Purchasing of the numbers requires sufficient balance in the workspace wallet.
Created
const response = await fetch('/workspaces/{workspaceId}/numbers', {
method: 'POST',
headers: {
"Authorization": "Bearer jwt",
"Content-Type": "application/json"
},
body: JSON.stringify({
"numbers": [
{
"number": "text",
"country": "AC"
}
]
}),
});
const data = await response.json();
{
"numbers": [
{
"type": "local",
"capabilities": {
"sms": {
"inbound": false,
"outbound": false
},
"voice": {
"inbound": false,
"outbound": false
},
"mms": {
"inbound": false,
"outbound": false
},
"fax": {
"inbound": false,
"outbound": false
}
},
"number": "text",
"country": "AC",
"monthlyRecurringPrice": {
"currencyCode": "EUR"
},
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "active",
"subscription": {
"status": "active",
"subscribedAt": "2024-04-29T08:22:17.352Z",
"updatedAt": "2024-04-29T08:22:17.352Z",
"cancelledAt": "2024-04-29T08:22:17.352Z"
},
"configurations": {
"voice": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
}
},
"sms": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
}
},
"mms": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
}
},
"fax": {
"inbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
},
"outbound": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
}
},
"whatsapp": {
"connectorId": "123e4567-e89b-12d3-a456-426614174000",
"connectorTemplateId": "123e4567-e89b-12d3-a456-426614174000"
}
},
"createdAt": "2024-04-29T08:22:17.352Z",
"updatedAt": "2024-04-29T08:22:17.352Z",
"requirements": [
{
"requirement": {
"name": "text",
"type": "kycForm",
"scope": "number-activation",
"selector": {
"scope": "text",
"numberType": "local",
"countryCode": "AC"
}
},
"status": "ok",
"reference": "text"
}
]
}
]
}