Skip to content

Authentication

Notebind supports two authentication methods: API keys for programmatic access and session cookies for browser-based access.

API keys are the recommended way to authenticate agents, scripts, and CI/CD pipelines.

  1. Sign in to notebind.com
  2. Go to SettingsAPI Keys
  3. Click Create API Key, give it a name (e.g., “Production Agent”)
  4. Copy the key immediately — it’s only shown once

Or create one via API (requires existing session auth):

Terminal window
curl -X POST https://notebind.com/api/keys \
-H "Content-Type: application/json" \
-H "Cookie: your-session-cookie" \
-d '{"name": "Production Agent"}'

Pass the key in the Authorization header:

Terminal window
curl https://notebind.com/api/documents \
-H "Authorization: Bearer nb_sk_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

API keys follow the format nb_sk_ followed by 32 hex characters:

nb_sk_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
  • The nb_sk_ prefix identifies it as a Notebind secret key
  • Keys are hashed with SHA-256 before storage — the plain key cannot be recovered
  • The first 14 characters (prefix) are stored for display purposes
  • last_used_at is updated on each successful authentication
ActionEndpoint
List keysGET /api/keys
Create keyPOST /api/keys
Delete keyDELETE /api/keys/:id

Browser-based requests use Supabase session cookies automatically. This is what happens when you use the Notebind web app.

The session is managed by @supabase/ssr and stored in an HTTP-only cookie named sb-<project-ref>-auth-token.

  • Email/password — Sign up and sign in at notebind.com/auth/register
  • Google OAuth — Click “Continue with Google” (coming soon)
  • GitHub OAuth — Click “Continue with GitHub” (coming soon)

Share links provide limited access to specific documents without authentication. See Share Links & Permissions for details.

Share tokens are passed as query parameters:

Terminal window
curl "https://notebind.com/api/documents/DOC_ID?share_token=TOKEN"

Share token permissions:

PermissionCan viewCan commentCan editCan suggest
viewYesNoNoNo
commentYesYesNoNo
editYesYesYesYes

All authentication failures return a consistent error format:

{
"data": null,
"error": {
"message": "Unauthorized",
"code": "UNAUTHORIZED"
}
}
StatusMeaning
401No valid credentials provided
403Authenticated but insufficient permissions