Get a media
Retrieve a single media by its ID, including its share URL and ready-to-paste Markdown. Use it when you have a media ID and need its share URL, Markdown embed or upload state.
Retrieve a single media by its ID, including its share URL and ready-to-paste Markdown. Use it when you have a media ID and need its share URL, Markdown embed or upload state.
Authenticate as a project with a project token.
Send it as a bearer token in the Authorization header:
Authorization: Bearer <project-token>You can find your project token in your Snapvisor project settings. Project tokens are used by CI and the SDK to create builds and deployments.
In: header
Path Parameters
The media ID
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/media/string"{ "id": "string", "name": "string", "state": "before", "description": "string", "stage": "staged", "branch": "string", "prNumber": 0, "url": "http://example.com", "markdown": "string", "version": 0, "versionCount": 0, "fileUrl": "http://example.com", "posterUrl": "http://example.com", "contentType": "string", "sizeBytes": 0, "width": 0, "height": 0, "visibility": "team", "status": "pending", "expiresAt": "string", "createdAt": "string"}Create a media upload POST
Register a standalone image or video and receive a signed target to upload it to. Uploading takes three calls: 1. `POST /media` — declare the file and get back an `upload` target. 2. `POST` the file to `upload.url` as `multipart/form-data`, appending every entry of `upload.fields` **before** the `file` part. 3. `POST /media/{mediaId}/finalize` — confirm the bytes landed. When `upload` comes back `null`, Snapvisor already holds this exact file and steps 2 and 3 are unnecessary. Pass `prNumber` when the pull request already exists, or `branch` when it does not. A media uploaded against a branch is **staged**: it has its share URL immediately, and the moment a pull request opens for that branch Snapvisor attaches it and posts the comment — nothing has to come back and connect the two. Use it when you have a standalone screenshot or screen recording, outside a CI build, to attach to a branch or pull request.
Update a staged media PATCH
Change a staged media's name, description or branch. Staged media only. A media's name and branch are its identity — what decides whether the next upload of that name is a new version or a new media, and which pull request will publish it — and once it is published that identity is what the pull request comment is built from and what a reviewer's comments hang off. Editing it there would rewrite history rather than correct a staged media. Omitted fields are left alone. `description` and `branch` accept `null` to clear them; `name` is required and has no cleared state. Clearing a staged media's branch leaves it attached to nothing, so no pull request will ever publish it. Use it to correct a staged media's name, description or branch before a pull request publishes it.