π DeployPulse API Instructions
π 1. Retrieve Your Bearer Token
Before making API requests, youβll need an authorization token.
β‘οΈ Follow the DeployPulse Quickstart Guide β Registering and Login to sign in and obtain your Bearer token.
Use it in every request like this:
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
π 2. Create a New App
curl 'https://api.deploypulse.io/apps' \
-X POST \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"name": "New App",
"manuallyProvisionDeployments": false
}'
Note: If you set manuallyProvisionDeployments to true, you will need to manually create deployments for this app. By default, a staging and production deployment will be created.
π 3. Get an App by Name
curl 'https://api.deploypulse.io/apps/New%20App' \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
π₯ Example Response
{
"app": {
"name": "New App",
"collaborators": {
"you@example.com": {
"isCurrentAccount": true,
"permission": "Owner",
"canEdit": false,
"canTransfer": true
}
},
"deployments": [
"Production",
"Staging"
]
}
}
π¦ 4. List Deployments for an App
curl 'https://api.deploypulse.io/apps/New%20App/deployments' \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
π₯ Example Response
{
"deployments": [
{
"timestamp": "2025-01-10T10:15:30.1234567Z",
"name": "Production",
"key": "PRODUCTION_DEPLOYMENT_KEY",
"id": "PRODUCTION_DEPLOYMENT_ID",
},
{
"timestamp": "2025-01-10T10:16:45.9876543Z",
"name": "Staging",
"key": "STAGING_DEPLOYMENT_KEY",
"id": "STAGING_DEPLOYMENT_ID",
}
]
}
π οΈ 5. Create a New Deployment
Use this POST request to create a new deployment within an app:
curl 'https://api.deploypulse.io/apps/New%20App/deployments' \
-X POST \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"name": "New Deployment"
}'
π₯ Example Response
{
"deployment": {
"name": "New Deployment",
"key": "NEW_DEPLOYMENT_KEY"
}
}
π The
keyreturned uniquely identifies the deployment and is used in deployment variant in the DeployPulse SDK.
β Required Headers Summary
Always include the following headers:
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
-H "Content-Type: application/json"
-H "Accept: application/json"
