Deployments API
The Cased API allows you to programmatically interact with Cased. All endpoints are available under https://app.cased.com/api/
.
Authentication
All requests to the Cased API must be authenticated with an API key. You can create an API key in your organization’s settings.
The API key must be included in the Authorization
header of your request:
Authorization: Bearer YOUR_API_KEY
Deployment Events
Create a Deployment Event
Notifies Cased that a deployment has occurred. This will trigger a new agent session in Mission Control to monitor the deployment.
POST /api/v1/deployments/
Body
Field | Type | Description |
---|---|---|
deployment_request | string | Required. A description of the deployment (e.g., “Production deploy v1.2.3”). |
repository_full_name | string | The full name of the repository that is being deployed (e.g., “my-org/my-repo”). Required if you have more than one project in your organization. |
status | string | The current status of the deployment. Can be one of pending , running , success , failure , or cancelled . Defaults to success . |
external_url | string | An optional URL that links back to your deployment system. |
commit_sha | string | An optional commit SHA for the deployment. |
commit_message | string | An optional commit message for the deployment. |
ref | string | The Git ref that is being deployed (e.g., refs/heads/main ). |
event_metadata | object | An optional JSON object that can be used to store any additional metadata about the deployment. |
Example Request
curl -X POST https://app.cased.com/api/v1/deployments/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "deployment_request": "Deploying version 2.5.1 to production", "repository_full_name": "your-org/your-repo", "status": "running", "external_url": "https://github.com/your-org/your-repo/actions/runs/12345", "commit_sha": "f2c1c6a", "ref": "refs/heads/main" }'