Create or update SIP registration
curl --request POST \
--url 'https://api.vida.dev/api/v2/sip/registration?token=' \
--header 'Content-Type: application/json' \
--data '
{
"aor": "1001@sip.example.com",
"username": "1001",
"authUsername": "auth-1001",
"password": "supersecret",
"sipRealm": "sip.example.com",
"proxy": "sip.example.com:5061",
"port": 5060,
"transport": "TLS",
"subscribe": false
}
'import requests
url = "https://api.vida.dev/api/v2/sip/registration?token="
payload = {
"aor": "1001@sip.example.com",
"username": "1001",
"authUsername": "auth-1001",
"password": "supersecret",
"sipRealm": "sip.example.com",
"proxy": "sip.example.com:5061",
"port": 5060,
"transport": "TLS",
"subscribe": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
aor: '1001@sip.example.com',
username: '1001',
authUsername: 'auth-1001',
password: 'supersecret',
sipRealm: 'sip.example.com',
proxy: 'sip.example.com:5061',
port: 5060,
transport: 'TLS',
subscribe: false
})
};
fetch('https://api.vida.dev/api/v2/sip/registration?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/sip/registration?token=",
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([
'aor' => '1001@sip.example.com',
'username' => '1001',
'authUsername' => 'auth-1001',
'password' => 'supersecret',
'sipRealm' => 'sip.example.com',
'proxy' => 'sip.example.com:5061',
'port' => 5060,
'transport' => 'TLS',
'subscribe' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.vida.dev/api/v2/sip/registration?token="
payload := strings.NewReader("{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vida.dev/api/v2/sip/registration?token=")
.header("Content-Type", "application/json")
.body("{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/sip/registration?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Registration updated successfully"
}{
"success": true,
"message": "Registration created successfully"
}SIP
Create or update SIP registration
Create a new SIP registration or update the existing registration for the authenticated account.
POST
/
api
/
v2
/
sip
/
registration
Create or update SIP registration
curl --request POST \
--url 'https://api.vida.dev/api/v2/sip/registration?token=' \
--header 'Content-Type: application/json' \
--data '
{
"aor": "1001@sip.example.com",
"username": "1001",
"authUsername": "auth-1001",
"password": "supersecret",
"sipRealm": "sip.example.com",
"proxy": "sip.example.com:5061",
"port": 5060,
"transport": "TLS",
"subscribe": false
}
'import requests
url = "https://api.vida.dev/api/v2/sip/registration?token="
payload = {
"aor": "1001@sip.example.com",
"username": "1001",
"authUsername": "auth-1001",
"password": "supersecret",
"sipRealm": "sip.example.com",
"proxy": "sip.example.com:5061",
"port": 5060,
"transport": "TLS",
"subscribe": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
aor: '1001@sip.example.com',
username: '1001',
authUsername: 'auth-1001',
password: 'supersecret',
sipRealm: 'sip.example.com',
proxy: 'sip.example.com:5061',
port: 5060,
transport: 'TLS',
subscribe: false
})
};
fetch('https://api.vida.dev/api/v2/sip/registration?token=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vida.dev/api/v2/sip/registration?token=",
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([
'aor' => '1001@sip.example.com',
'username' => '1001',
'authUsername' => 'auth-1001',
'password' => 'supersecret',
'sipRealm' => 'sip.example.com',
'proxy' => 'sip.example.com:5061',
'port' => 5060,
'transport' => 'TLS',
'subscribe' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.vida.dev/api/v2/sip/registration?token="
payload := strings.NewReader("{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vida.dev/api/v2/sip/registration?token=")
.header("Content-Type", "application/json")
.body("{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/sip/registration?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"aor\": \"1001@sip.example.com\",\n \"username\": \"1001\",\n \"authUsername\": \"auth-1001\",\n \"password\": \"supersecret\",\n \"sipRealm\": \"sip.example.com\",\n \"proxy\": \"sip.example.com:5061\",\n \"port\": 5060,\n \"transport\": \"TLS\",\n \"subscribe\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Registration updated successfully"
}{
"success": true,
"message": "Registration created successfully"
}Authorizations
Vida API Token
Body
application/json
Full SIP Address of Record
Example:
"1001@sip.example.com"
SIP username
Example:
"1001"
SIP auth username (Authorization header)
Example:
"auth-1001"
SIP password
Example:
"supersecret"
SIP realm / domain
Example:
"sip.example.com"
Outbound proxy
Example:
"sip.example.com:5061"
Registration port
Example:
5060
Transport protocol
Example:
"TLS"
Whether to subscribe for presence
Example:
false
⌘I