DeployPulse

DeployPulse API

This guide shows how to manage apps and deployments with the DeployPulse REST API.

πŸ›‚ 1. Create an Access Key

Every request is authorized with an access key, sent as a Bearer token. Create one in the dashboard under Settings β†’ Security β†’ Access Keys, or from a logged-in CLI (see Log in via the CLI) with:

dpctl access-key add "API scripts"

The key is shown once, so store it somewhere safe. An access key is not a deployment key: a deployment key only identifies a deployment to the SDK and cannot call the API.

Use it in every request like this:

-H "Authorization: Bearer YOUR_ACCESS_KEY"

πŸ“˜ 2. Create a New App

curl 'https://apps.deploypulse.io/apps' \
  -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_KEY" \
  -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://apps.deploypulse.io/apps/New%20App' \
  -H "Authorization: Bearer YOUR_ACCESS_KEY"

πŸ“₯ 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://apps.deploypulse.io/apps/New%20App/deployments' \
  -H "Authorization: Bearer YOUR_ACCESS_KEY"

πŸ“₯ 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://apps.deploypulse.io/apps/New%20App/deployments' \
  -X POST \
  -H "Authorization: Bearer YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "name": "New Deployment"
  }'

πŸ“₯ Example Response

{
  "deployment": {
    "name": "New Deployment",
    "key": "NEW_DEPLOYMENT_KEY"
  }
}

πŸ”‘ The key returned 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_ACCESS_KEY"
-H "Content-Type: application/json"
-H "Accept: application/json"