Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Crevio API V1 Deployments API
version: 1.0.0
description: 'API for the Crevio creator platform — a multi-tenant SaaS for digital product sales.
Uses snake_case keys following Stripe conventions. All resource IDs are string IDs (e.g., "prod_abc123").
Authentication is a bearer token: `Authorization: Bearer $CREVIO_API_KEY`.
List endpoints are cursor-paginated with `limit` and `starting_after`.
Writes accept an `Idempotency-Key` header and are safe to retry.
Every response carries IETF RateLimit headers (`RateLimit`, `RateLimit-Policy`) so a client can
self-throttle, and `Retry-After` on a 429. The quota is 600 requests per minute per credential.
The API is versioned in the URL path (`/v1`). Nothing is removed without in-band warning: a
deprecated operation is marked `"deprecated": true` here and serves `Deprecation` (RFC 9745),
`Sunset` (RFC 8594) and `Link; rel="deprecation"` headers for at least six months before it
stops answering. See https://crevio.co/docs/developer/guides/versioning.'
contact:
email: support@crevio.co
name: Crevio Support
url: https://crevio.co/docs
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: https://crevio.co/legal/terms-of-service
servers:
- url: https://api.crevio.co/v1
description: Production
security:
- ApiKey: []
tags:
- name: Deployments
description: Site deployments and build logs
paths:
/sites/{id}/deploy:
post:
summary: Deploy a site
description: 'Builds and publishes the site''s current `main` branch to production. Asynchronous: responds `202` with a `pending` deployment; poll `GET /sites/{id}/deployments` for the outcome (`live` or `failed`).
If a deploy is already in flight, that one is returned instead of starting a second build — still `202`. A build this call started is `pending` with a null `started_at`; one already running is `building`.'
operationId: deploySite
x-crevio-sdk-method: deploy
tags:
- Deployments
security:
- ApiKey: []
parameters:
- name: id
in: path
required: true
description: The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
schema:
type: string
- name: Idempotency-Key
in: header
required: false
description: 'Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.'
schema:
type: string
maxLength: 255
example: 1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33
responses:
'202':
description: The queued deployment
content:
application/json:
schema:
$ref: '#/components/schemas/Deployment'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
x-crevio-approval: ask
x-codeSamples:
- lang: typescript
label: Typescript (SDK)
source: "import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n const result = await crevio.deployments.deploy({\n id: \"<id>\",\n });\n\n console.log(result);\n}\n\nrun();"
/sites/{id}/deployments:
get:
summary: List deployments
description: 'Deployment history for a site, newest first. Append-only — each push to production, rollback or unpublish records a deployment; `is_live` marks the one serving production traffic.
`stages` lists the pipeline stages the deploy entered, oldest first, each with `name` (`provisioning`, `fetching`, `attaching`, `installing`, `building`, `checking`, `migrating`, `deploying`, `verifying`, `restoring`), `status` (`active`, `succeeded`, `failed`, `canceled`), `details`, `started_at`, `finished_at` and `duration_seconds`. `current_stage` is the open one, null once the deploy ends. `elapsed_seconds` counts up while it runs; `duration_seconds` is null until it ends. `log` is null here — use the logs endpoint.
Reading this endpoint terminalizes deploys whose build worker died without reporting a result.'
operationId: listSiteDeployments
x-crevio-sdk-method: list
tags:
- Deployments
security:
- ApiKey: []
parameters:
- name: id
in: path
required: true
description: The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
schema:
type: string
- name: starting_after
in: query
description: Cursor for pagination — the ID of the last item in the previous page
schema:
type: string
- name: limit
in: query
description: Items per page
schema:
type: integer
minimum: 1
maximum: 100
default: 20
responses:
'200':
description: List of deployments
content:
application/json:
schema:
$ref: '#/components/schemas/ListResponse_Deployment'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
x-crevio-approval: allow
x-codeSamples:
- lang: typescript
label: Typescript (SDK)
source: "import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n const result = await crevio.deployments.list({\n id: \"<id>\",\n });\n\n console.log(result);\n}\n\nrun();"
/sites/{id}/deployments/{deployment_id}/logs:
get:
summary: Get deployment build logs
description: 'Build output for a deployment, one entry per pipeline stage, oldest first.
Each stage''s `log` is capped at 64KB of bytes, keeping the tail. Values matching common credential shapes are replaced with `[redacted]` before the log is stored.'
operationId: getDeploymentLogs
x-crevio-sdk-method: logs
tags:
- Deployments
security:
- ApiKey: []
parameters:
- name: id
in: path
required: true
description: The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
schema:
type: string
- name: deployment_id
in: path
required: true
description: The deployment to read logs for, e.g. `dpl_04LNm3QYe3kZS1deabkVJxGn`.
schema:
type: string
responses:
'200':
description: The deployment's stages, each with the output its commands produced
content:
application/json:
schema:
type: object
properties:
object:
type: string
enum:
- list
data:
type: array
items:
type: object
properties:
object:
type: string
enum:
- deployment_stage
name:
type: string
enum:
- provisioning
- fetching
- attaching
- installing
- building
- checking
- migrating
- deploying
- verifying
- restoring
status:
type: string
enum:
- active
- succeeded
- failed
- canceled
description: How the stage ended. `active` while it is still running.
details:
type:
- string
- 'null'
description: What this run of the stage is doing when the name alone is too coarse.
started_at:
type: string
format: date-time
finished_at:
type:
- string
- 'null'
format: date-time
description: Null while the stage is still running.
duration_seconds:
type: number
log:
type:
- string
- 'null'
description: Combined stdout/stderr of the stage's commands, capped at 64KB (tail kept).
has_more:
type: boolean
url:
type: string
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
x-crevio-approval: allow
x-codeSamples:
- lang: typescript
label: Typescript (SDK)
source: "import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n const result = await crevio.deployments.logs({\n id: \"<id>\",\n deploymentId: \"<id>\",\n });\n\n console.log(result);\n}\n\nrun();"
/sites/{id}/deployments/{deployment_id}/stream:
get:
summary: Stream a deployment
description: Follow a build over Server-Sent Events instead of polling the deployments list — each event carries the deployment with its stages. Closes when the deployment reaches `live`, `failed`, `superseded`, or `unpublished`.
operationId: streamDeployment
x-crevio-sdk-method: stream
tags:
- Deployments
security:
- ApiKey: []
parameters:
- name: id
in: path
required: true
description: Site id (site_...)
schema:
type: string
- name: deployment_id
in: path
required: true
description: Deployment id (dpl_...)
schema:
type: string
responses:
'200':
$ref: '#/components/responses/EventStream'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
'500':
$ref: '#/components/responses/InternalServerError'
x-crevio-approval: allow
x-codeSamples:
- lang: typescript
label: Typescript (SDK)
source: "import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n const result = await crevio.deployments.stream({\n id: \"<id>\",\n deploymentId: \"<id>\",\n });\n\n console.log(result);\n}\n\nrun();"
/sites/{id}/rollback:
post:
summary: Roll back a site
description: 'Re-ships an earlier deployment''s commit to production. Defaults to the previous shipped deployment (the "undo the bad deploy" case); pass `deployment_id` to target a specific historical deployment instead. Asynchronous: responds `202` with a new `pending` deployment whose status moves to `live`/`failed`. Poll `GET /sites/{id}/deployments` to track it.'
operationId: rollbackSite
x-crevio-sdk-method: rollback
tags:
- Deployments
security:
- ApiKey: []
parameters:
- name: id
in: path
required: true
description: The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
schema:
type: string
- name: Idempotency-Key
in: header
required: false
description: 'Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.'
schema:
type: string
maxLength: 255
example: 1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
deployment_id:
type: string
description: Id of a specific deployment to roll back to (e.g. "dpl_abc123"), from the deploy history. Omit to roll back to the previous shipped deployment.
restore_database:
type: boolean
description: 'Also rewind the site''s database to the schema that deployment was serving, using the restore point captured before the deploy that followed it. Off by default: rolling code back is cheap, but a database restore discards every row written since the target shipped. Returns `no_restore_point` when no restore point was recorded after the target.'
default: false
responses:
'202':
description: The queued rollback deployment
content:
application/json:
schema:
$ref: '#/components/schemas/Deployment'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
'429':
$ref: '#/components/responses/TooManyRequests'
x-crevio-approval: ask
x-codeSamples:
- lang: typescript
label: Typescript (SDK)
source: "import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n const result = await crevio.deployments.rollback({\n id: \"<id>\",\n });\n\n console.log(result);\n}\n\nrun();"
webhooks:
deployment.succeeded:
post:
tags:
- Deployments
summary: Deployment succeeded
description: Triggered when a site deploy builds, ships and passes its smoke check
operationId: webhookDeploymentSucceeded
security: []
parameters:
- name: webhook-id
in: header
required: true
description: The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.
schema:
type: string
- name: webhook-timestamp
in: header
required: true
description: Unix seconds when this attempt was sent. Reject anything older than five minutes.
schema:
type: string
- name: webhook-signature
in: header
required: true
description: '`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.'
schema:
type: string
requestBody:
description: Event payload Crevio POSTs to your endpoint.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: Unique identifier for this webhook event
example: whev_abc123
object:
type: string
enum:
- event
example: event
type:
type: string
enum:
- deployment.succeeded
description: The event type
example: deployment.succeeded
livemode:
type: boolean
description: '`false` when a test purchase or a test event from the dashboard caused this event, `true` otherwise'
example: true
created_at:
type: string
format: date-time
description: ISO 8601 timestamp of when the event was created
example: '2025-01-15T10:30:00Z'
api_version:
type: string
description: API version used to generate the payload
example: v1
data:
type: object
description: '`object` is the resource exactly as its API endpoint returns it.'
properties:
object:
$ref: '#/components/schemas/Deployment'
required:
- object
required:
- id
- object
- type
- livemode
- created_at
- api_version
- data
responses:
'200':
description: Return any 2xx status within 5 seconds to acknowledge receipt.
deployment.failed:
post:
tags:
- Deployments
summary: Deployment failed
description: Triggered when a site deploy fails to build, ship or come up
operationId: webhookDeploymentFailed
security: []
parameters:
- name: webhook-id
in: header
required: true
description: The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.
schema:
type: string
- name: webhook-timestamp
in: header
required: true
description: Unix seconds when this attempt was sent. Reject anything older than five minutes.
schema:
type: string
- name: webhook-signature
in: header
required: true
description: '`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.'
schema:
type: string
requestBody:
description: Event payload Crevio POSTs to your endpoint.
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: Unique identifier for this webhook event
example: whev_abc123
object:
type: string
enum:
- event
example: event
type:
type: string
enum:
- deployment.failed
description: The event type
example: deployment.failed
livemode:
type: boolean
description: '`false` when a test purchase or a test event from the dashboard caused this event, `true` otherwise'
example: true
created_at:
type: string
format: date-time
description: ISO 8601 timestamp of when the event was created
example: '2025-01-15T10:30:00Z'
api_version:
type: string
description: API version used to generate the payload
example: v1
data:
type: object
description: '`object` is the resource exactly as its API endpoint returns it.'
properties:
object:
$ref: '#/components/schemas/Deployment'
required:
- object
required:
- id
- object
- type
- livemode
- created_at
- api_version
- data
responses:
'200':
description: Return any 2xx status within 5 seconds to acknowledge receipt.
components:
schemas:
Deployment:
type: object
properties:
id:
type: string
object:
type: string
site:
type: string
status:
type: string
enum:
- pending
- building
- live
- failed
- superseded
- unpublished
commit_sha:
type:
- string
- 'null'
is_live:
type: boolean
url:
type:
- string
- 'null'
triggered_by:
type:
- string
- 'null'
error_message:
type:
- string
- 'null'
db_bookmark:
type:
- string
- 'null'
current_stage:
type:
- string
- 'null'
stages:
type: array
duration_seconds:
type:
- number
- 'null'
elapsed_seconds:
type:
- number
- 'null'
started_at:
type:
- string
- 'null'
finished_at:
type:
- string
- 'null'
created_at:
type: string
required:
- id
- object
- site
- status
- commit_sha
- is_live
- url
- triggered_by
- error_message
- db_bookmark
- current_stage
- stages
- duration_seconds
- elapsed_seconds
- started_at
- finished_at
- created_at
ListResponse_Deployment:
type: object
properties:
object:
type: string
enum:
- list
data:
type: array
items:
$ref: '#/components/schemas/Deployment'
has_more:
type: boolean
url:
type: string
required:
- object
- data
- has_more
- url
Error:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum:
- api_error
- invalid_request_error
- validation_error
code:
type: string
message:
type: string
param:
type: string
errors:
type: object
doc_url:
type: string
required:
- type
- message
required:
- error
responses:
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: invalid_request_error
code: forbidden
message: You do not have permission to perform this action
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
TooManyRequests:
description: 'Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account''s team keys share another. Retry after the number of seconds in `Retry-After`.'
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: invalid_request_error
code: rate_limit_exceeded
message: Too many requests. Please retry later.
InternalServerError:
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: api_error
code: internal_error
message: An unexpected error occurred
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
EventStream:
description: SSE stream of the resource.
content:
text/event-stream:
schema:
type: string
description: 'SSE stream. Events: `snapshot` (full object on connect), `update` (full object on each change), `done` (terminal state reached, stream closes), `close` (stream ended without a terminal state — reconnect to continue). `: keep-alive` comments are sent every 15s. State lives server-side, so reconnecting resumes losslessly with a fresh snapshot.'
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: invalid_request_error
code: bad_request
message: The request was malformed or contained invalid parameters
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: invalid_request_error
code: resource_missing
message: The requested resource was not found
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
UnprocessableEntity:
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: validation_error
code: validation_failed
message: Email is required
errors:
email:
- can't be blank
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
Unauthorized:
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
type: invalid_request_error
code: authentication_required
message: You did not provide an API key.
headers:
RateLimit:
$ref: '#/components/headers/RateLimit'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
Request-Id:
$ref: '#/components/headers/RequestId'
Deprecation:
$ref: '#/components/headers/Deprecation'
Sunset:
$ref: '#/components/headers/Sunset'
Link:
$ref: '#/components/headers/DeprecationLink'
headers:
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
examples:
- 11
Sunset:
description: Present only on a deprecated operation. HTTP-date (RFC 8594) after which the operation stops responding. Always at least six months after `Deprecation`.
schema:
type: string
examples:
- Thu, 01 Oct 2026 00:00:00 GMT
RateLimit:
description: 'Remaining quota for the current window, as an IETF structured field: `"default";r=<remaining>;t=<seconds until reset>`.'
schema:
type: string
examples:
- '"default";r=596;t=11'
RateLimitPolicy:
description: 'The quota this credential is subject to: `"default";q=<requests>;w=<window seconds>`.'
schema:
type: string
examples:
- '"default";q=600;w=60'
RequestId:
description: Unique id for this request. Quote it when reporting a problem.
schema:
type: string
examples:
- 8fe045fe-cb8a-4407-a44d-5df60385e522
DeprecationLink:
description: Present only on a deprecated operation. `<url>; rel="deprecation"` pointing at the migration notes.
schema:
type: string
examples:
- <https://crevio.co/docs/developer/guides/versioning>; rel="deprecation"
Deprecation:
description: Present only on a deprecated operation. Structured-field date (RFC 9745) — `@` followed by the Unix timestamp at which the operation became deprecated.
schema:
type: string
examples:
- '@1775001600'
securitySchemes:
ApiKey:
type: apiKey
in: header
name: Authorization
description: 'API key in the format: Bearer {api_token}'
externalDocs:
description: Crevio developer documentation
url: https://crevio.co/docs/developer
x-mint:
mcp:
enabled: true
x-api-lifecycle:
current_major_version: v1
versioning_scheme: URL path
deprecation_policy_url: https://crevio.co/docs/developer/guides/versioning
minimum_notice_days: 183
deprecation_headers:
- Deprecation
- Sunset
- Link