Snapvisor Deployments API
Create, finalize, and resolve deployments to publish and serve project artifacts.
Create, finalize, and resolve deployments to publish and serve project artifacts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/snapvisor-io:snapvisor-io-deployments-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Snapvisor Deployments API
version: 2.0.0
contact:
name: Snapvisor Support
url: https://snapvisor.io
email: support@snapvisor.io
termsOfService: https://snapvisor.io/terms
description: Create, finalize, and resolve deployments to publish and serve project artifacts.
servers:
- url: https://api.snapvisor.io/v2
description: API Endpoint
security:
- projectToken: []
tags:
- name: Deployments
description: Create, finalize, and resolve deployments to publish and serve project artifacts.
x-page-icon: rocket
paths:
/deployments:
post:
operationId: createDeployment
summary: Create a deployment
description: Create a deployment and receive signed upload URLs for the files Snapvisor doesn't already store. Files already present (matched by content hash) are reused and omitted from `uploadFiles`. The environment is inferred from the branch when omitted.
tags:
- Deployments
security:
- projectToken: []
requestBody:
content:
application/json:
schema:
type: object
properties:
commit:
description: The commit SHA
$ref: '#/components/schemas/Sha1Hash'
branch:
description: The branch name
$ref: '#/components/schemas/GitBranch'
prNumber:
description: The pull request number
anyOf:
- type: integer
minimum: 1
maximum: 9007199254740991
- type: 'null'
prHeadCommit:
description: The head commit of the pull request. When `commit` is a merge commit built for the pull request, such as the test-merge commit GitHub Actions checks out, the deployment status is reported on this commit, where the pull request shows it.
anyOf:
- $ref: '#/components/schemas/Sha1Hash'
- type: 'null'
environment:
description: 'The deployment environment. When omitted, it is inferred from `branch`: branches matching the configured production-branch glob are treated as `production`; all others default to `preview`. A tokenless GitHub Actions credential cannot choose: it is deployed to `production` only from the production branch of the repository itself (never from a fork), and asking for `production` from anywhere else is refused with 403.'
type: string
enum:
- preview
- production
files:
minItems: 1
type: array
items:
type: object
properties:
path:
type: string
minLength: 1
hash:
$ref: '#/components/schemas/Sha256Hash'
size:
type: integer
exclusiveMinimum: 0
maximum: 9007199254740991
contentType:
type: string
minLength: 1
required:
- path
- hash
- size
- contentType
description: List of files to deploy
required:
- commit
- branch
- files
responses:
'201':
description: Deployment created
content:
application/json:
schema:
type: object
properties:
deploymentId:
type: string
uploadFiles:
type: array
items:
type: object
properties:
path:
type: string
hash:
type: string
uploadUrl:
type: string
format: uri
required:
- path
- hash
- uploadUrl
additionalProperties: false
required:
- deploymentId
- uploadFiles
additionalProperties: false
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/deployments/{deploymentId}:
get:
operationId: getDeployment
summary: Get a deployment
description: Retrieve a single deployment by its ID.
tags:
- Deployments
security:
- projectToken: []
parameters:
- in: path
name: deploymentId
schema:
type: string
description: The deployment ID
required: true
description: The deployment ID
responses:
'200':
description: Deployment details
content:
application/json:
schema:
type: object
properties:
id:
type: string
status:
type: string
enum:
- pending
- ready
- error
environment:
type: string
enum:
- preview
- production
branch:
$ref: '#/components/schemas/GitBranch'
commitSha:
$ref: '#/components/schemas/Sha256Hash'
url:
type: string
format: uri
createdAt:
type: string
required:
- id
- status
- environment
- branch
- commitSha
- url
- createdAt
additionalProperties: false
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/deployments/{deploymentId}/finalize:
post:
operationId: finalizeDeployment
summary: Finalize a deployment
description: Mark a deployment as ready once all of its files have been uploaded. Snapvisor assigns the deployment's aliases and starts serving it.
tags:
- Deployments
security:
- projectToken: []
parameters:
- in: path
name: deploymentId
schema:
type: string
description: The deployment ID
required: true
description: The deployment ID
responses:
'200':
description: Deployment finalized
content:
application/json:
schema:
type: object
properties:
id:
type: string
status:
type: string
enum:
- pending
- ready
- error
environment:
type: string
enum:
- preview
- production
branch:
$ref: '#/components/schemas/GitBranch'
commitSha:
$ref: '#/components/schemas/Sha256Hash'
url:
type: string
format: uri
createdAt:
type: string
required:
- id
- status
- environment
- branch
- commitSha
- url
- createdAt
additionalProperties: false
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/deployments/resolve/{domain}:
get:
operationId: resolveDeploymentDomain
summary: Resolve a deployment domain
description: Resolve a deployment domain or URL to the deployment it currently serves. This endpoint is public and does not require authentication.
tags:
- Deployments
security: []
parameters:
- in: path
name: domain
schema:
type: string
description: A deployment domain or URL
required: true
description: A deployment domain or URL
responses:
'200':
description: Deployment domain resolved
content:
application/json:
schema:
type: object
properties:
deploymentId:
type: string
projectId:
type: string
environment:
type: string
enum:
- preview
- production
visibility:
type: string
enum:
- private
- public
required:
- deploymentId
- projectId
- environment
- visibility
additionalProperties: false
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/projects/{owner}/{project}/deployments:
get:
operationId: listProjectDeployments
summary: List a project's deployments
description: List a project's deployments, most recent first. Use `environment` to keep only the production ones — the deployments that answer "what is live right now?". Requires view access to the project. Use it to find what is deployed for a project, or the address of a deployment.
tags:
- Deployments
security:
- projectToken: []
- personalAccessToken: []
- oauth2:
- projects:read
parameters:
- in: path
name: owner
schema:
type: string
minLength: 1
required: true
- in: path
name: project
schema:
type: string
minLength: 1
required: true
- in: query
name: perPage
schema:
description: Number of items per page (max 100)
type: string
description: Number of items per page (max 100)
- in: query
name: page
schema:
description: Page number
type: string
description: Page number
- in: query
name: environment
schema:
description: Restrict to one environment.
type: string
enum:
- preview
- production
description: Restrict to one environment.
responses:
'200':
description: List of deployments
content:
application/json:
schema:
type: object
properties:
pageInfo:
$ref: '#/components/schemas/PageInfo'
results:
type: array
items:
type: object
properties:
id:
type: string
status:
type: string
enum:
- pending
- ready
- error
environment:
type: string
enum:
- preview
- production
branch:
$ref: '#/components/schemas/GitBranch'
commitSha:
$ref: '#/components/schemas/Sha256Hash'
url:
type: string
format: uri
createdAt:
type: string
required:
- id
- status
- environment
- branch
- commitSha
- url
- createdAt
additionalProperties: false
required:
- pageInfo
- results
additionalProperties: false
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-gitbook-mcp: true
/projects/{owner}/{project}/domain:
get:
operationId: getProjectDomain
summary: Get a project's deployment domain
description: Retrieve the domain the project's production deployments are served on. Requires view access to the project. Use it to find the address a project's production deployments are served on.
tags:
- Deployments
security:
- projectToken: []
- personalAccessToken: []
- oauth2:
- projects:read
parameters:
- in: path
name: owner
schema:
type: string
minLength: 1
required: true
- in: path
name: project
schema:
type: string
minLength: 1
required: true
responses:
'200':
description: The production deployment domain
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectDomain'
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-gitbook-mcp: true
put:
operationId: updateProjectDomain
x-mcp:
covers:
- graphql:updateProjectDomain
summary: Set a project's deployment domain
description: Set the domain the project's production deployments are served on. Requires administrator access to the project. Only domains under the Snapvisor deployments domain are accepted, and reserved slugs are refused. Use it when a project administrator asks to change that address.
tags:
- Deployments
security:
- personalAccessToken: []
- oauth2:
- projects:write
parameters:
- in: path
name: owner
schema:
type: string
minLength: 1
required: true
- in: path
name: project
schema:
type: string
minLength: 1
required: true
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
domain:
type: string
minLength: 1
description: The full domain to serve production deployments on, under the Snapvisor deployments domain (a slug followed by that domain, as shown in the project's deployment settings). `getProjectDomain` returns the project's current one.
required:
- domain
responses:
'200':
description: The updated production deployment domain
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectDomain'
'400':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-gitbook-mcp: true
components:
schemas:
ProjectDomain:
type: object
properties:
domain:
description: The project's production deployment domain, `null` when deployments are disabled or no domain is set.
type:
- string
- 'null'
required:
- domain
additionalProperties: false
description: A project's production deployment domain.
Sha1Hash:
type: string
pattern: ^[0-9a-f]{40}$
description: SHA1 hash
Sha256Hash:
type: string
pattern: ^[A-Fa-f0-9]{64}$
description: SHA256 hash
GitBranch:
type: string
minLength: 1
Error:
type: object
properties:
error:
type: string
details:
type: array
items:
type: object
properties:
message:
type: string
required:
- message
additionalProperties: false
required:
- error
additionalProperties: false
description: Error response
PageInfo:
type: object
properties:
total:
type: number
description: Total number of items
page:
type: number
description: Current page number
perPage:
type: number
description: Number of items per page
required:
- total
- page
- perPage
additionalProperties: false
description: Page information
securitySchemes:
projectToken:
type: http
scheme: bearer
bearerFormat: Project Token
description: 'Authenticate as a **project** with a project token.
Send it as a bearer token in the `Authorization` header:
```http
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.'
personalAccessToken:
type: http
scheme: bearer
bearerFormat: Personal Access Token
description: 'Authenticate as a **user** with a personal access token.
Send it as a bearer token in the `Authorization` header:
```http
Authorization: Bearer <personal-access-token>
```
Personal access tokens act on behalf of the user that created them
and are required by endpoints that perform user actions, such as
reviewing builds and posting comments.'
oauth2:
type: oauth2
description: 'Authenticate as a **user** via an OAuth 2.1 access token obtained
through the authorization-code (+ PKCE) flow. Used by the CLI and by
MCP clients/agents. The token acts on behalf of the authorizing user,
limited to the granted scopes and organizations.'
flows:
authorizationCode:
authorizationUrl: https://app.snapvisor.io/oauth/authorize
tokenUrl: https://app.snapvisor.io/oauth/token
refreshUrl: https://app.snapvisor.io/oauth/token
scopes:
profile: Read your Snapvisor profile and the list of teams you belong to.
projects:read: Read your projects, builds, screenshots, diffs, tests, and analytics.
projects:write: Create and configure projects and their settings.
builds:write: Create and upload builds and screenshots.
reviews:write: Approve, reject, or dismiss build reviews and ignore changes.
comments:read: Read build comments and threads.
comments:write: Post, edit, and delete comments, add reactions, and manage subscriptions.
media:read: Read the images and videos uploaded to your teams.
media:write: Upload images and videos, and delete the ones already uploaded.
account:admin: Manage organization settings and members.
data:delete: Delete projects, media and comments, transfer projects and remove contributors. Each deletion is confirmed once by the agent.
billing:manage: Start a checkout, open the billing portal, cancel, resume or refund a team subscription, and set spend limits.
account:manage: Edit your profile, emails, notification preferences, sessions and passkeys, export your data, and delete your account.
connections:manage: Connect, verify and disconnect GitHub, GitLab, Slack, Discord and Microsoft Teams, and link repositories to projects.
support:write: Open support requests on your behalf.
keys:manage: Create, rotate and revoke personal access tokens, project upload tokens and authorized apps.
externalDocs:
description: Snapvisor API reference
url: https://snapvisor.io/docs/api-reference
x-gitbook-mcp-url: https://mcp.snapvisor.io