adkit_upload_file
Upload one file to Meta, Google, TikTok, LinkedIn, X, ChatGPT Ads, or Studio from files, a public HTTPS URL, or a completed temporary upload. X and ChatGPT Ads currently support images. Use files when the client supports file inputs. Otherwise, use source for a public URL or completed temporary upload. Base64 payloads are not accepted. Report upload failures with adkit_feedback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Select one file using the client instructions for this input. The client supplies download_url and file_id to AdKit. Do not invent these values. Use source if the client cannot pass files. | |
| action | Yes | Use "upload" with files or source. Use "request_upload_url" when neither a client file input nor a public URL is available. Send the bytes to the returned upload URL before using its uploadId. | |
| source | No | One public URL or completed temporary upload. Do not use together with files. | |
| filename | No | Filename for request_upload_url. | |
| accountId | No | Ad account for Meta, Google, TikTok, LinkedIn, X, or ChatGPT Ads. May be omitted when AdKit can resolve one account. | |
| projectId | No | Required. Get from adkit_projects. Auto-resolves only for single-project users. | |
| sizeBytes | No | Optional exact file size for request_upload_url. | |
| contentType | No | MIME type for request_upload_url, for example image/png or video/mp4. | |
| destination | No | Required for upload. The platform or Studio library that should receive the file. |