Create location
curl --request POST \
--url https://api.wellapp.ai/v1/locations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "location",
"attributes": {
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": true,
"is_registered": true
},
"relationships": {
"persons": {
"data": [
{
"type": "people",
"id": "people1"
}
]
},
"companies": {
"data": [
{
"type": "company",
"id": "company_tenant"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/locations"
payload = {
"type": "location",
"attributes": {
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": True,
"is_registered": True
},
"relationships": {
"persons": { "data": [
{
"type": "people",
"id": "people1"
}
] },
"companies": { "data": [
{
"type": "company",
"id": "company_tenant"
}
] },
"workspaces": { "data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
] }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'location',
attributes: {
address_line1: '123 Turing Way',
address_line2: '',
city: 'London',
region: 'Greater London',
postal_code: 'E1 6AN',
country: 'GB',
latitude: 37.7749,
longitude: -122.4194,
is_primary: true,
is_registered: true
},
relationships: {
persons: {data: [{type: 'people', id: 'people1'}]},
companies: {data: [{type: 'company', id: 'company_tenant'}]},
workspaces: {data: [{type: 'workspace', id: 'workspace_tenant'}]}
}
})
};
fetch('https://api.wellapp.ai/v1/locations', 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.wellapp.ai/v1/locations",
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([
'type' => 'location',
'attributes' => [
'address_line1' => '123 Turing Way',
'address_line2' => '',
'city' => 'London',
'region' => 'Greater London',
'postal_code' => 'E1 6AN',
'country' => 'GB',
'latitude' => 37.7749,
'longitude' => -122.4194,
'is_primary' => true,
'is_registered' => true
],
'relationships' => [
'persons' => [
'data' => [
[
'type' => 'people',
'id' => 'people1'
]
]
],
'companies' => [
'data' => [
[
'type' => 'company',
'id' => 'company_tenant'
]
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => 'workspace_tenant'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/locations"
payload := strings.NewReader("{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/locations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "location",
"id": "loc1",
"attributes": {
"full_address": "123 Turing Way, London, Greater London, E1 6AN, GB",
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": true,
"is_registered": true,
"created_at": "2025-06-01T10:00:00Z",
"updated_at": "2025-06-01T10:00:00Z"
},
"relationships": {
"persons": {
"data": [
{
"type": "people",
"id": "people1"
}
]
},
"companies": {
"data": [
{
"type": "company",
"id": "company_tenant"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
}
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "Alan",
"last_name": "Turing",
"full_name": "Alan Turing",
"created_at": "2025-06-01T09:00:00Z",
"updated_at": "2025-06-01T09:00:00Z"
}
},
{
"type": "company",
"id": "company_tenant",
"attributes": {
"name": "Tech Innovations Ltd",
"description": "Leading technology research company",
"locale": "en",
"domain_name_primary_link_url": "techinnovations.com",
"tax_id": {
"value": "GB123456789",
"type": "VAT"
},
"registration": {
"trade_name": "Tech Innovations",
"registered_name": "Tech Innovations Limited"
},
"registration_number": {
"business_type": "Ltd",
"value": "12345678",
"registry_name": "Companies House",
"registry_country": "GB"
},
"created_at": "2025-05-15T08:00:00Z",
"updated_at": "2025-05-15T08:00:00Z"
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "UK Operations Workspace",
"description": "Workspace for UK-based operations and teams",
"avatar_color": "#2E86AB",
"external_workspace_id": "uk_ops_ws_001",
"auto_extract_enabled": true,
"created_at": "2025-05-20T10:00:00Z",
"updated_at": "2025-05-20T10:00:00Z"
}
}
]
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Location
Create Location
Create a new address/location with geographic coordinates and associate it with people, companies, or workspaces.
POST
/
v1
/
locations
Create location
curl --request POST \
--url https://api.wellapp.ai/v1/locations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "location",
"attributes": {
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": true,
"is_registered": true
},
"relationships": {
"persons": {
"data": [
{
"type": "people",
"id": "people1"
}
]
},
"companies": {
"data": [
{
"type": "company",
"id": "company_tenant"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
}
}
'import requests
url = "https://api.wellapp.ai/v1/locations"
payload = {
"type": "location",
"attributes": {
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": True,
"is_registered": True
},
"relationships": {
"persons": { "data": [
{
"type": "people",
"id": "people1"
}
] },
"companies": { "data": [
{
"type": "company",
"id": "company_tenant"
}
] },
"workspaces": { "data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
] }
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'location',
attributes: {
address_line1: '123 Turing Way',
address_line2: '',
city: 'London',
region: 'Greater London',
postal_code: 'E1 6AN',
country: 'GB',
latitude: 37.7749,
longitude: -122.4194,
is_primary: true,
is_registered: true
},
relationships: {
persons: {data: [{type: 'people', id: 'people1'}]},
companies: {data: [{type: 'company', id: 'company_tenant'}]},
workspaces: {data: [{type: 'workspace', id: 'workspace_tenant'}]}
}
})
};
fetch('https://api.wellapp.ai/v1/locations', 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.wellapp.ai/v1/locations",
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([
'type' => 'location',
'attributes' => [
'address_line1' => '123 Turing Way',
'address_line2' => '',
'city' => 'London',
'region' => 'Greater London',
'postal_code' => 'E1 6AN',
'country' => 'GB',
'latitude' => 37.7749,
'longitude' => -122.4194,
'is_primary' => true,
'is_registered' => true
],
'relationships' => [
'persons' => [
'data' => [
[
'type' => 'people',
'id' => 'people1'
]
]
],
'companies' => [
'data' => [
[
'type' => 'company',
'id' => 'company_tenant'
]
]
],
'workspaces' => [
'data' => [
[
'type' => 'workspace',
'id' => 'workspace_tenant'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.wellapp.ai/v1/locations"
payload := strings.NewReader("{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.wellapp.ai/v1/locations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"location\",\n \"attributes\": {\n \"address_line1\": \"123 Turing Way\",\n \"address_line2\": \"\",\n \"city\": \"London\",\n \"region\": \"Greater London\",\n \"postal_code\": \"E1 6AN\",\n \"country\": \"GB\",\n \"latitude\": 37.7749,\n \"longitude\": -122.4194,\n \"is_primary\": true,\n \"is_registered\": true\n },\n \"relationships\": {\n \"persons\": {\n \"data\": [\n {\n \"type\": \"people\",\n \"id\": \"people1\"\n }\n ]\n },\n \"companies\": {\n \"data\": [\n {\n \"type\": \"company\",\n \"id\": \"company_tenant\"\n }\n ]\n },\n \"workspaces\": {\n \"data\": [\n {\n \"type\": \"workspace\",\n \"id\": \"workspace_tenant\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"type": "location",
"id": "loc1",
"attributes": {
"full_address": "123 Turing Way, London, Greater London, E1 6AN, GB",
"address_line1": "123 Turing Way",
"address_line2": "",
"city": "London",
"region": "Greater London",
"postal_code": "E1 6AN",
"country": "GB",
"latitude": 37.7749,
"longitude": -122.4194,
"is_primary": true,
"is_registered": true,
"created_at": "2025-06-01T10:00:00Z",
"updated_at": "2025-06-01T10:00:00Z"
},
"relationships": {
"persons": {
"data": [
{
"type": "people",
"id": "people1"
}
]
},
"companies": {
"data": [
{
"type": "company",
"id": "company_tenant"
}
]
},
"workspaces": {
"data": [
{
"type": "workspace",
"id": "workspace_tenant"
}
]
}
}
},
"included": [
{
"type": "people",
"id": "people1",
"attributes": {
"first_name": "Alan",
"last_name": "Turing",
"full_name": "Alan Turing",
"created_at": "2025-06-01T09:00:00Z",
"updated_at": "2025-06-01T09:00:00Z"
}
},
{
"type": "company",
"id": "company_tenant",
"attributes": {
"name": "Tech Innovations Ltd",
"description": "Leading technology research company",
"locale": "en",
"domain_name_primary_link_url": "techinnovations.com",
"tax_id": {
"value": "GB123456789",
"type": "VAT"
},
"registration": {
"trade_name": "Tech Innovations",
"registered_name": "Tech Innovations Limited"
},
"registration_number": {
"business_type": "Ltd",
"value": "12345678",
"registry_name": "Companies House",
"registry_country": "GB"
},
"created_at": "2025-05-15T08:00:00Z",
"updated_at": "2025-05-15T08:00:00Z"
}
},
{
"type": "workspace",
"id": "workspace_tenant",
"attributes": {
"name": "UK Operations Workspace",
"description": "Workspace for UK-based operations and teams",
"avatar_color": "#2E86AB",
"external_workspace_id": "uk_ops_ws_001",
"auto_extract_enabled": true,
"created_at": "2025-05-20T10:00:00Z",
"updated_at": "2025-05-20T10:00:00Z"
}
}
]
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}⌘I