Sixfold API (2024-05)

Download OpenAPI specification:Download

Release Notes

Version: 2024-05

  • Enhances the case creation endpoint to accept documents to attach to the new case
  • Add a new endpoint to attach one or more documents to an existing case
  • Defines a new schema for cases and related entities
  • Add Life API support for creating cases

Version: 2023-12

For more detailed documentation of this version, refer to our legacy API docs site.

Introduction

Greetings from Sixfold! We're excited to provide you with documentation for our API that allows you to seamlessly interact with our generative AI solution for insurance underwriters.

Key Features

Getting Started

To get started with the Sixfold API, use the guides, code examples, and reference documentation on this page. We will coordinate with you to complete the following set-up steps:

  • Base URL: Receive a base URL specific to your environment
  • API Key: Receive a an API key
  • Webhook URL: Share a URL where we can send important events about a case (optional)

Read more about these steps below.

Base URL

We will provide a base URL for your dedicated environment. This URL will be unique to your tenancy.

API Key

We will generate and share an API key for your environment via secure send.

For more details on how to use your API key, refer to the Authorization section below.

Webhooks

If you provide us with a webhook URL, we can send you events about your cases in real time. This is an optional step, but it can be helpful if you need to know quickly when a case changes state.

For more details on how to use webhooks, refer to the Webhooks section below.

Security

Transport Layer Security

We require all API calls to be made over secure connections using HTTPS. We require a minimum of TLS 1.2.

Authorization

You MUST include the Sixfold API key you were issued in a custom header for each API request.

Example: SIXFOLD-API-KEY: <your key>

Field Types

Type Description Example
IDS Object identifiers are unique opaque strings. Clients should not attach any specific semantic meaning to the format of our IDs. For example, our object IDs are UUIDs today, but clients should not count on that behavior, because we may stop using UUIDs at any time. c4fb4c10-5b2e-4220-90d2-96d94337e8e6
STRINGS Strings are encoded using UTF-8. They do not have character limits. Diamond West Construction
DATES All dates are represented in ISO 8601 format YYYY-MM-DD. 2024-01-10
TIMESTAMPS All object responses will include a createdAt and updatedAt in timestamp format. All timestamps are UTC and represented in ISO 8601 format YYYY-MM-DDThh:mm:ssZ. 2024-01-10T16:00:30Z
BOOLEANS Boolean values are represented as as true or false. true
NULL All optional fields are set to null unless a default value is set. null

Status Codes & Errors

Status Codes

Code Description
200 OK. Indicates the request was successful.
201 Created. Indicates that the request was successful and has led to the creation of a resource.

Error Codes

Code Description
400 Bad Request. Occurs when your request is malformed in some way that does not match a more specific 4xx code.
401 Unauthorized. Occurs when your request omitted an API key or specified an invalid key.
404 Not Found. Occurs when you requested a resource which doesn’t exist. This could signify an incorrect API endpoint URL or an incorrect object ID.
413 Content Too Large. Occurs when the size of the request entity exceeds the limit defined in the request limits section below.
429 Too Many Requests. Occurs when exceeding the request rate limit defined in the request limits section below.
500 Internal Server Error. Occurs when Sixfold encounters an error serving the request. This is a usually a temporary occurrence, so your best bet is to retry again after a short time.
503 Service Unavailable. Typically occurs when the API is down for maintenance.

Document Errors

When creating a case or attaching documents to a case, each document must be uploaded as a separate file. The server will respond with 200 OK if all files are processed successfully. If we can't process all of the files included in a request, the entire request will fail. In this case, the response will include a separate error message for each file that failed.

Versioning

Our API uses URI date-based versioning.

Example: POST /api/2023-12/cases

We will always issue a new version of our API if we need to make changes that would break existing clients. Some examples of breaking changes include:

  • Removing functionality
  • Renaming parameters
  • Changing endpoint requirements

We may include backward-compatible changes in the current version of our API. These changes are designed to improve the API without breaking existing clients. Examples include:

  • Adding new API endpoints
  • Adding new optional request parameters to existing API methods
  • Adding new fields to existing API responses

Limits

This section describes how limits are applied in the Sixfold API.

Request Rate

You may not send more than 300 requests per minute. If you exceed this limit, the server will respond with 429 - Too Many Requests and block further requests for a short time.

Request Size

No request body may be larger than 50 megabytes. If you exceed this limit, the server will respond with 413 - Content Too Large.

2024-05 Commercial

This API provides access to the Sixfold generative AI solution for insurance underwriters

Create a commercial case

SecurityApiKeyAuth
Request
Request Body schema:
required
required
object
Responses
201

Case created successfully

400

Bad Request

401

Unauthorized

409

Conflict

422

Unprocessable Entity

500

Internal Server Error

post/2024-05/commercial/cases
Request samples
{
  • "case": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get all commercial cases

SecurityApiKeyAuth
Request
query Parameters
external_id
string

Filter cases by unique external id

Example: external_id=bda31907-49ad-4cf2-b76f-7738f359ae5e
Responses
200

Cases retrieved successfully

401

Unauthorized

404

Not Found

get/2024-05/commercial/cases
Request samples
Response samples
application/json
{
  • "data": [
    ]
}

Get a commercial case

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Responses
200

Case retrieved successfully

401

Unauthorized

404

Not Found

get/2024-05/commercial/cases/{case_id}
Request samples
Response samples
application/json
{
  • "data": {
    }
}

Export a commercial case as PDF

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Responses
200

PDF exported successfully

401

Unauthorized

404

Not Found

get/2024-05/commercial/cases/{case_id}.pdf
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}

Add documents to a commercial case

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Request Body schema: multipart/form-data
required
documents[]
required
Array of strings <binary>

Array of documents to be uploaded.

Responses
201

Documents added successfully

400

Bad Request

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

post/2024-05/commercial/cases/{case_id}/documents
Request samples
Response samples
application/json
{
  • "data": [
    ]
}

Add or update a quote to a commercial case

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Request Body schema: application/json
required
quoted
required
boolean (Quote)

Boolean value representing whether a case has been quoted

Responses
204

Quote created or updated successfully

400

Bad Request

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

post/2024-05/commercial/cases/{case_id}/quote
Request samples
application/json
{
  • "quoted": true
}
Response samples
application/json
{ }

Remove a quote from a commercial case

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Responses
204

Quote deleted successfully

400

Bad Request

401

Unauthorized

422

Unprocessable Entity

500

Internal Server Error

delete/2024-05/commercial/cases/{case_id}/quote
Request samples
Response samples
application/json
{ }

2024-05 Life and Disability (Coming Soon)

This API is under active development and will provide access to the Sixfold generative AI solution for insurance underwriters

Create a life case

SecurityApiKeyAuth
Request
Request Body schema: application/json
required
required
object
Responses
201

Case created successfully

400

Bad Request

401

Unauthorized

409

Conflict

422

Unprocessable Entity

500

Internal Server Error

post/2024-05/life/cases
Request samples
application/json
{
  • "case": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

Get all life cases

SecurityApiKeyAuth
Request
query Parameters
external_id
string

Filter cases by unique external id

Example: external_id=bda31907-49ad-4cf2-b76f-7738f359ae5e
Responses
200

Cases retrieved successfully

401

Unauthorized

404

Not Found

get/2024-05/life/cases
Request samples
Response samples
application/json
{
  • "data": [
    ]
}

Get a life case

SecurityApiKeyAuth
Request
path Parameters
case_id
required
string
Example: c4fb4c10-5b2e-4220-90d2-96d94337e8e6
Responses
200

Case retrieved successfully

401

Unauthorized

404

Not Found

get/2024-05/life/cases/{case_id}
Request samples
Response samples
application/json
{
  • "data": {
    }
}

2024-05 Webhooks

Webhooks allow us to send important events about a case to you in real-time.

Requirements

  • Your webhook resource MUST accept requests with content type application/json
  • Your webhook resource MUST return a response with a 200 status to indicate that the request was processed successfully

Custom Headers

You can optionally specify custom headers for us to send in webhook requests. This is useful when, for example, your webhook resource requires us to provide an authentication token in a header.

Webhook Topics

A webhook's topic indicates the type of event that triggered the webhook. The topic is included in the request body sent to your webhook URL. Supported webhook topics include:

Topic Description
cases/created a case was successfully created
cases/updated a case was successfully updated
cases/finished a case has completed the analysis
cases/errored a case encountered an error during the analysis

Examples

Commercial Example Request

Below is an example of a webhook request sent when a commercial case is updated:

    {
      "id": "c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
      "topic": "cases/updated"
      "body": {
        "data": {
          "id": "c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
          "type": "case",
          "attributes": {
            "name": "Diamond West Construction Case",
            "insuredCompany": {
              "name": "Diamond West Construction",
              "businessActivity": "Construction",
              "summary": "A general building contractor that offers home remodeling and design-build services.",
              "webPresence": {
                "urls": [
                  "https://diamondwestdevelopment.com/about-us/",
                  "https://diamondwestdevelopment.com/",
                  "http://diamondwestconstruction.mobi/",
                  "https://diamondwestdevelopment.com/gallery/",
                  "https://diamondwestdevelopment.com/services/"
                ]
              },
              "businessClassification": {
                "system": "naics",
                "code": "236118",
                "title": "Residential Remodelers",
                "description": "236118 - Residential Remodelers The business summary indicates that this is a general building contractor that offers home remodeling and design-build services. This aligns directly with the NAICS code 236118, which is designated for businesses primarily responsible for remodeling construction of houses and other residential buildings. The services offered by the business, such as home remodeling and design-build, are specifically mentioned in the NAICS context as activities included in this industry. The business is likely to serve customers who own residential properties, including single-family and multifamily homes, who are looking to remodel or renovate their properties. This is why the NAICS code 236118 - Residential Remodelers is assigned with high confidence.",
                "confidence": 0.95
              },
              "address": {
                "street": "6676 Van Buren Boulevard",
                "city": "Riverside",
                "state": "CA",
                "postalCode": "92503",
                "country": "US"
              }
            },
            "analysis": {
              "status": "done",
              "riskEvaluation": {
                "score": 4,
                "summary": "We have determined a risk score of 4 given the lack of negative risk signals detected."
              },
              "riskSignalDetections": [
                {
                  "signal": {
                    "type": "keyword",
                    "code": "1234",
                    "title": "Construction"
                  }
                  "explanation": "The business is involved in construction activities as evidenced by the various permits for building, plumbing, mechanical, and grading. These permits indicate that the business is engaged in constructing new structures, remodeling existing ones, and installing various systems, which are all activities related to construction."
                },
                {
                  "signal": {
                    "type": "keyword",
                    "code": "5678",
                    "title": "Remodeling"
                  }
                  "explanation": "The business is involved in remodeling activities as evidenced by the various permits for building, plumbing, mechanical, and grading. These permits indicate that the business is engaged in remodeling existing structures, which is an activity related to remodeling."
                }
              ],
            },
            "documents": [
              {
                "id": "0544e627-5c81-49da-99bc-a2822ead6b99",
                "filename": "file 1.pdf",
                "contentType": "application/pdf",
                "byteSize": 123456
              }
            ],
            "alternateUrl": "https://{tenant}.sixfold.app/commercial/cases/c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
            "createdAt": "2023-01-10T16:00:30+0:00",
            "updatedAt": "2023-01-10T16:05:30+0:00"
          }
        }
      }
    }

Life & Disability Example Request

Below is an example of a webhook request sent when a life & disability case is updated:

    {
      "id": "c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
      "topic": "cases/updated"
      "body": {
        "data": {
          "id": "c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
          "type": "lifeCases",
          "attributes": {
            "name": "Jane Doe",
            "documentsCount": 123,
            "externalId": "client-custom-identifier",
            "alternateUrl": "https://{tenant}.sixfold.app/life/cases/c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
            "insuredPerson": {
              "name": "Jane Doe",
              "bornOn": "1950-12-31",
              "occupation": "Construction Worker",
              "sex": "female"
            },
            "analysis": {
              "status": "done",
              "errors": [],
              "riskSignalDetections": [
                {
                    "type": "keywordSignal",
                    "keyword": "Cancer"
                  }
              ],
              "lifeRiskOverview": "Jane Doe, a 74-year-old female who smokes, has a history of several significant medical conditions and treatments. She has been diagnosed with strep pharyngitis, appendicitis, migraines with aura, atypical chest pain concerning for angina, community-acquired pneumonia,\n",
              "fullHealthSummary": "Jane Doe's medical history is extensive, beginning with diagnoses of strep pharyngitis in 1980 treated with clindamycin due to penicillin allergy, and appendicitis in 1987, both of which were treated accordingly. In 1993, she was diagnosed with migraines with aura and began treatment with metoclopramide and sumatriptan. By 2000, she experienced atypical chest pain, which raised concerns for angina, leading to a cardiology referral and the initiation of ASA. In 2006, she was diagnosed with community-acquired pneumonia and subsequently with chronic myeloid leukemia (CML) in 2013, which is currently in remission with ongoing imatinib treatment. Her history also includes a COPD exacerbation in 2016 treated with albuterol and Advair, and orthostatic hypotension diagnosed in 2018, with a treatment plan including fludrocortisone. Throughout her medical journey, Jennifer has been prescribed various medications, including ASA for atypical chest pain and post-myocardial infarction, atenolol and atorvastatin for coronary artery disease post-myocardial infarction, and imatinib specifically targeting her CML. The presence of atenolol and atorvastatin suggests a focus on heart health and cholesterol, while imatinib specifically targets her CML. Notably, there is an absence of direct treatment for high blood pressure, despite the presence of medications that could indirectly affect it, and no mention of medications for mental health conditions or sleep apnea, which are not listed among her diagnosed conditions.\n",
              "factsCount": 321
            },
            "createdAt": "2024-01-10T16:00:30Z",
            "updatedAt": "2024-01-10T16:00:30Z"
          }
        }
      }
    }

Example Request with Custom Headers

Below is an example of a webhook request that includes a custom Auth-Token header for authentication:

POST /webhooks HTTP/1.1
Host: foo.example
Accept: application/json
Content-Type: application/json
Auth-Token: secret-custom-header

{
  "id": "c4fb4c10-5b2e-4220-90d2-96d94337e8e6",
  "topic": "cases/updated",
  "body": {
    "data": {
      ...
    }
  },
}