{
  "topic": "context",
  "section": {
    "n": 5,
    "name": "Manage"
  },
  "title": "Where an app stands, in one call",
  "covers": "Reading an app's whole picture before you change it: what it is, what was done last, its state, and what only a person can do",
  "summary": "One GET returns the app's summary, its last change, whether it is live, paused, private or in the Trash, its recent deploys, outages, schedules, previews and domains, the limits that could block the next deploy, and needsPerson: the things only a person can do or should be told. Read it first when you pick up an app, and again before you tell the person it is done. It is built fresh on every call from the app's real state, so it cannot be out of date. Coming later: a written brief for each app (decisions, instructions, how to run it) in the same reply.",
  "available": true,
  "who": {
    "connector": "Not yet: use the HTTP call with the Embarko key",
    "api": "GET https://ship.embarko.ai/api/apps/{app-name}/context",
    "dashboard": "https://embarko.ai/app",
    "needs_human": "Their Embarko key, if you have none. Anyone who can open the app can read it."
  },
  "steps": {
    "http_api": [
      "GET https://ship.embarko.ai/api/apps/{app-name}/context with Authorization: Bearer {token}. A temporary app has none (404): use status.",
      "Read status first: live, needs_attention, paused, in_trash, building or not_deployed. Then next, which says the one thing to do now.",
      "Read needsPerson and tell the person each item in plain words. kind \"action\" means they must do something, \"notice\" means they should know, \"limit\" means Embarko cannot do it. Do not try to do an item yourself.",
      "app.summary is one line on what the app does. If it is null, send X-App-Summary (one short line, plain words) on the next deploy.",
      "lastChange and deployments say what was done last, by which agent, how it ended and, in changeNote, why (the deploy's own X-Deploy-Note; send one on every deploy). limits says whether today's deploys or the workspace's server apps are used up; say \"upgrade\" only if canUpgrade is true.",
      "It does not say whether the app is up this second: read links.status for that. Never put a secret in a summary or a note."
    ]
  },
  "examples": [
    {
      "title": "A kept app with a failed deploy and a preview waiting",
      "command": "curl -sS 'https://ship.embarko.ai/api/apps/my-shop/context' --oauth2-bearer \"$DEPLOY_TOKEN\"",
      "response_status": 200,
      "response": {
        "status": "needs_attention",
        "app": {
          "id": "cmh1q2w3e0001abcdmyapp",
          "name": "my-shop",
          "kind": "service",
          "summary": "Order tracker for a packing team.",
          "workspace": {
            "id": "77528"
          },
          "yourAccess": {
            "level": "edit",
            "label": "Can contribute",
            "canPutLive": false,
            "canMakeChanges": true
          }
        },
        "live": {
          "locked": true,
          "paused": null,
          "inTrash": null,
          "currentDeployment": {
            "id": "cmh1q2w3e0010abcddeploy",
            "version": "v12",
            "finishedAt": "2026-12-02T08:00:00.000Z"
          }
        },
        "lastChange": {
          "deployment": "v13",
          "status": "failed",
          "when": "2026-12-03T09:40:00.000Z",
          "by": {
            "source": "agent",
            "agentName": "cursor"
          },
          "note": null,
          "changeNote": "Added a CSV export of the orders list.",
          "errorDetail": "build failed: missing module csv-stringify"
        },
        "deployments": [
          "…the last 5, same fields as the deployments list…"
        ],
        "incidents": {
          "open": [],
          "recent": []
        },
        "schedules": [],
        "previews": [
          "…same fields as the previews list…"
        ],
        "domains": [],
        "limits": {
          "deploysToday": {
            "used": 3,
            "limit": 5,
            "reached": false,
            "resetsAt": "2026-12-04T00:00:00.000Z",
            "canUpgrade": true
          },
          "workspaceDeploysToday": {
            "used": 6,
            "limit": 10,
            "reached": false,
            "resetsAt": "2026-12-04T00:00:00.000Z",
            "canUpgrade": true
          },
          "serverApps": {
            "used": 2,
            "limit": 2,
            "reached": true,
            "canUpgrade": true
          }
        },
        "needsPerson": [
          {
            "code": "preview_waiting",
            "kind": "action",
            "what": "The preview \"new-look\" is waiting for review.",
            "who": "someone with Full access",
            "how": "Open this item's links.review in Embarko and choose Ship it or Not yet; its links.preview is the running preview.",
            "links": {
              "review": "https://embarko.ai/app?open=cmh1q2w3e0001abcdmyapp&preview=cmh1q2w3e0009abcdpreview",
              "preview": "https://my-shop--new-look.embarko.app"
            }
          },
          {
            "code": "server_app_limit_reached",
            "kind": "notice",
            "what": "The workspace runs 2 server apps, as many as it can. Apps already running keep running; a new server app is refused (static sites do not count).",
            "who": "the person who owns the workspace",
            "how": "Upgrade, or remove an app that is no longer needed.",
            "links": {
              "billing": "https://embarko.ai/app/billing"
            }
          }
        ],
        "next": "The last deploy (v13) failed and live still runs v12: read links.logs, fix, deploy again to \"my-shop\", then tell the person. 2 things need the person: see needsPerson.",
        "links": {
          "app": "https://my-shop.embarko.app",
          "status": "https://ship.embarko.ai/apps/my-shop/status",
          "logs": "https://ship.embarko.ai/apps/my-shop/logs?stream=stderr",
          "deployments": "https://ship.embarko.ai/api/apps/my-shop/deployments",
          "incidents": "https://ship.embarko.ai/api/apps/my-shop/incidents",
          "schedules": "https://ship.embarko.ai/api/apps/my-shop/schedules",
          "previews": "https://ship.embarko.ai/api/apps/my-shop/previews",
          "domains": "https://ship.embarko.ai/api/apps/my-shop/domains",
          "help": "https://embarko.ai/docs/context"
        }
      }
    }
  ],
  "done_when": "You can tell the person what the app is, what was done last, what needs them, and what you will do next.",
  "errors": [
    {
      "code": "app_not_found",
      "status": 404,
      "retry": "No",
      "do": "No such app that this key can reach, or it is a temporary app (those have status only). Check the name and the key."
    },
    {
      "code": "unauthorized",
      "status": 401,
      "retry": "No",
      "do": "The key was rejected."
    }
  ],
  "say_to_user": {
    "needs_person": "Tell them each needsPerson item in plain words, then what you will do about the rest."
  },
  "prerequisites": {
    "read_first": "https://embarko.ai/docs/prerequisites",
    "user": "The person is usually not a developer. They want to know if the app is live, not how.",
    "talk": "Reply in 1-3 short plain sentences: what happened, and what the person needs to do only if something is needed. Do not show commands, API names, tokens, headers or logs, or describe the steps you took, unless the person asks for technical details. If the person is clearly a developer (uses technical terms, asks what you ran), talk to them that way for the rest of the conversation. Never show a token. Never invent a link, name or code: use only what Embarko's replies, this guide or the person give you.",
    "route": "Connector first if it is in your tools, then the HTTP API. If you can reach neither, ask the person to add the connector. The upload page is the last resort.",
    "domains": "ship.embarko.ai (API), embarko.ai (website), {app-name}.embarko.app (apps): all Embarko.",
    "requires": []
  },
  "next": "Do what next says, and tell the person whatever needsPerson lists.",
  "related": [
    {
      "topic": "resume",
      "why": "Picking up an app another agent started",
      "url": "https://embarko.ai/docs/resume"
    },
    {
      "topic": "status",
      "why": "Is it up right now?",
      "url": "https://embarko.ai/docs/status"
    },
    {
      "topic": "logs",
      "why": "When the last deploy failed",
      "url": "https://embarko.ai/docs/logs"
    },
    {
      "topic": "previews",
      "why": "When a preview is waiting",
      "url": "https://embarko.ai/docs/previews"
    }
  ],
  "links": {
    "context": "https://ship.embarko.ai/api/apps/{app-name}/context",
    "status": "https://ship.embarko.ai/apps/{app-name}/status"
  },
  "url": "https://embarko.ai/docs/context",
  "contents": "https://embarko.ai/docs",
  "version": "2026-11-24"
}