> ## Documentation Index > Fetch the complete documentation index at: https://www.bloxs.io/llms.txt > Use this file to discover all available pages before exploring further. # Add file to an organisation > Uploads a file and links it to the organisation. ## OpenAPI ````json POST /api/v1/relations/organisations/files { "openapi": "3.0.4", "info": { "title": "Relations V1", "description": "# Relation API Documentation\n\nWelcome to the Relationship Management API documentation. This API allows you to perform CRUD operations on various relationship types, including Owners, Persons, Suppliers, Estate Agents, and Organisations. \n\n## Authentication \n\nTo access the API, include your API key in the headers. Refer to our authentication documentation for details on obtaining and using your API key. \n\n## CRUD Operations \n\nThe API supports CRUD operations for the following relationship types: \n\n- **Owners**\n- **Persons**\n- **Suppliers**\n- **Estate Agents**\n- **Organisations**\n\nFor each relationship type, you can: \n\n- **GET**: Retrieve a list or apply filters.\n- **POST**: Add a new entry.\n- **PUT**: Update existing details.\n- **PATCH**: Apply partial updates.\n- **DELETE**: Remove an entry.\n\nThank you for choosing our Relation API. If you have any questions or need assistance, please contact our support team. \n", "version": "v1" }, "security": [ {} ], "tags": [ { "name": "Common" }, { "name": "CommunicationFormAPI" }, { "name": "EstateAgentAPI" }, { "name": "Metadata" }, { "name": "OrganisationAPI" }, { "name": "OwnerAPI" }, { "name": "PersonAPI" }, { "name": "RelationTypeAPI" }, { "name": "SupplierAPI" }, { "name": "SupplierTypeAPI" } ], "paths": { "/api/v1/relations/organisations/files": { "post": { "tags": [ "Relations" ], "summary": "Add file to an organisation", "description": "Uploads a file and links it to the organisation.", "operationId": "AddFileToOrganisation", "parameters": [ { "name": "reference", "in": "query", "description": "The internal identifier of the model (i.e. Reference, Code, Name, depends on model).", "schema": { "type": "string" } }, { "name": "externalIdentifier", "in": "query", "description": "The external API identifier of the model.", "schema": { "type": "string" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "File": { "type": "string", "format": "binary" } } }, "encoding": { "File": { "style": "form" } } }, "application/json": { "schema": { "type": "object", "properties": { "File": { "type": "string", "format": "binary" } } }, "encoding": { "File": { "style": "form" } } } } }, "responses": { "200": { "description": "The file was created" }, "400": { "description": "No file was uploaded" }, "404": { "description": "There was a problem attaching the file to the organisation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/APIErrorMessageModel" } } } } }, "x-d360-narrative-url": "

Add File to an Organisation

Uploads a file and attaches it to an existing organisation relation.

A developer calls this endpoint to store a document against an organisation's record, for example a signed contract, a Chamber of Commerce extract, or other supporting paperwork, so it can be retrieved later from within Bloxs.

The organisation to attach the file to is located via reference or externalIdentifier, at least one of which must be supplied.


Request Fields

Field

Type

Required

Description

reference

string

Required (at least one of reference or externalIdentifier must be given)

The internal identifier (Reference/Code) of the organisation to attach the file to.

externalIdentifier

string

Required (at least one of reference or externalIdentifier must be given)

The external API identifier of the organisation to attach the file to.

File

string (binary)

Required

The file to upload, sent as multipart/form-data (or as a base64-style binary field if submitted as application/json). If no file is included in the request, the call fails.


Response Fields

This endpoint returns no response body on success. A 200 response with content-length: 0 confirms the file was created and attached to the organisation, consistent with the behavior confirmed for the equivalent Person endpoint.

Field

Type

Required

Description

(none)

No fields are returned on success.

" } } }, "components": { "schemas": { "APIErrorMessageModel": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "traceId": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32" }, "errors": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" }, "nullable": true }, "nullable": true } }, "additionalProperties": false } } } } ````