Open in TheBrain

Customer Reply — Christian Wehrli, Attachment API Fix #100718

https://thebrain.zendesk.com/agent/tickets/100718

Hello Christian,

Thank you for the detailed follow-up.

The issue with uploaded file attachments not appearing in:

GET /thoughts/{brainId}/{thoughtId}/attachments

has now been fixed.

Could you please test this again on your side and confirm whether uploaded file attachments are now returned correctly after using:

POST /attachments/{brainId}/{thoughtId}/file

Regarding the second point: POST /attachments/{brainId}/{thoughtId}/file is not currently intended to return the new attachment ID, which is why you are seeing:

{data: null}

I agree that returning the attachment ID after upload would be useful. We have noted this as a feature request for the API.

For now, the recommended workflow is:

• Upload the file using POST /attachments/{brainId}/{thoughtId}/file

• Then call GET /thoughts/{brainId}/{thoughtId}/attachments

• Use the returned attachment list to retrieve the ID of the newly uploaded file

Please test the GET endpoint again and let us know if the uploaded files are now appearing correctly.

Best regards,

John