BilbyHelp Center

Initialize file upload

POST
/api/v1/attachments/init

Start a 2-phase upload. Returns a presigned uploadUrl (PUT file bytes with Content-Type: <fileType>) plus objectKey and short-lived uploadToken. Then send the message with attachments: [{ objectKey, filename, mediaType, uploadToken }].

Accepts the same files as a conversation in Bilby (images, PDF, Word, PowerPoint and Excel files, text/code, SVG). Max 25MB per file.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Personal API key (Authorization: Bearer pulse_...). Scoped to selected organizations (or all current ones); acts as the creating user. If the key covers more than one organization, pass its organizationId on each request.

Request Body

application/json
  1. body
fileName*string
Length1 <= length <= 255
fileType*string
Length1 <= length <= 127

Response Body

Presigned upload URLs and token

application/json
  1. response
objectKey*string
uploadUrl*string
readUrl*string
uploadToken*string
Example Request
curl -X POST 'https://pulse.bilby.ai/api/v1/attachments/init' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "string",  "fileType": "string"}'
Example Response
{  "objectKey": "string",  "uploadUrl": "string",  "readUrl": "string",  "uploadToken": "string"}