curl -X POST https://api.magpipe.ai/functions/v1/release-phone-number \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number_id": "a1b2c3d4-5678-9012-3456-789012345678"}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/release-phone-number',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
number_id: 'a1b2c3d4-5678-9012-3456-789012345678'
}),
}
);
const result = await response.json();
console.log('Released:', result.phone_number);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/release-phone-number',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'number_id': 'a1b2c3d4-5678-9012-3456-789012345678'}
)
result = response.json()
print(f"Released: {result['phone_number']}")
{
"success": true,
"phone_number": "+16045551234"
}
{
"error": {
"code": "number_not_found",
"message": "Phone number not found in your account"
}
}
Phone Numbers
Release Phone Number
Release a phone number from your account
POST
/
release-phone-number
curl -X POST https://api.magpipe.ai/functions/v1/release-phone-number \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number_id": "a1b2c3d4-5678-9012-3456-789012345678"}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/release-phone-number',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
number_id: 'a1b2c3d4-5678-9012-3456-789012345678'
}),
}
);
const result = await response.json();
console.log('Released:', result.phone_number);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/release-phone-number',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'number_id': 'a1b2c3d4-5678-9012-3456-789012345678'}
)
result = response.json()
print(f"Released: {result['phone_number']}")
{
"success": true,
"phone_number": "+16045551234"
}
{
"error": {
"code": "number_not_found",
"message": "Phone number not found in your account"
}
}
Release a phone number from your account. The number will be returned to the available pool and can no longer be used for calls or messages.
This action is irreversible. The number will be immediately released and you may not be able to re-acquire the same number.
Request Body
Response
curl -X POST https://api.magpipe.ai/functions/v1/release-phone-number \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number_id": "a1b2c3d4-5678-9012-3456-789012345678"}'
const response = await fetch(
'https://api.magpipe.ai/functions/v1/release-phone-number',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
number_id: 'a1b2c3d4-5678-9012-3456-789012345678'
}),
}
);
const result = await response.json();
console.log('Released:', result.phone_number);
import requests
response = requests.post(
'https://api.magpipe.ai/functions/v1/release-phone-number',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={'number_id': 'a1b2c3d4-5678-9012-3456-789012345678'}
)
result = response.json()
print(f"Released: {result['phone_number']}")
{
"success": true,
"phone_number": "+16045551234"
}
{
"error": {
"code": "number_not_found",
"message": "Phone number not found in your account"
}
}