---
title: "Get an app"
method: GET
path: "/api/v1/apps/{appId}"
tags: ["Apps"]
---

# Get an app

`GET /api/v1/apps/{appId}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/apps/{appId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns one app's record, including its current deployment and failure state when present. Deployment state is reconciled with the provider before reading (staleness-gated), so poll this endpoint after a create or redeploy to observe the deployment reaching ready or failed. Responses never include usage data.

## Path parameters

- `appId` string, required

## Response `200`

The app record.

- object
  - `id` string, required
  - `displayName` string, required
  - `slug` string, required
  - `provider` string, required
  - `source` 'managed' | 'external', required
  - `status` 'creating' | 'ready' | 'failed', required
  - `lifecycle` 'active' | 'suspended', required
  - `regionPreference` string, nullable, required
  - `liveUrl` string, nullable, required
  - `primaryHostname` string, nullable, required
  - `repo` object, nullable, required
    - `provider` string, required
    - `owner` string, required
    - `name` string, required
    - `fullName` string, required
    - `url` string, nullable, required
    - `defaultBranch` string, nullable, required
    - `subdirectory` string, nullable, required
    - `status` 'creating' | 'ready' | 'failed', required
    - `clone` object, required
      - `httpsUrl` string, required
      - `sshUrl` string, required
      - `cliCommand` string, required
  - `currentDeployment` object, nullable, required
    - `status` 'queued' | 'building' | 'ready' | 'failed' | 'canceled', required
    - `target` 'production' | 'preview' | 'staging', required
    - `url` string, nullable, required
    - `gitProvider` string, nullable, required
    - `gitRepo` string, nullable, required
    - `gitBranch` string, nullable, required
    - `gitCommitSha` string, nullable, required
    - `createdAt` string, required
    - `readyAt` string, nullable, required
    - `failedAt` string, nullable, required
    - `failureState` object, nullable, required
      - `code` 'provider_unavailable' | 'provider_rejected' | 'internal_error', required
      - `message` string, required
  - `envChangedAt` string, nullable, required
  - `protected` boolean, required
  - `tags` string[], required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `readyAt` string, nullable, required
  - `failedAt` string, nullable, required
  - `failureState` object, nullable, required
    - `code` 'provider_unavailable' | 'provider_rejected' | 'internal_error', required
    - `message` string, required

## Other responses

- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
