Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt

Use this file to discover all available pages before exploring further.

The Get Deployment endpoint retrieves every piece of information stored for a single deployment run — its current status, associated project, build logs, public URL, and more. The lookup is ownership-scoped: a deployment is only returned if it belongs to a project owned by the authenticated user, preventing unauthorized access to other users’ deployment data.

GET /api/v1/deployments/:id

This endpoint requires an active session. Authentication is handled via a session cookie issued after sign-in. See the Authentication reference for details.

Request

Path Parameters

id
string
required
The CUID of the deployment to retrieve (e.g., clxyz123abc456def). CUIDs are returned in the id field of any deployment object from the List Deployments endpoint.

Response

A successful response returns HTTP 200 with the following shape:
{
  "message": "Deployment fetched successfully",
  "data": {
    "deployment": { /* single Deployment object with embedded project */ }
  }
}

Deployment fields

data.deployment
object
The full deployment record.

Example

curl -X GET https://your-domain.com/api/v1/deployments/clxyz123abc456def \
  -H "Cookie: session=<your-session-token>"
Example response:
{
  "message": "Deployment fetched successfully",
  "data": {
    "deployment": {
      "id": "clxyz123abc456def",
      "projectId": "clproj789ghi012jkl",
      "branch": "main",
      "commitHash": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
      "status": "FAILED",
      "url": null,
      "port": null,
      "logs": "[SYSTEM] Cloning repository...\n[SYSTEM] Detecting framework...\n...",
      "error": "Build command exited with code 1",
      "createdAt": "2024-11-01T14:22:00.000Z",
      "updatedAt": "2024-11-01T14:23:15.000Z",
      "completedAt": "2024-11-01T14:23:15.000Z",
      "project": {
        "id": "clproj789ghi012jkl",
        "name": "my-app",
        "repositoryFullName": "acme-org/my-app",
        "defaultBranch": "main",
        "deploymentUrl": null,
        "buildCommand": "npm run build",
        "startCommand": "npm start",
        "rootDirectory": null
      }
    }
  }
}

Error Responses

StatusErrorDescription
401UnauthorizedNo valid session cookie was provided.
404Deployment not foundNo deployment with the given id exists, or it belongs to a different user’s project.
500Failed to fetch deploymentAn unexpected server-side error occurred.

Build docs developers (and LLMs) love