Lock Client
curl --request POST \
--url https://api.usecobalt.com/v1/client/lock \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/client/lock"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/client/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://api.usecobalt.com/v1/client/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 => [
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/client/lock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/client/lock")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/client/lock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"cookies_invalidated": 123,
"tokens_deactivated": 123,
"users_deactivated": 123,
"locked_at": "<string>"
}
}Account
Lock Client
Emergency stop: immediately invalidates every access token, EHR session, and your client_secret.
POST
/
client
/
lock
Lock Client
curl --request POST \
--url https://api.usecobalt.com/v1/client/lock \
--header 'access_token: <api-key>' \
--header 'client_id: <api-key>' \
--header 'client_secret: <api-key>'import requests
url = "https://api.usecobalt.com/v1/client/lock"
headers = {
"client_id": "<api-key>",
"client_secret": "<api-key>",
"access_token": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {client_id: '<api-key>', client_secret: '<api-key>', access_token: '<api-key>'}
};
fetch('https://api.usecobalt.com/v1/client/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://api.usecobalt.com/v1/client/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 => [
"access_token: <api-key>",
"client_id: <api-key>",
"client_secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api.usecobalt.com/v1/client/lock"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("client_id", "<api-key>")
req.Header.Add("client_secret", "<api-key>")
req.Header.Add("access_token", "<api-key>")
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.usecobalt.com/v1/client/lock")
.header("client_id", "<api-key>")
.header("client_secret", "<api-key>")
.header("access_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usecobalt.com/v1/client/lock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client_id"] = '<api-key>'
request["client_secret"] = '<api-key>'
request["access_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"cookies_invalidated": 123,
"tokens_deactivated": 123,
"users_deactivated": 123,
"locked_at": "<string>"
}
}Break-glass endpoint for a broad compromise. Locking is immediate and affects all users under your client: all access tokens are deactivated, all EHR sessions are invalidated, and your
client_secret is cleared. Only client_id and client_secret headers are required.
Locking is not self-serve reversible — contact support to unlock, after which users reconnect through Cobalt Link.
Example Request
curl -X POST https://api.usecobalt.com/v1/client/lock \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh'
Example Response
{
"success": true,
"message": "Account has been locked. Contact support to unlock.",
"data": {
"cookies_invalidated": 12,
"tokens_deactivated": 12,
"users_deactivated": 12,
"locked_at": "2026-07-20T19:45:00.000Z"
}
}
⌘I