Skip to main content
POST
/
api
/
team
/
assets
/
register_phone_number
JavaScript
import BrainbaseLabs from 'brainbase-labs';

const client = new BrainbaseLabs({
  apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});

const response = await client.team.assets.registerPhoneNumber({
  integrationId: 'integrationId',
  phoneNumber: 'phoneNumber',
});

console.log(response.id);
import os
from brainbase_labs import BrainbaseLabs

client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
response = client.team.assets.register_phone_number(
integration_id="integrationId",
phone_number="phoneNumber",
)
print(response.id)
curl --request POST \
--url https://brainbase-monorepo-api.onrender.com/api/team/assets/register_phone_number \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"phoneNumber": "<string>",
"integrationId": "<string>"
}
'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/team/assets/register_phone_number",
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([
'phoneNumber' => '<string>',
'integrationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://brainbase-monorepo-api.onrender.com/api/team/assets/register_phone_number"

payload := strings.NewReader("{\n \"phoneNumber\": \"<string>\",\n \"integrationId\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
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))

}
HttpResponse<String> response = Unirest.post("https://brainbase-monorepo-api.onrender.com/api/team/assets/register_phone_number")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"<string>\",\n \"integrationId\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://brainbase-monorepo-api.onrender.com/api/team/assets/register_phone_number")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"<string>\",\n \"integrationId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "phoneNumber": "<string>",
  "provider": "<string>",
  "a2pVerified": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "integrationId": "<string>",
  "workerId": "<string>",
  "teamId": "<string>",
  "countryCode": "<string>",
  "callerName": "<string>",
  "metadata": {}
}

Authorizations

x-api-key
string
header
required

API key authentication

Body

application/json
phoneNumber
string
required
integrationId
string
required

Response

Phone number registered successfully.

id
string
required
phoneNumber
string
required
provider
string
required
a2pVerified
boolean
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
integrationId
string | null
workerId
string | null
teamId
string | null
countryCode
string | null
callerName
string | null
metadata
object | null