Getting Phone Number
For authentication,The Username and Password should be sent as a Basic Auth tokens in the Authorization header of the request. Create account.
API endpoint:
get
https://api.txt.ws/v3/available_numbers_get
Description:
Get available phone number list
Request example
curl --location --request GET 'https://api.txt.ws/v3/available_numbers_get?regionCode={regionCode}&type={type}&prefix={prefix}' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key}'
| Parameter | Type | Description |
| regionCode | Required string | regionCode |
| type | Optional string | type |
| prefix | Optional string | prefix |
API endpoint:
get
https://api.txt.ws/v3/available_number_get/{number}
Description:
Get available phone number
Request example
curl --location --request GET 'https://api.txt.ws/v3/available_number_get/{number}' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key}'
| Parameter | Type | Description |
| number | Required string | Phone Number. |
API endpoint:
post
https://api.txt.ws/v3/available_number_rent
Description:
Rent available phone number
Request example
curl --location --request GET 'https://api.txt.ws/v3/available_number_rent' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key} \
--data-raw '{
"number":"string",
"campaign_id":"string"
}'
| Parameter | Type | Description |
| number | Required string | Phone Number. |
| campaign_id | Required string | Campaign alphanumeric identifier (prefixed with letter 'C') |
API endpoint:
post
https://api.txt.ws/v3/number_modify
Description:
Modify phone number
Request example
curl --location --request GET 'https://api.txt.ws/v3/number_modify' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key} \
--data-raw '{
"action": "string",
"number":"string",
"campaign_id":"string"
}'
| Parameter | Type | Description |
| action | Required string | Add or Delete special campaign from assigned phone number,Available values is 'add','delete'. |
| number | Required string | Phone Number. |
| campaign_id | Required string | Campaign alphanumeric identifier (prefixed with letter 'C') |
API endpoint:
post
https://api.txt.ws/v3/number_release
Description:
Release assigned phone number
Request example
curl --location --request POST 'https://api.txt.ws/v3/number_release' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {api_key:secret_key} \
--data-raw '{
"number":"string",
}'
| Parameter | Type | Description |
| number | Required string | Phone Number. |