Skip to main content

Attachments

Base URL: https://app.neuroflash.com/api/attachment-service

Upload Attachment

POST/conversations/{conversation_id}/attachments

Path Parameters

ParameterTypeRequiredDescription
conversation_idstringYes

Request Body

FieldTypeRequiredDescription
base64ContentobjectNoBase64-encoded file content. Mutually exclusive with contentUrl; exactly one of the two must be provided. Maximum decoded file size is 10 MB.
contentUrlobjectNoHTTP(S) URL the file content is downloaded from. Mutually exclusive with base64Content; exactly one of the two must be provided. Maximum downloaded file size is 10 MB.
mimeTypeobjectNoMIME type of the file. Optional for text-based formats: when omitted, or set to text/plain, the type is derived from the filename extension. For binary formats it is required and must match the file content.
filenamestringYesOriginal filename of the attachment.

Response

FieldTypeDescription
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring

Example

curl -X POST "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base64Content": {},
"contentUrl": {},
"mimeType": {},
"filename": "string"
}'

Response:

{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}

List Attachments

GET/conversations/{conversation_id}/attachments

Path Parameters

ParameterTypeRequiredDescription
conversation_idstringYes

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based)
sizeinteger20Number of elements per page
excludedFieldsstring

Response

FieldTypeDescription
dataarray<object>
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring
pageobject
sizeinteger
totalElementsinteger
totalPagesinteger
currentPageinteger

Example

curl "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"data": [
{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}
],
"page": {
"size": 0,
"totalElements": 0,
"totalPages": 0,
"currentPage": 0
}
}

Delete Attachment

DELETE/conversations/{conversation_id}/attachments/{attachment_id}

Path Parameters

ParameterTypeRequiredDescription
conversation_idstringYes
attachment_idstringYes

Example

curl -X DELETE "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments/{attachment_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{}

Get Attachment

GET/attachments/{attachment_id}

Path Parameters

ParameterTypeRequiredDescription
attachment_idstringYes

Query Parameters

ParameterTypeDefaultDescription
excludedFieldsstring

Response

FieldTypeDescription
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring

Example

curl "https://app.neuroflash.com/api/attachment-service/attachments/{attachment_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}