Drops Endpoints

Upload drop item media

Changed on

This response starts a three-step upload flow. First, request this context from OpenSea. Second, call the returned method at the returned URL. For POST, add every fields entry unchanged as a multipart text field, then add a file part containing the bytes. The file part must be last. Let the HTTP library generate the multipart boundary; do not set the overall multipart Content-Type header yourself. POST storage uploads normally return 204. For PUT, upload the raw bytes, use only headers explicitly required by the endpoint, and expect 200. Treat any 2xx storage response as success. The URL and fields are short-lived sensitive credentials. Do not log, persist, alter, or put them in tickets. Third, after storage succeeds, pass the returned token to the documented OpenSea API endpoint. Do not use the token before the storage upload succeeds. Pass each token as media_token to POST /api/v2/drops/{slug}/items, POST /api/v2/drops/{slug}/prereveal-item, or PUT /api/v2/drops/{slug}/items/{token_id}. To save a drop's items in bulk, pass an upload_batch_id on the upload requests and save with POST /api/v2/drops/{slug}/items/media/save-batch, which takes filenames rather than tokens.

post/api/v2/drops/{slug}/items/media

Request

Path parameters

slugstring required

Collection slug

Request body

filenamesstring[] required

Filenames to upload, one upload context per name. Between 1 and 50 per request, each unique within the request. Before its extension a filename may contain only letters, digits, periods, underscores, and hyphens (no spaces or slashes). The extension is matched ignoring case and must be one of: png, jpeg, jpg, avif, webp, gif, svg, tiff, ico, mp4, mov, mp3, wav, html, glb, gltf, pdf, m4v, webm. A request that breaks any rule is rejected with a 400 that names every offending filename.

upload_batch_idstring uuid

Optional. Uploads these files as part of one upload batch, so the drop can be saved with POST /api/v2/drops/{slug}/items/media/save-batch by filename instead of sending every media token back. Generate one UUID per set of files and pass it on every request for that set. Use a new UUID for each new set, so each filename is uploaded once per batch.

Example request

{
  "filenames": [
    "1.png",
    "2.png"
  ],
  "upload_batch_id": "5f0c2b1e-7a4d-4e8b-9c3f-2d6a1b0e9f47"
}

Response

Upload contexts generated successfully

fieldsobject required

Short-lived sensitive multipart text fields for POST. Submit every entry unchanged before the file part. Content-Type contains the exact MIME type required by the signed policy. This map is empty for PUT.

method'POST' | 'PUT' required

HTTP method to use at url. Current upload contexts use POST.

tokenstring required

Reference for the next OpenSea API call. Use it only after storage returns 2xx.

urlstring required

Short-lived storage URL. Use it exactly as returned and treat it as sensitive.

Example response

[
  {
    "fields": {
      "key": "uploads/example.png",
      "Content-Type": "image/png"
    },
    "method": "POST",
    "token": "upload-token-example",
    "url": "https://uploads.example.com/"
  }
]

Changes

    • info

      added the new optional request property

    • info

      added the media type */* for the response with the status

    • info

      added the media type */* for the response with the status

    • info

      added the media type */* for the response with the status

    • info

      added the optional property to the response with the status