Create Quote
curl --request POST \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"submissionId": "550e8400-e29b-41d4-a716-446655440010",
"quote": {
"policyStartDate": "2025-01-01",
"policyEndDate": "2026-01-01",
"policyType": "new_business",
"policyTimeZone": "America/New_York",
"premium": 15000
},
"exposures": [
{
"exposureName": "Acme Corp",
"employeeCount": 150
}
]
}
'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes"
payload = {
"submissionId": "550e8400-e29b-41d4-a716-446655440010",
"quote": {
"policyStartDate": "2025-01-01",
"policyEndDate": "2026-01-01",
"policyType": "new_business",
"policyTimeZone": "America/New_York",
"premium": 15000
},
"exposures": [
{
"exposureName": "Acme Corp",
"employeeCount": 150
}
]
}
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({
submissionId: '550e8400-e29b-41d4-a716-446655440010',
quote: {
policyStartDate: '2025-01-01',
policyEndDate: '2026-01-01',
policyType: 'new_business',
policyTimeZone: 'America/New_York',
premium: 15000
},
exposures: [{exposureName: 'Acme Corp', employeeCount: 150}]
})
};
fetch('https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes', 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}/quotes",
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([
'submissionId' => '550e8400-e29b-41d4-a716-446655440010',
'quote' => [
'policyStartDate' => '2025-01-01',
'policyEndDate' => '2026-01-01',
'policyType' => 'new_business',
'policyTimeZone' => 'America/New_York',
'premium' => 15000
],
'exposures' => [
[
'exposureName' => 'Acme Corp',
'employeeCount' => 150
]
]
]),
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}/quotes"
payload := strings.NewReader("{\n \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\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}/quotes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes")
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 \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440001"
}Quotes
Create Quote
Creates a new Field Model V1 quote.
The quote and exposures fields contain custom field data where keys
are field referenceIds defined in the company’s field configuration.
Use the Configuration endpoint
to discover available fields.
Required fields in quote: policyStartDate, policyEndDate,
policyType, policyTimeZone. Fields like policyNumber and
policyEffectiveDate are not required.
Lifecycle fields (quoteType, quoteStatus, quoteNumber,
quoteBindErrors, quoteSubmissionId) are system-managed and will be
rejected with a 400 error if included in the request.
Required permission: company.quote:create
POST
/
api
/
v1
/
external
/
companies
/
{companyId}
/
quotes
Create Quote
curl --request POST \
--url https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"submissionId": "550e8400-e29b-41d4-a716-446655440010",
"quote": {
"policyStartDate": "2025-01-01",
"policyEndDate": "2026-01-01",
"policyType": "new_business",
"policyTimeZone": "America/New_York",
"premium": 15000
},
"exposures": [
{
"exposureName": "Acme Corp",
"employeeCount": 150
}
]
}
'import requests
url = "https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes"
payload = {
"submissionId": "550e8400-e29b-41d4-a716-446655440010",
"quote": {
"policyStartDate": "2025-01-01",
"policyEndDate": "2026-01-01",
"policyType": "new_business",
"policyTimeZone": "America/New_York",
"premium": 15000
},
"exposures": [
{
"exposureName": "Acme Corp",
"employeeCount": 150
}
]
}
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({
submissionId: '550e8400-e29b-41d4-a716-446655440010',
quote: {
policyStartDate: '2025-01-01',
policyEndDate: '2026-01-01',
policyType: 'new_business',
policyTimeZone: 'America/New_York',
premium: 15000
},
exposures: [{exposureName: 'Acme Corp', employeeCount: 150}]
})
};
fetch('https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes', 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}/quotes",
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([
'submissionId' => '550e8400-e29b-41d4-a716-446655440010',
'quote' => [
'policyStartDate' => '2025-01-01',
'policyEndDate' => '2026-01-01',
'policyType' => 'new_business',
'policyTimeZone' => 'America/New_York',
'premium' => 15000
],
'exposures' => [
[
'exposureName' => 'Acme Corp',
'employeeCount' => 150
]
]
]),
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}/quotes"
payload := strings.NewReader("{\n \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\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}/quotes")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.aiinsurance.io/api/v1/external/companies/{companyId}/quotes")
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 \"submissionId\": \"550e8400-e29b-41d4-a716-446655440010\",\n \"quote\": {\n \"policyStartDate\": \"2025-01-01\",\n \"policyEndDate\": \"2026-01-01\",\n \"policyType\": \"new_business\",\n \"policyTimeZone\": \"America/New_York\",\n \"premium\": 15000\n },\n \"exposures\": [\n {\n \"exposureName\": \"Acme Corp\",\n \"employeeCount\": 150\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440001"
}Authorizations
API key authentication. Include your API key in the Authorization header.
Path Parameters
Company identifier
Body
application/json
Response
Quote created
Newly created quote ID
Was this page helpful?
⌘I
