Source: https://datafa.st/docs/api/account/notes/create
Markdown source: https://datafa.st/docs/api/account/notes/create.md
Description: Add a timestamped manual note to the existing chart.

# Create note

`POST https://datafa.st/api/v1/admin/websites/{websiteId}/notes`

Add a timestamped manual note to the existing chart.

Required account-token permission: `notes:write`.

## Body parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `text` | string | Yes | Non-empty note, maximum 500 characters; trimmed before saving. |
| `timestamp` | string | Yes | ISO timestamp with Z/offset, or YYYY-MM-DD at midnight in the website timezone. |
| `idempotencyKey` | string | No | Stable key for retries: 1–128 letters, digits, dots, underscores, colons, or hyphens. |

Returns `201` for a new note; `200` when replaying the same creation key, text, and timestamp. Keys are scoped to the website and creating user. A key reused with different input returns `409`. Retry protection lasts while the note exists; deleting it allows that key to create it again.

No chart period or granularity is required. MCP: `datafast_notes_create`.
## Response

`data` is an array of manual notes. Each note includes `id`, `websiteId`, `text`, `timestamp` (UTC ISO), `author` (`id`, `name`, `image`, or null if the author was deleted), `createdAt`, and `updatedAt`. The author is derived from the authenticated account; it cannot be supplied by the caller.

API-created notes appear on the existing dashboard chart at their timestamp. They remain visible when changing the chart's period or granularity, subject to the chart's note visibility toggle. Manual notes are private to authorized website users; public dashboard responses do not expose them.

## Authentication

Use `Authorization: Bearer df_...` for one website, or `dft_...` with the required permission and website access. Notes always require `websiteId` in the path. Mention reads infer it from a website key; account tokens must provide the `websiteId` query parameter.

Existing website keys and `*` account tokens work automatically. For restricted account tokens, open [Account settings → API](/dashboard/settings?tab=api), expand your token, choose **Edit permissions**, and enable **Notes → Read / Write**. Save permissions to keep the same token and MCP connection. Only the signed-in token owner can edit permissions in the dashboard; no API or MCP operation can do this.

## Errors

Standard errors use `{ "status": "error", "error": { "code": 400, "message": "..." } }`. Expect `400` for invalid fields, dates, or IDs; `401` for invalid credentials; `403` for missing permissions or website access; `404` for a missing website/note; `409` for reusing a creation key with different input; and `429` for the normal API rate limit.

## Code examples

### Example request

```bash
curl -X POST "https://datafa.st/api/v1/admin/websites/{websiteId}/notes" \
  -H "Authorization: Bearer dft_xxx" \
  -H "Content-Type: application/json" \
  -d '{"text": "Launched the new landing page", "timestamp": "2026-09-05T10:00:00.000Z", "idempotencyKey": "landing-page-deploy-abc123"}'
```

### Success response

```json
{
  "status": "success",
  "data": [
    {
      "id": "69a123456789012345678901",
      "websiteId": "65f123456789012345678901",
      "text": "Launched the new landing page",
      "timestamp": "2026-09-05T10:00:00.000Z",
      "author": {
        "id": "65f123456789012345678902",
        "name": "Marc",
        "image": null
      },
      "createdAt": "2026-09-05T10:01:00.000Z",
      "updatedAt": "2026-09-05T10:01:00.000Z"
    }
  ]
}
```
