---
search:
  tags:
    - sessions
    - POST
seo:
  description: >-
    Stores a file ahead of the message it goes with. Send the… Reference for the
    POST /v1/sessions/{session_id}/uploads endpoint in the Subako Public API
    API.
sidebar:
  label: Upload a file for a message
  badge: POST
title: Upload a file for a message
type: openapi-operation
---
Stores a file ahead of the message it goes with. Send the message as an `input` whose `upload_ids` names the upload's `id`; the file is then an attachment of that message under the same id. An upload no message carries is removed 24 hours after it was made. Only a session whose agent enables attachments takes one. A retry under one `Idempotency-Key` is recognized by the session, the name and the declared length, and answers the first upload.

<Operation source="api" id="create-session-upload" />
