Create Basic Policy
curl --request POST \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"policyNumber": "POL-2026-0001",
"policyStartDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyEndDate": {
"date": "2027-01-01",
"timezone": "America/New_York"
},
"policyEffectiveDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyType": "generalLiability",
"policyTimeZone": "America/New_York",
"primaryInsured": "550e8400-e29b-41d4-a716-446655440010",
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureName": "Acme Corporation",
"exposureType": "business"
}
]
}
'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies"
payload = {
"policyNumber": "POL-2026-0001",
"policyStartDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyEndDate": {
"date": "2027-01-01",
"timezone": "America/New_York"
},
"policyEffectiveDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyType": "generalLiability",
"policyTimeZone": "America/New_York",
"primaryInsured": "550e8400-e29b-41d4-a716-446655440010",
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureName": "Acme Corporation",
"exposureType": "business"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policyNumber: 'POL-2026-0001',
policyStartDate: {date: '2026-01-01', timezone: 'America/New_York'},
policyEndDate: {date: '2027-01-01', timezone: 'America/New_York'},
policyEffectiveDate: {date: '2026-01-01', timezone: 'America/New_York'},
policyType: 'generalLiability',
policyTimeZone: 'America/New_York',
primaryInsured: '550e8400-e29b-41d4-a716-446655440010',
exposures: [
{
id: '550e8400-e29b-41d4-a716-446655440010',
exposureName: 'Acme Corporation',
exposureType: 'business'
}
]
})
};
fetch('https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies', 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.aiinsurance.io/api/v1/external/companies/{companyId}/policies",
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([
'policyNumber' => 'POL-2026-0001',
'policyStartDate' => [
'date' => '2026-01-01',
'timezone' => 'America/New_York'
],
'policyEndDate' => [
'date' => '2027-01-01',
'timezone' => 'America/New_York'
],
'policyEffectiveDate' => [
'date' => '2026-01-01',
'timezone' => 'America/New_York'
],
'policyType' => 'generalLiability',
'policyTimeZone' => 'America/New_York',
'primaryInsured' => '550e8400-e29b-41d4-a716-446655440010',
'exposures' => [
[
'id' => '550e8400-e29b-41d4-a716-446655440010',
'exposureName' => 'Acme Corporation',
'exposureType' => 'business'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.aiinsurance.io/api/v1/external/companies/{companyId}/policies"
payload := strings.NewReader("{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.aiinsurance.io/api/v1/external/companies/{companyId}/policies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440001"
}
Basic Policies
Create Basic Policy
Creates a new basic policy. The request body is a flat object of
company-configured fields plus a nested exposures array.
Each exposure’s id (and the top-level primaryInsured) must
reference an existing exposure record — create exposures first via
the Exposures API.
Additional company-configured fields (custom text, number, option-set, or object fields) may be included alongside the required fields below.
Required permission: company.policy:create
POST
/
api
/
v1
/
external
/
companies
/
{companyId}
/
policies
Create Basic Policy
curl --request POST \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"policyNumber": "POL-2026-0001",
"policyStartDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyEndDate": {
"date": "2027-01-01",
"timezone": "America/New_York"
},
"policyEffectiveDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyType": "generalLiability",
"policyTimeZone": "America/New_York",
"primaryInsured": "550e8400-e29b-41d4-a716-446655440010",
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureName": "Acme Corporation",
"exposureType": "business"
}
]
}
'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies"
payload = {
"policyNumber": "POL-2026-0001",
"policyStartDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyEndDate": {
"date": "2027-01-01",
"timezone": "America/New_York"
},
"policyEffectiveDate": {
"date": "2026-01-01",
"timezone": "America/New_York"
},
"policyType": "generalLiability",
"policyTimeZone": "America/New_York",
"primaryInsured": "550e8400-e29b-41d4-a716-446655440010",
"exposures": [
{
"id": "550e8400-e29b-41d4-a716-446655440010",
"exposureName": "Acme Corporation",
"exposureType": "business"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
policyNumber: 'POL-2026-0001',
policyStartDate: {date: '2026-01-01', timezone: 'America/New_York'},
policyEndDate: {date: '2027-01-01', timezone: 'America/New_York'},
policyEffectiveDate: {date: '2026-01-01', timezone: 'America/New_York'},
policyType: 'generalLiability',
policyTimeZone: 'America/New_York',
primaryInsured: '550e8400-e29b-41d4-a716-446655440010',
exposures: [
{
id: '550e8400-e29b-41d4-a716-446655440010',
exposureName: 'Acme Corporation',
exposureType: 'business'
}
]
})
};
fetch('https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies', 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.aiinsurance.io/api/v1/external/companies/{companyId}/policies",
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([
'policyNumber' => 'POL-2026-0001',
'policyStartDate' => [
'date' => '2026-01-01',
'timezone' => 'America/New_York'
],
'policyEndDate' => [
'date' => '2027-01-01',
'timezone' => 'America/New_York'
],
'policyEffectiveDate' => [
'date' => '2026-01-01',
'timezone' => 'America/New_York'
],
'policyType' => 'generalLiability',
'policyTimeZone' => 'America/New_York',
'primaryInsured' => '550e8400-e29b-41d4-a716-446655440010',
'exposures' => [
[
'id' => '550e8400-e29b-41d4-a716-446655440010',
'exposureName' => 'Acme Corporation',
'exposureType' => 'business'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.aiinsurance.io/api/v1/external/companies/{companyId}/policies"
payload := strings.NewReader("{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.aiinsurance.io/api/v1/external/companies/{companyId}/policies")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"policyNumber\": \"POL-2026-0001\",\n \"policyStartDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEndDate\": {\n \"date\": \"2027-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyEffectiveDate\": {\n \"date\": \"2026-01-01\",\n \"timezone\": \"America/New_York\"\n },\n \"policyType\": \"generalLiability\",\n \"policyTimeZone\": \"America/New_York\",\n \"primaryInsured\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposures\": [\n {\n \"id\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"exposureName\": \"Acme Corporation\",\n \"exposureType\": \"business\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440001"
}
Authorizations
Body
application/json
Was this page helpful?
