curl --request POST \
--url https://api.leadping.ai/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>"
}
'import requests
url = "https://api.leadping.ai/phone-numbers"
payload = { "number": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/phone-numbers");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"number\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\"\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({number: '<string>'})
};
fetch('https://api.leadping.ai/phone-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/phone-numbers"
payload := strings.NewReader("{\n \"number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/phone-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"number": "<string>",
"phoneIdentityId": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"leadpingOwned": true,
"routing": {
"smsEnabled": true,
"voiceEnabled": true,
"teamId": "<string>",
"sourceId": "<string>",
"campaignId": "<string>",
"tenDlcApplicationId": "<string>"
},
"enabled": true,
"warmup": {
"enabled": true,
"state": "Not Started",
"healthStatus": "Not Evaluated",
"healthScore": 123,
"progressPercent": 123,
"callStage": "Stage 0"
},
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "The request could not be completed."
}Create an organization phone number for messaging
Purchases or creates a phone number for the current organization so it can be assigned to messaging, calls, and lead follow-up.
curl --request POST \
--url https://api.leadping.ai/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>"
}
'import requests
url = "https://api.leadping.ai/phone-numbers"
payload = { "number": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/phone-numbers");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"number\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/phone-numbers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\"\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({number: '<string>'})
};
fetch('https://api.leadping.ai/phone-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/phone-numbers"
payload := strings.NewReader("{\n \"number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/phone-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"number": "<string>",
"phoneIdentityId": "<string>",
"organization": {
"id": "<string>",
"name": "<string>"
},
"leadpingOwned": true,
"routing": {
"smsEnabled": true,
"voiceEnabled": true,
"teamId": "<string>",
"sourceId": "<string>",
"campaignId": "<string>",
"tenDlcApplicationId": "<string>"
},
"enabled": true,
"warmup": {
"enabled": true,
"state": "Not Started",
"healthStatus": "Not Evaluated",
"healthScore": 123,
"progressPercent": 123,
"callStage": "Stage 0"
},
"name": "<string>",
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"modifiedAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Body
The phone number details to create.
Response
Returns the phone number response.
Describes a Leadping-managed phone number, including capabilities, messaging registration, health, and assignment details.
E.164 phone number exposed by this phone number.
Identifier of the canonical phone identity for this number.
Organization summary connected to this phone number.
Show child attributes
Show child attributes
Indicates whether Leadping provisions and manages this phone number.
Routing metadata that connects this phone number to teams, campaigns, and sources.
Show child attributes
Show child attributes
Indicates whether this phone number is active and available in the Leadping API.
SMS and call warmup for this phone number.
Show child attributes
Show child attributes
Human-readable display name of the resource.
Stable unique identifier of the resource.
UTC timestamp when the resource was created.
UTC timestamp when the resource was last modified, or null when it has not been updated.

