Lock a dedicated line
curl --request POST \
--url https://osis.co/api/v1/comms/lines/{e164}/lock \
--header 'Authorization: Bearer <token>'import requests
url = "https://osis.co/api/v1/comms/lines/{e164}/lock"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://osis.co/api/v1/comms/lines/{e164}/lock', 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://osis.co/api/v1/comms/lines/{e164}/lock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://osis.co/api/v1/comms/lines/{e164}/lock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://osis.co/api/v1/comms/lines/{e164}/lock")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://osis.co/api/v1/comms/lines/{e164}/lock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyLines
Lock a dedicated line
POST /api/v1/comms/lines//lock — irreversibly lock a dedicated line for one port attempt.
POST
https://osis.co
/
api
/
v1
/
comms
/
lines
/
{e164}
/
lock
Lock a dedicated line
curl --request POST \
--url https://osis.co/api/v1/comms/lines/{e164}/lock \
--header 'Authorization: Bearer <token>'import requests
url = "https://osis.co/api/v1/comms/lines/{e164}/lock"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://osis.co/api/v1/comms/lines/{e164}/lock', 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://osis.co/api/v1/comms/lines/{e164}/lock",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://osis.co/api/v1/comms/lines/{e164}/lock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://osis.co/api/v1/comms/lines/{e164}/lock")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://osis.co/api/v1/comms/lines/{e164}/lock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyIrreversibly locks a dedicated line owned by your org so it can receive exactly one number-port attempt.
Scope:
Access required. Request permission to use the Line Port API before calling this endpoint. This is not unrestricted self-serve porting.
comms_lines_write
Request
curl -X POST "https://osis.co/api/v1/comms/lines/%2B16285551212/lock" \
-H "Authorization: Bearer $COMMS_API_KEY"
Path parameters
string
required
Dedicated line E.164 to lock (URL-encoded, e.g.
%2B16285551212). Must be owned by your org in dedicated mode. Shared lines are rejected.Response
201 Created
{
"port": {
"id": "lport_…",
"org_id": "comms_usr_…",
"locked_e164": "+16285551212",
"target_e164": null,
"status": "number_locked",
"error_code": null,
"error_message": null,
"submitted_at": null,
"foc_at": null,
"completed_at": null,
"created_at": "2026-08-12T14:00:00.000Z",
"updated_at": "2026-08-12T14:00:00.000Z"
}
}
Errors
| Status | Meaning |
|---|---|
400 | Not dedicated, shared line, or invalid E.164 |
404 | Line not found for your org |
409 | Already locked |
429 | Rate limited (5 / 15 minutes per org+line) |
⌘I