curl --request POST \
--url https://public.api.live.turrisfi.com/v2/upstream/file-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'category=E&O' \
--form file=@example-file \
--form downstreamEntityAssociationId=507f1f77bcf86cd799439011const form = new FormData();
form.append('category', 'E&O');
form.append('file', '<string>');
form.append('downstreamEntityAssociationId', '507f1f77bcf86cd799439011');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://public.api.live.turrisfi.com/v2/upstream/file-documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/file-documents"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"category": "E&O",
"downstreamEntityAssociationId": "507f1f77bcf86cd799439011"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"data": {
"_id": "<string>",
"category": "W9",
"versions": [
{
"s3VersionId": "<string>",
"metadataModel": "<string>",
"metadataId": "<string>",
"metadata": {}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Upload a Document
Upload an agency’s compliance document, or a file for a Surplus Lines filing
curl --request POST \
--url https://public.api.live.turrisfi.com/v2/upstream/file-documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'category=E&O' \
--form file=@example-file \
--form downstreamEntityAssociationId=507f1f77bcf86cd799439011const form = new FormData();
form.append('category', 'E&O');
form.append('file', '<string>');
form.append('downstreamEntityAssociationId', '507f1f77bcf86cd799439011');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://public.api.live.turrisfi.com/v2/upstream/file-documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/file-documents"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"category": "E&O",
"downstreamEntityAssociationId": "507f1f77bcf86cd799439011"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"data": {
"_id": "<string>",
"category": "W9",
"versions": [
{
"s3VersionId": "<string>",
"metadataModel": "<string>",
"metadataId": "<string>",
"metadata": {}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}multipart/form-data, with the file in the file part. The category decides which of two jobs it does:
- A compliance document for one of the agencies you appoint: W9, E&O, Cyber, Crime & Fidelity, Producer Agreement, Other Contract or Other Document. PDF only. Send the agency’s
downstreamEntityAssociationId. Uploading the same category again for the same agency adds a version to the existing document. - A file for a Surplus Lines filing: category Surplus Lines. PDF, DOC, DOCX, JPEG or PNG. See below.
Surplus Lines uploads
The category Surplus Lines is for a file you will put on a Surplus Lines filing. LeavedownstreamEntityAssociationId out: the file belongs to the filing, not to an agency, and sending it returns 400. Every upload creates a new document; data._id is its id, which the attach calls take as fileDocumentId.
The file is on no filing until you attach it. Files on a Surplus Lines Filing walks through the whole flow: upload, attach, download.
To fetch any document back later, use Get a Download URL for a Document.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
UUID to ensure idempotent request processing
"550e8400-e29b-41d4-a716-446655440000"
Alternative UUID header for idempotent request processing
"550e8400-e29b-41d4-a716-446655440000"
Body
Document category. Surplus Lines accepts PDF, DOC, DOCX, JPEG and PNG and always creates a new document, which you then attach to a surplus-lines filing by id. Every other category accepts PDF only.
W9, E&O, Cyber, Crime & Fidelity, Producer Agreement, Other Contract, Other Document, Surplus Lines "E&O"
The file to upload, 10 MB maximum. PDF only, except Surplus Lines, which also accepts DOC, DOCX, JPEG and PNG.
Downstream entity association ID. Required for every category except Surplus Lines, and must be omitted for Surplus Lines.
"507f1f77bcf86cd799439011"
Was this page helpful?