# Direct Uploads ## Create authenticated direct upload URL V2 **post** `/accounts/{account_id}/images/v2/direct_upload` Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the `draft: true` property is not present. ### Path Parameters - `account_id: string` Account identifier tag. ### Returns - `errors: array of ResponseInfo` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional object { pointer }` - `pointer: optional string` - `messages: array of ResponseInfo` - `code: number` - `message: string` - `documentation_url: optional string` - `source: optional object { pointer }` - `result: object { id, uploadURL }` - `id: optional string` Image unique identifier. - `uploadURL: optional string` The URL the unauthenticated upload can be performed to using a single HTTP POST (multipart/form-data) request. - `success: true` Whether the API call was successful - `true` ### Example ```http curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/images/v2/direct_upload \ -H 'Content-Type: multipart/form-data' \ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ -F id=this/is/my-customid \ -F expiry=2021-01-02T02:20:00Z \ -F requireSignedURLs=true ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": { "id": "id", "uploadURL": "https://upload.imagedelivery.net/FxUufywByo0m2v3xhKSiU8/e22e9e6b-c02b-42fd-c405-6c32af5fe600" }, "success": true } ``` ## Domain Types ### Direct Upload Create Response - `DirectUploadCreateResponse object { id, uploadURL }` - `id: optional string` Image unique identifier. - `uploadURL: optional string` The URL the unauthenticated upload can be performed to using a single HTTP POST (multipart/form-data) request.