---
title: "Mint a static app token"
method: POST
path: "/projects/{projectId}/static-files/app-token"
tags: ["Projects"]
---

# Mint a static app token

`POST /projects/{projectId}/static-files/app-token`

## Request

- Base URL: `https://api.deepnote.com/v2`
- URL: `https://api.deepnote.com/v2/projects/{projectId}/static-files/app-token`
- Auth: HTTP bearer

Mints the short-lived viewer token that powers the shared website, for the key owner, so an app can be developed outside Deepnote against the same API the published site uses. Requires sharing and API access to be enabled on the project.

## Path parameters

- `projectId` string, uuid, required

## Response `200`

Token minted

- StaticFilesAppToken
  - `token` string, required: Bearer token scoped to the static app run loop: read a notebook’s inputs, start a detached run, poll it.
  - `apiOrigin` string, uri, required: Origin to send the token to.
  - `expiresAtSeconds` integer, required: Token expiry as a Unix timestamp in seconds.

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `404`: Project not found or static app API access is unavailable to the key owner
- `429`: Rate limit exceeded
- `500`: Internal server error

## Changes

- **2026-09-07** `536000f45c0e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/deepnote/apis/deepnote-public-api/changes/projects/:projectId/static-files/app-token/post.md)

---

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