Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.
Access token from POST /management/v1/auth/token (publishable-key exchange) or a login session. Publishable-key tokens are agent-scoped and serve the messaging surface; login tokens also serve management.
Body
application/json
The file you are about to upload: its name and its exact size.
Name of the file, with its extension: one of png, jpg, jpeg, gif, webp, pdf, docx, xlsx, pptx, csv, txt, md, json. It is stored under a cleaned name, returned as file_name: only the part after the last / or , without control characters and without leading dots or spaces, Unicode-normalized (NFC), the extension lower-cased, and cut to 100 characters.
Every header the PUT must send, with exactly these values; the upload is refused otherwise. A Content-Length entry is the size you declared, which HTTP clients send on their own.
Link to read the uploaded file, e.g. for a preview; expires in 15 minutes. Pass it in a message's file_urls to attach the file; the link itself may have expired by then.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AUI","colors":{"primary":"#7C4DFF","light":"#A99AF5","dark":"#6B56D1"},"logo":{"light":"https://mintcdn.com/aui-72a32030/ApeN3-FD02plsaZg/logo/aui-logo-light.svg?fit=max\u0026auto=format\u0026n=ApeN3-FD02plsaZg\u0026q=85\u0026s=c8e9e8e5ee621ccaad768d8c2f298c40","dark":"https://mintcdn.com/aui-72a32030/ApeN3-FD02plsaZg/logo/aui-logo-dark.svg?fit=max\u0026auto=format\u0026n=ApeN3-FD02plsaZg\u0026q=85\u0026s=6f339424034802722aabf4b91431fcc2"},"favicon":"https://mintcdn.com/aui-72a32030/ApeN3-FD02plsaZg/favicon.svg?fit=max\u0026auto=format\u0026n=ApeN3-FD02plsaZg\u0026q=85\u0026s=5b0dd42ce7f6dce6f2cc1e37aaf0be75","appearance":{"default":"system"},"background":{"decoration":"gradient","color":{"light":"#FFFFFF","dark":"#0F0E11"}},"navbar":{"links":[{"href":"https://www.aui.io","label":"Website"}],"primary":{"type":"button","label":"Playground","href":"https://apollo.aui.io"}},"fonts":{"family":"Geist"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Playground","icon":"browser","href":"https://apollo.aui.io"},{"anchor":"Website","icon":"globe","href":"https://www.aui.io"},{"anchor":"GitHub","icon":"github","href":"https://github.com/aui-io"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aui-72a32030","hasAudioNarration":false,"actualSubdomain":"aui-72a32030","customDomains":["docs.aui.io"],"gitSource":{"type":"github","owner":"aui-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af369e96b70ae10733c906e","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":37},{"language":"default","tag":"API","count":14},{"language":"default","tag":"Messaging","count":14},{"language":"default","tag":"CLI","count":12},{"language":"default","tag":"SDK","count":10},{"language":"default","tag":"Introduction","count":9},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Agent Versions","count":7},{"language":"default","tag":"Agents","count":6},{"language":"default","tag":"Threads","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"@keyframes aui-fade-up{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}#content-area{animation:aui-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1)}#content-area h1{animation:aui-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1)}#navbar img{transition:transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease}#navbar img:hover{transform:scale(1.06) rotate(-1deg)}a{transition:color 0.15s ease, opacity 0.15s ease}button{transition:transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease}@media (prefers-reduced-motion: reduce){#content-area,#content-area h1,#navbar img,a,button{animation:none!important;transition:none!important}}"}],"page":{"pagePath":"api-reference/messaging/create-an-upload","slug":"/api-reference/messaging/create-an-upload","pageMetadata":{"title":"Create an upload","description":"Get a link to upload one file to, for attaching it to a message. PUT exactly `size` bytes to `upload_url`, sending every header in `headers`, then pass `file_url` in `file_urls` when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/uploads","href":"/api-reference/messaging/create-an-upload","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Get a link to upload one file to, for attaching it to a message. PUT exactly \", _jsx(_components.code, {\n children: \"size\"\n }), \" bytes to \", _jsx(_components.code, {\n children: \"upload_url\"\n }), \", sending every header in \", _jsx(_components.code, {\n children: \"headers\"\n }), \", then pass \", _jsx(_components.code, {\n children: \"file_url\"\n }), \" in \", _jsx(_components.code, {\n children: \"file_urls\"\n }), \" when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Create an upload","description":"Get a link to upload one file to, for attaching it to a message. PUT exactly `size` bytes to `upload_url`, sending every header in `headers`, then pass `file_url` in `file_urls` when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/uploads","href":"/api-reference/messaging/create-an-upload","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Messaging"],"summary":"Create an upload","description":"Get a link to upload one file to, for attaching it to a message. PUT exactly `size` bytes to `upload_url`, sending every header in `headers`, then pass `file_url` in `file_urls` when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.","operationId":"create_upload","requestBody":"8c2ee9ba-f173-4980-ba6b-3dcce8d8955b","responses":{"200":"d36fca45-2005-42cf-b898-84e19cb8fb66","400":"43d5e6fd-cc3c-49ed-adf9-982e989b941a","401":"f0134e27-415d-4593-8306-b55086e95e1d","403":"5d386a8a-f674-4bb9-b00a-52444fb5ea8a","404":"1315ae35-946a-431c-b2b0-c7dbdedc0c84","409":"e3a28969-e531-4d69-926e-c6d86233b572","422":"785cd042-d8e1-4418-95ee-c6269357ba2b","500":"f1d185ab-5e9b-4c09-80d9-9ce0f5ea5722","503":"3596a69b-3d85-4e25-8ce4-82bcb04db718"},"security":["b0f5addf-e136-46cc-a0fa-c98a09a97c8a"],"x-fern-audiences":["messaging"],"method":"post","type":"path","servers":["16cfb25d-4995-4c00-931e-8fa5d7f8f35e"],"path":"/messaging/v1/uploads","baseUrlOptions":["https://api-v3.aui.io/apollo-api"],"title":"Create an upload","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename","description":"Name of the file, with its extension: one of png, jpg, jpeg, gif, webp, pdf, docx, xlsx, pptx, csv, txt, md, json. It is stored under a cleaned name, returned as file_name: only the part after the last / or \\, without control characters and without leading dots or spaces, Unicode-normalized (NFC), the extension lower-cased, and cut to 100 characters.","isRequired":true,"uniqueKey":"filename","typeLabel":"string"},"size":{"type":"integer","minimum":1,"title":"Size","description":"Exact size of the file in bytes, at most 20 MB. The upload accepts only a body of this size.","isRequired":true,"uniqueKey":"size","typeLabel":"integer"}},"additionalProperties":false,"type":"object","required":["filename","size"],"title":"CreateUploadRequest","description":"The file you are about to upload: its name and its exact size.","uniqueKey":"","typeLabel":"CreateUploadRequest · object"},"examples":{"Example":{"title":"Example","value":{"filename":"\u003cstring>","size":2}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d36fca45-2005-42cf-b898-84e19cb8fb66":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"Upload the file's bytes here with an HTTP PUT, sending headers. Expires in 15 minutes.","isRequired":true,"uniqueKey":"upload_url","typeLabel":"string"},"headers":{"additionalProperties":{"type":"string","uniqueKey":"headers.additionalProperties","typeLabel":"string"},"type":"object","title":"Headers","description":"Every header the PUT must send, with exactly these values; the upload is refused otherwise. A Content-Length entry is the size you declared, which HTTP clients send on their own.","isRequired":true,"uniqueKey":"headers","typeLabel":"Headers · object"},"file_name":{"type":"string","title":"File Name","description":"The name the file is stored and shown to the agent under.","isRequired":true,"uniqueKey":"file_name","typeLabel":"string"},"file_url":{"type":"string","title":"File Url","description":"Link to read the uploaded file, e.g. for a preview; expires in 15 minutes. Pass it in a message's file_urls to attach the file; the link itself may have expired by then.","isRequired":true,"uniqueKey":"file_url","typeLabel":"string"}},"type":"object","required":["upload_url","headers","file_name","file_url"],"title":"Upload","description":"Where to upload one file, and the link to attach it to a message with.","uniqueKey":"","typeLabel":"Upload · object"},"examples":{"Example":{"title":"Example","value":{"upload_url":"\u003cstring>","headers":{},"file_name":"\u003cstring>","file_url":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"43d5e6fd-cc3c-49ed-adf9-982e989b941a":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Bad Request","exampleType":"generated"},"f0134e27-415d-4593-8306-b55086e95e1d":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Unauthorized","exampleType":"generated"},"5d386a8a-f674-4bb9-b00a-52444fb5ea8a":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Forbidden","exampleType":"generated"},"1315ae35-946a-431c-b2b0-c7dbdedc0c84":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Not Found","exampleType":"generated"},"e3a28969-e531-4d69-926e-c6d86233b572":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Conflict","exampleType":"generated"},"785cd042-d8e1-4418-95ee-c6269357ba2b":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Unprocessable Content","exampleType":"generated"},"f1d185ab-5e9b-4c09-80d9-9ce0f5ea5722":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Internal Server Error","exampleType":"generated"},"3596a69b-3d85-4e25-8ce4-82bcb04db718":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","title":"Code","description":"Stable, namespaced machine code clients branch on (e.g. \"not_found\" or \"agents.not_found\"). THE branch point -- open/extensible, append-only.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","title":"Message","description":"Human-readable explanation. NOT part of the contract; may change anytime. Clients must never parse or branch on this.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"request_id":{"oneOf":[{"type":"string","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Request Id","description":"Trace id for support correlation.","uniqueKey":"error.request_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.request_id","typeLabel":"string | null"},"details":{"oneOf":[{"type":"array","items":{"properties":{"message":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"error.details.oneOf.0.items.[INDEX].message","typeLabel":"string"},"field":{"oneOf":[{"type":"string","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.0","typeLabel":"string"},{"type":"null","title":"Field","uniqueKey":"error.details.oneOf.0.items.[INDEX].field.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details.oneOf.0.items.[INDEX].field","typeLabel":"string | null"}},"type":"object","required":["message"],"title":"ErrorDetail","description":"A single structured sub-error (e.g. one field's validation failure).","uniqueKey":"error.details.oneOf.0.items.[INDEX]","typeLabel":"ErrorDetail · object"},"title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.0","typeLabel":"ErrorDetail · object[]"},{"type":"null","title":"Details","description":"Optional structured sub-errors (e.g. per-field validation failures).","uniqueKey":"error.details.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.details","typeLabel":"ErrorDetail · object[] | null"}},"type":"object","required":["code","message"],"title":"ErrorBody","description":"The error body an end user receives when interacting with Apollo.\n\n``code`` is the stable, machine-readable branch point clients switch on.\n``message`` is human-readable and explicitly NOT part of the contract --\nit may change at any time and must never be parsed.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorBody · object"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"The single envelope every Apollo error response conforms to.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","request_id":"\u003cstring>","details":[{"message":"\u003cstring>","field":"\u003cstring>"}]}}}},"exampleType":"generated"}},"description":"Service Unavailable","exampleType":"generated"}},"security":{"b0f5addf-e136-46cc-a0fa-c98a09a97c8a":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from `POST /management/v1/auth/token` (publishable-key exchange) or a login session. Publishable-key tokens are agent-scoped and serve the messaging surface; login tokens also serve management.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"16cfb25d-4995-4c00-931e-8fa5d7f8f35e":{"url":"https://api-v3.aui.io/apollo-api"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from `POST /management/v1/auth/token` (publishable-key exchange) or a login session. Publishable-key tokens are agent-scoped and serve the messaging surface; login tokens also serve management.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Access token from `POST /management/v1/auth/token` (publishable-key exchange) or a login session. Publishable-key tokens are agent-scoped and serve the messaging surface; login tokens also serve management.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"https://api-v3.aui.io/apollo-api/openapi.json"},"subdomain":"aui-72a32030","siteName":"AUI","title":"Create an upload - AUI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T19:01:06.947Z","originalFileLocation":"api-reference/messaging/create-an-upload.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AUI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an upload - AUI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AUI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.aui.io/api-reference/messaging/create-an-upload\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aui-72a32030.mintlify.site/_mintlify/api/og/v2?division=Messaging\u0026amp;title=Create+an+upload\u0026amp;description=Get+a+link+to+upload+one+file+to%2C+for+attaching+it+to+a+message.+PUT+exactly+%60size%60+bytes+to+%60upload_url%60%2C+sending+every+header+in+%60headers%60%2C+then+pass+%60file_ur\u0026amp;theme=363429a1c95a9ad16ac09e61\u0026amp;signature=a703c581b86b33e0c41e604958e24b887de08e7c0bd99473d066f5c3ec94f80a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create an upload - AUI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aui-72a32030.mintlify.site/_mintlify/api/og/v2?division=Messaging\u0026amp;title=Create+an+upload\u0026amp;description=Get+a+link+to+upload+one+file+to%2C+for+attaching+it+to+a+message.+PUT+exactly+%60size%60+bytes+to+%60upload_url%60%2C+sending+every+header+in+%60headers%60%2C+then+pass+%60file_ur\u0026amp;theme=363429a1c95a9ad16ac09e61\u0026amp;signature=a703c581b86b33e0c41e604958e24b887de08e7c0bd99473d066f5c3ec94f80a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/aui-72a32030/RfA3dDXbDSBSzR16/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AUI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7C4DFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.aui.io/api-reference/messaging/create-an-upload\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/messaging/create-an-upload.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.aui.io/#organization\",\"name\":\"AUI\",\"url\":\"https://docs.aui.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aui-72a32030/ApeN3-FD02plsaZg/logo/aui-logo-light.svg?fit=max\u0026auto=format\u0026n=ApeN3-FD02plsaZg\u0026q=85\u0026s=c8e9e8e5ee621ccaad768d8c2f298c40\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.aui.io#website\",\"name\":\"AUI\",\"url\":\"https://docs.aui.io\",\"publisher\":{\"@id\":\"https://docs.aui.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.aui.io/api-reference/messaging/create-an-upload#webpage\",\"url\":\"https://docs.aui.io/api-reference/messaging/create-an-upload\",\"name\":\"Create an upload\",\"description\":\"Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\",\"dateModified\":\"2026-11-10T19:01:06.947Z\",\"isPartOf\":{\"@id\":\"https://docs.aui.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.aui.io/api-reference/messaging/create-an-upload#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.aui.io/api-reference/messaging/create-an-upload#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Messaging\",\"item\":\"https://docs.aui.io/api-reference/messaging/send-a-message\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an upload\",\"item\":\"https://docs.aui.io/api-reference/messaging/create-an-upload\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.aui.io/api-reference/messaging/create-an-upload#apireference\",\"headline\":\"Create an upload\",\"name\":\"Create an upload\",\"description\":\"Get a link to upload one file to, for attaching it to a message. PUT exactly size bytes to upload_url, sending every header in headers, then pass file_url in file_urls when you send the message. Both links expire in 15 minutes; create one upload per file. An upload no message attaches is deleted after 1 day; the first message that attaches it keeps it for 30 days, during which it can be attached again. Rerun and the WebSocket session do not take files.\",\"url\":\"https://docs.aui.io/api-reference/messaging/create-an-upload\",\"mainEntityOfPage\":{\"@id\":\"https://docs.aui.io/api-reference/messaging/create-an-upload#webpage\"},\"dateModified\":\"2026-11-10T19:01:06.947Z\",\"publisher\":{\"@id\":\"https://docs.aui.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.aui.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AUI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AUI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/messaging/create-an-upload.md","siteName":"AUI","nav":{"global":{"anchors":[{"anchor":"Playground","icon":"browser","href":"https://apollo.aui.io"},{"anchor":"Website","icon":"globe","href":"https://www.aui.io"},{"anchor":"GitHub","icon":"github","href":"https://github.com/aui-io"}]},"tabs":[{"tab":"Introduction","icon":"book-open","pages":[{"title":"Introduction","href":"/introduction"}]},{"tab":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"SDK","icon":"cube","pages":[{"title":"SDK","href":"/sdk/overview"}]},{"tab":"API","icon":"message","pages":[{"title":"API","href":"/api/overview"}]},{"tab":"API Reference","icon":"code","groups":[{"group":"Health","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /health","href":"/api-reference/health/health-check"}]},{"group":"Agents","pages":[{"title":"List agents","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/projects/{projectId}/agents","href":"/api-reference/agents/list-agents"},{"title":"Create agent","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/projects/{projectId}/agents","href":"/api-reference/agents/create-agent"},{"title":"Get an agent","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/agents/{agentId}","href":"/api-reference/agents/get-an-agent"},{"title":"Delete an agent","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json delete /management/v1/agents/{agentId}","href":"/api-reference/agents/delete-an-agent"},{"title":"Update an agent","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json patch /management/v1/agents/{agentId}","href":"/api-reference/agents/update-an-agent"},{"title":"Get agent usage","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/agents/{agentId}/usage","href":"/api-reference/agents/get-agent-usage"}]},{"group":"Agent Versions","pages":[{"title":"List versions","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/agents/{agentId}/versions","href":"/api-reference/agent-versions/list-versions"},{"title":"Create a draft version","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/agents/{agentId}/versions","href":"/api-reference/agent-versions/create-a-draft-version"},{"title":"Update a version","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json patch /management/v1/agents/{agentId}/versions/{versionId}","href":"/api-reference/agent-versions/update-a-version"},{"title":"Publish a version","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/agents/{agentId}/versions/{versionId}/publish","href":"/api-reference/agent-versions/publish-a-version"},{"title":"Archive a version","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/agents/{agentId}/versions/{versionId}/archive","href":"/api-reference/agent-versions/archive-a-version"},{"title":"Push a configuration bundle","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/agents/{agentId}/versions/{versionId}/push","href":"/api-reference/agent-versions/push-a-configuration-bundle"},{"title":"Pull a configuration bundle","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/agents/{agentId}/versions/{versionId}/pull","href":"/api-reference/agent-versions/pull-a-configuration-bundle"}]},{"group":"Projects","pages":[{"title":"List projects","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/projects","href":"/api-reference/projects/list-projects"},{"title":"Create project","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/projects","href":"/api-reference/projects/create-project"},{"title":"Get a project","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/projects/{projectId}","href":"/api-reference/projects/get-a-project"},{"title":"Delete a project","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json delete /management/v1/projects/{projectId}","href":"/api-reference/projects/delete-a-project"},{"title":"Get project usage","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/projects/{projectId}/usage","href":"/api-reference/projects/get-project-usage"}]},{"group":"Threads","pages":[{"title":"List threads","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/threads","href":"/api-reference/threads/list-threads"},{"title":"Get a thread","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/threads/{threadId}","href":"/api-reference/threads/get-a-thread"},{"title":"Update a thread","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json patch /management/v1/threads/{threadId}","href":"/api-reference/threads/update-a-thread"},{"title":"List thread traces","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/threads/{threadId}/trace","href":"/api-reference/threads/list-thread-traces"},{"title":"Get an interaction's trace","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/interactions/{interactionId}/trace","href":"/api-reference/threads/get-an-interactions-trace"},{"title":"List thread messages","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /management/v1/threads/{threadId}/messages","href":"/api-reference/threads/list-thread-messages"}]},{"group":"Messaging","pages":[{"title":"Send a message","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/messages","href":"/api-reference/messaging/send-a-message"},{"title":"Stream a message","description":"Send a message and stream the reply token-by-token over Server-Sent\nEvents. The thread is created automatically when ``thread_id`` is omitted —\nthe resolved id arrives as the first ``thread`` event. Resume a dropped\nstream with the standard ``Last-Event-ID`` header: missed events replay\nwithout running the turn again.","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/messages/stream","href":"/api-reference/messaging/stream-a-message"},{"title":"Create an upload","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/uploads","href":"/api-reference/messaging/create-an-upload"},{"title":"Rerun an interaction","description":"Regenerate ``interaction_id`` on the thread against the agent's live\nversion, then replay ``text`` onto the resulting new thread. The response's\n``thread_id`` is the new thread's id, not the original.","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/threads/{threadId}/rerun","href":"/api-reference/messaging/rerun-an-interaction"},{"title":"List thread messages","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /messaging/v1/threads/{threadId}/messages","href":"/api-reference/messaging/list-thread-messages"},{"title":"Get trace by thread","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /messaging/v1/threads/{threadId}/trace","href":"/api-reference/messaging/get-trace-by-thread"},{"title":"Get trace by interaction","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json get /messaging/v1/interactions/{interactionId}/trace","href":"/api-reference/messaging/get-trace-by-interaction"},{"title":"Get follow-up suggestions","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/followup-suggestions","href":"/api-reference/messaging/get-follow-up-suggestions"},{"title":"Get the welcome message","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/welcome-message","href":"/api-reference/messaging/get-the-welcome-message"}]},{"group":"Channels","pages":[{"title":"Start a channel thread","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/channels/{channel}/threads","href":"/api-reference/channels/start-a-channel-thread"}]},{"group":"Auth","pages":[{"title":"Get an access token","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /management/v1/auth/token","href":"/api-reference/auth/get-an-access-token"}]},{"group":"Webhooks","pages":[{"title":"Send an event to trigger the agent","deprecated":null,"version":null,"openapi":"https://api-v3.aui.io/apollo-api/openapi.json post /messaging/v1/events","href":"/api-reference/webhooks/send-an-event-to-trigger-the-agent"}]}]}]},"basePath":"","title":"Create an upload - AUI","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js","Markdown-CwLx6PAg.js","clsx-C3kuh_dz.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CmKHfscc.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-U3mI6Ljh.js"]}