Skip to main content

Projects

Upload a project asset

Upload an image the config points at — a favicon, an Apple touch icon, a PWA icon. The response carries the path to write into nookdocs.config.json; this endpoint stores the bytes and does not edit the config itself. Managed projects receive a commit in their repo; own-repo projects get a hosted URL.

POST/projects/{id}/asset
Upload a project asset
curl --request POST \
  --url 'https://api.nookdocs.com/v1/projects/{id}/asset' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --data '{
  "dir": "brand/favicon",
  "file": "<string>",
  "name": "icon"
}'
{
  "path": "<string>"
}

Authorizations

Authorizationstringheaderrequired

API key issued from your dashboard (Settings → API Keys). Format: nook_... — pass as Authorization: Bearer nook_.... Keys carry scopes (projects:read/write, pages:read, deployments:read/trigger, analytics:read) — calls without the required scope return 403.

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path parameters

idstring (uuid)pathrequired
Project ID

Request bodymultipart/form-data

dirstringbody
Directory under `public/`.
filestring (binary)bodyrequired
SVG, PNG, ICO, WebP or JPEG. Maximum 2MB.
namestringbody
Filename without extension, e.g. `apple-touch-icon`.

Response

application/json

Stored

pathstring