Developer Docs Logo
API RequestsAPI SchemaChats

Create Attachment Upload URL

POST/v1/conversations/attachments

Requests a presigned URL for uploading an attachment file. The client uploads the file directly to the returned upload_url via HTTP PUT, then references the returned attachment_id when sending an attachment message.

The upload URL is single-use, expires after ~5 minutes, and pins both Content-Type and Content-Length to the values declared in this request. Requires chat:write scope.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for creating an attachment upload URL.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/conversations/attachments" \  -H "Content-Type: application/json" \  -d '{    "file_name": "screenshot.png",    "content_type": "image/png",    "size_bytes": 184320,    "uploader": {      "contact_id": "550e8400-e29b-41d4-a716-446655440000"    }  }'
{  "attachment_id": "5f1f69a0-2e0e-4d4a-8917-02b8b63aebf1",  "attachment_path": "oauth/8b86b34d-3d4e-4f20-9d55-9d4c93d0b8a2/5f1f69a0-2e0e-4d4a-8917-02b8b63aebf1_screenshot.png",  "upload_url": "https://s3.amazonaws.com/bucket/oauth/...?X-Amz-...",  "upload_expires_at": "2026-05-07T12:34:56Z"}