API Reference
Upload an image
/open_api/v1.3/file/image/ad/upload/https://tiktok-ads.mimicr.dev · provider: https://business-api.tiktok.comUse this endpoint to upload an image by URL (UPLOAD_BY_URL) or by file (UPLOAD_BY_FILE, multipart with image_file and its MD5 in image_signature). Use it for the video cover (image_ids of a SINGLE_VIDEO ad) and for image ads. File names are unique per advertiser.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Headers
Authorized access token, sent in this header (not Authorization: Bearer). Marketing API tokens never expire.
Body
application/jsonAdvertiser ID.
Image name.
Image upload method.
UPLOAD_BY_FILEUPLOAD_BY_URLUPLOAD_BY_FILE_IDRequired when upload_type is UPLOAD_BY_FILE. Image file.
Required when upload_type is UPLOAD_BY_FILE. MD5 of the image (used for server verification).
Required when upload_type is UPLOAD_BY_URL. Image url address. Example: http://xxx.xxx.
Responses
200Response envelope {code, message, request_id, data}. code 0 (message "OK") is success. Validation and business errors also come with HTTP 200 and a non-zero code: check code, not the HTTP status.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).
Returned data.
Show child attributes
Image ID that is used to create ads.
Material ID.
Whether the source of the image is valid for Carousel Ads.
Whether it can be displayed on the platform.
Image height.
Image width.
Image Format.
Image URL, valid for an hour and needs to be re-acquired after expiration.
MD5 of picture.
Image size in bytes.
Image name.
Creation time. UTC time. Format: 2020-06-10T07:39:14Z.
Modification time. UTC time. Format: 2020-06-10T07:39:14Z.
501The route or feature is documented by TikTok but outside Mimicr's integration core: code 40014 with HTTP 501.
Return code. 0 means success; see the return codes appendix for the others.
Return message: OK on success, otherwise the error description.
The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).