Create a temporary attachment

Create a temporary attachment for use as ad-hoc context on a Task Agent run. Submit as multipart/form-data. The type form field discriminates the payload carried on value: for FILE, send the file bytes as the value multipart part; for TEXT and URL, send the payload as the value form field. Reference the returned id in attachmentIds on a subsequent POST /v1/tasks/{id}/run call.

The returned attachment ID is currently only accepted by POST /v1/tasks/{id}/run (via the attachmentIds field). It is not supported by other endpoints.

Temporary attachments are intended for short-lived context (the same attachment can be referenced across retries of the same run) and should not be relied on for durable storage. Use the Knowledge API (POST /v1/knowledge) for content that should persist in your workspace.

Body Params
string
enum
required

The kind of attachment being created. In every case the payload is carried on the value multipart part: FILE sends binary file bytes, TEXT sends a raw text string, URL sends a URL string.

Allowed:
required

The attachment payload. Its shape depends on type: for FILE, the binary file bytes (multipart file part; pick binary in the docs UI); for TEXT, a raw text string (form field; pick string); for URL, a URL string (form field; pick string).

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json