{
  "topic": "claim",
  "section": {
    "n": 4,
    "name": "Claim"
  },
  "title": "Keep a temporary app",
  "covers": "The 24-hour deletion, getting an Embarko key (the deploy token) to make the app permanent, and which apps a key reaches",
  "summary": "An app deployed over HTTP without an Embarko key is deleted 24 hours after its first deploy (the exact time is app.expiresAt). Claiming makes it permanent at the same link. Apps deployed through the connector are already permanent: skip this.",
  "done_when": "The deploy reply says claimed: true.",
  "available": true,
  "who": {
    "connector": "Not needed: connector deploys are already in the person's account",
    "api": "POST https://ship.embarko.ai/api/public/deploy-tokens/request, then redeploy",
    "dashboard": "https://embarko.ai/app/settings/developer",
    "needs_human": "The person reads the Embarko key in their email and pastes it to you."
  },
  "steps": {
    "http_api": [
      "Check for a token first: DEPLOY_TOKEN, then the first line of ~/.embarko/credentials. If one exists, skip to the redeploy.",
      "Ask the person for their email, then POST https://ship.embarko.ai/api/public/deploy-tokens/request with {\"email\": \"...\"}. Call it once. It always answers 202; the Embarko key goes to their inbox, never to you.",
      "Ask them to paste their Embarko key. Save it to ~/.embarko/credentials (mode 600) so you never ask again. Never repeat it back.",
      "Redeploy to https://ship.embarko.ai/apps with the same X-App-Name and Authorization: Bearer {token}. The reply has app.claimed true.",
      "From now on send the same token on status and logs: a claimed app answers 404 without it."
    ]
  },
  "examples": [
    {
      "title": "Request the token",
      "body": {
        "email": "person@example.com"
      },
      "command": "curl -sS -X POST 'https://ship.embarko.ai/api/public/deploy-tokens/request' -H 'Content-Type: application/json' --data @body.json",
      "response_status": 202,
      "response": {
        "message": "If this email address is valid, a deploy token for each of your workspaces has been sent to it. Check the inbox (and spam folder). Each request creates a new token; your existing tokens keep working."
      }
    },
    {
      "title": "Redeploy with it → claimed",
      "command": "curl -sS -X POST 'https://ship.embarko.ai/apps' --oauth2-bearer $DEPLOY_TOKEN -H 'X-App-Name: my-app' -H 'X-Agent-Name: codex' -F 'source=@/tmp/app.tar.gz'",
      "response_status": 202,
      "response": {
        "success": true,
        "status": "building",
        "app": {
          "name": "my-app",
          "kind": "service",
          "claimed": true
        },
        "next": "Claimed, so the app is permanent now. Building: poll links.status every 10 seconds until it says \"live\" or \"failed\".",
        "links": {
          "status": "https://ship.embarko.ai/apps/my-app/status",
          "feedback": "https://ship.embarko.ai/apps/my-app/customer-query"
        }
      }
    }
  ],
  "limits": [
    "There is no reminder email. Tell the person the deletion time yourself.",
    "A temporary app can be deployed 5 times in all; the sixth is refused with deploy_limit_reached. Claiming removes that limit.",
    "Token requests: 5 per email and 10 per IP per hour. The reply is 202 even when limited, so a retry tells you nothing.",
    "Tokens do not expire. Each request makes a new one; old ones keep working.",
    "People know this token as their \"Embarko key\" (Settings → Developer, the Deploy dialog and every email say so). When you talk to them, call it their Embarko key, never a token; DEPLOY_TOKEN, ~/.embarko/credentials and the API keep the technical name. There are two kinds. A personal Embarko key was called a \"Just me\" token before, and a shared workspace Embarko key a \"Whole workspace\" token: they are the same things.",
    "A token from the email or the connector is a personal Embarko key: it works on every app its person can reach, in any of their workspaces, and stops working in a workspace they leave. New apps go to the workspace it was made for.",
    "A shared workspace Embarko key (made at https://embarko.ai/app/settings/developer) works only on that workspace's apps, whoever made it, and keeps working after they leave. It is for shared machines and automated deploys. Only a workspace Owner or Admin can make one; anyone else gets a personal Embarko key.",
    "A new token never moves an existing app: it reaches the app where it is. To move an app to another workspace, call move (see move)."
  ],
  "errors": [
    {
      "code": "unauthorized",
      "status": 401,
      "retry": "No",
      "do": "The pasted Embarko key is wrong or turned off. Ask the person to check they copied all of it."
    },
    {
      "code": "no_access",
      "status": 403,
      "retry": "No",
      "do": "The token's person can't use the workspace named in the message any more. Ask them to get access there, or for an Embarko key from that workspace."
    },
    {
      "code": "app_moved",
      "status": 409,
      "retry": "No",
      "do": "The app moved to a workspace this token can't reach. Ask for a personal Embarko key from someone in that workspace. Never redeploy under a new name."
    }
  ],
  "say_to_user": {
    "offer": "Your app is live: {link}. It stays online until {time}. Want to keep it? Tell me your email and I'll set it up.",
    "ask_token": "I've sent a code to {email} (check spam too). Paste it here and your app becomes permanent.",
    "done": "Done: your app is permanent."
  },
  "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, then the upload page as a last resort.",
    "domains": "ship.embarko.ai (API), embarko.ai (website), {app-name}.embarko.app (apps): all Embarko.",
    "requires": [
      {
        "topic": "deploy",
        "why": "The app has to be deployed first",
        "url": "https://embarko.ai/docs/deploy"
      }
    ]
  },
  "next": "Tell the person when the app will be deleted, then offer to keep it.",
  "related": [
    {
      "topic": "showcase",
      "why": "Showcase needs a claimed app",
      "url": "https://embarko.ai/docs/showcase"
    },
    {
      "topic": "custom-domain",
      "why": "Domains need a claimed app",
      "url": "https://embarko.ai/docs/custom-domain"
    },
    {
      "topic": "env-vars",
      "why": "Env vars need a claimed app",
      "url": "https://embarko.ai/docs/env-vars"
    }
  ],
  "links": {
    "requestToken": "https://ship.embarko.ai/api/public/deploy-tokens/request",
    "tokensPage": "https://embarko.ai/app/settings/developer"
  },
  "url": "https://embarko.ai/docs/claim",
  "contents": "https://embarko.ai/docs",
  "version": "2026-11-24"
}