Add or update clients
curl --request POST \
--url https://app.outboundlegal.com/api/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clients": [
{
"external_id": "M-1042",
"first_name": "Ana",
"last_name": "Diaz",
"address_line1": "12 Elm St",
"city": "Newark",
"state": "NJ",
"zip": "07102",
"case_type": "Motor vehicle accident"
}
]
}
'import requests
url = "https://app.outboundlegal.com/api/v1/clients"
payload = { "clients": [
{
"external_id": "M-1042",
"first_name": "Ana",
"last_name": "Diaz",
"address_line1": "12 Elm St",
"city": "Newark",
"state": "NJ",
"zip": "07102",
"case_type": "Motor vehicle accident"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clients: [
{
external_id: 'M-1042',
first_name: 'Ana',
last_name: 'Diaz',
address_line1: '12 Elm St',
city: 'Newark',
state: 'NJ',
zip: '07102',
case_type: 'Motor vehicle accident'
}
]
})
};
fetch('https://app.outboundlegal.com/api/v1/clients', 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://app.outboundlegal.com/api/v1/clients",
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([
'clients' => [
[
'external_id' => 'M-1042',
'first_name' => 'Ana',
'last_name' => 'Diaz',
'address_line1' => '12 Elm St',
'city' => 'Newark',
'state' => 'NJ',
'zip' => '07102',
'case_type' => 'Motor vehicle accident'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.outboundlegal.com/api/v1/clients"
payload := strings.NewReader("{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://app.outboundlegal.com/api/v1/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outboundlegal.com/api/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"index": 0,
"status": "created",
"id": "0b6c1d8e-6a43-4c1e-9d0f-2f5b9a7e4c21"
}
]
}{
"error": {
"code": "invalid_request",
"message": "limit must be a whole number from 1 to 100."
}
}{
"error": {
"code": "unauthorized",
"message": "Send your API key as: Authorization: Bearer obl_…"
}
}{
"error": {
"code": "not_enabled",
"message": "The API isn't turned on for this account yet."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. The limit is 120 per minute per key."
}
}{
"error": {
"code": "unauthorized",
"message": "<string>"
}
}Clients
Add or update clients
Adds or updates up to 500 clients. A client is found by external_id, otherwise by name + street address + ZIP (all three). Blank or missing fields never erase what’s saved. A client who already has a different external_id is reported as a conflict, not merged. You get one result per client, in the order you sent them. If saving fails part-way, nothing in the request is saved (500).
POST
/
clients
Add or update clients
curl --request POST \
--url https://app.outboundlegal.com/api/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clients": [
{
"external_id": "M-1042",
"first_name": "Ana",
"last_name": "Diaz",
"address_line1": "12 Elm St",
"city": "Newark",
"state": "NJ",
"zip": "07102",
"case_type": "Motor vehicle accident"
}
]
}
'import requests
url = "https://app.outboundlegal.com/api/v1/clients"
payload = { "clients": [
{
"external_id": "M-1042",
"first_name": "Ana",
"last_name": "Diaz",
"address_line1": "12 Elm St",
"city": "Newark",
"state": "NJ",
"zip": "07102",
"case_type": "Motor vehicle accident"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clients: [
{
external_id: 'M-1042',
first_name: 'Ana',
last_name: 'Diaz',
address_line1: '12 Elm St',
city: 'Newark',
state: 'NJ',
zip: '07102',
case_type: 'Motor vehicle accident'
}
]
})
};
fetch('https://app.outboundlegal.com/api/v1/clients', 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://app.outboundlegal.com/api/v1/clients",
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([
'clients' => [
[
'external_id' => 'M-1042',
'first_name' => 'Ana',
'last_name' => 'Diaz',
'address_line1' => '12 Elm St',
'city' => 'Newark',
'state' => 'NJ',
'zip' => '07102',
'case_type' => 'Motor vehicle accident'
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.outboundlegal.com/api/v1/clients"
payload := strings.NewReader("{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://app.outboundlegal.com/api/v1/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.outboundlegal.com/api/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clients\": [\n {\n \"external_id\": \"M-1042\",\n \"first_name\": \"Ana\",\n \"last_name\": \"Diaz\",\n \"address_line1\": \"12 Elm St\",\n \"city\": \"Newark\",\n \"state\": \"NJ\",\n \"zip\": \"07102\",\n \"case_type\": \"Motor vehicle accident\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"index": 0,
"status": "created",
"id": "0b6c1d8e-6a43-4c1e-9d0f-2f5b9a7e4c21"
}
]
}{
"error": {
"code": "invalid_request",
"message": "limit must be a whole number from 1 to 100."
}
}{
"error": {
"code": "unauthorized",
"message": "Send your API key as: Authorization: Bearer obl_…"
}
}{
"error": {
"code": "not_enabled",
"message": "The API isn't turned on for this account yet."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. The limit is 120 per minute per key."
}
}{
"error": {
"code": "unauthorized",
"message": "<string>"
}
}Authorizations
An API key from Settings → Integrations → API keys. Keys look like obl_ followed by 43 letters, numbers, - or _.
Body
application/json
Maximum array length:
500Show child attributes
Show child attributes
Response
One result per client, in order. A client that failed checks has status: "error" and a message; the others are still saved.
Show child attributes
Show child attributes

