Skip to main content
POST
/
public-api
/
chat
/
sessions
/
{session_id}
/
attachments
/
upload-url
Get a signed URL to upload a chat image
curl --request POST \
  --url https://api.neoagent.io/public-api/chat/sessions/{session_id}/attachments/upload-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content_type": "<string>",
  "filename": "<string>"
}
'
{
  "data": {
    "blob_path": "<string>",
    "max_image_bytes": 123,
    "mime": "<string>",
    "upload_url": "<string>"
  },
  "meta": {
    "request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "timings_ms": {},
    "pagination": {
      "has_more": true,
      "next_cursor": "<string>"
    },
    "warnings": [
      "<string>"
    ]
  }
}

Authorizations

Authorization
string
header
required

Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user).

Path Parameters

session_id
string
required

Body

application/json
content_type
string
required

Image MIME type — one of image/png, image/jpeg, image/gif, image/webp.

filename
string | null

Original filename, used only for blob readability.

Response

Success.

data
AttachmentUploadUrlResponse · object
required

A short-lived, single-blob upload grant. PUT the image bytes to upload_url with headers x-ms-blob-type: BlockBlob and x-ms-blob-content-type: <mime>, then reference blob_path in the attachments of POST /chat/sessions/<id>/messages.

meta
object
required