Upload a Draft Picture or Document
POST/drafts/:draftId/images
Uploads one picture or one PDF to the draft's media, up to 32 MB. Send the file as a multipart field named exactly "image". Accepted: jpg, jpeg, png, webp, avif, gif, ico and pdf. Needs the asset:create scope. Send Authorization: Bearer <token>: the login token of a person who can work on the draft, or a draft key (wrd_...) with the scope this route needs. A draft key works only for the draft in the address.
Request
Responses
- 201
- 400
- 401
- 403
- 413
- 422
The file was uploaded.
The draft has no storage left
Not authenticated
The token is not allowed to do this. A draft key needs the asset:create scope; a person needs the same permission on the draft.
The file is larger than 32 MB
The file is not a picture or a PDF of an accepted type, or it is missing