Skip to main content
If you’re not building a client, use slideless auth ... — it wraps these endpoints, handles --json, and saves the resulting cko_ key as a local profile.

Overview

Base URL: https://europe-west1-slideless-ai.cloudfunctions.net/ All four endpoints return the same discriminated-union shape:
HTTP status mirrors the error category: 400 for validation, 404 for missing user/code, 409 for state conflicts, 410 for expired code, 429 for rate limits, 500 for internals.

Common rules

  • Resend cooldown: the -request endpoints reject with OTP_RESEND_COOLDOWN if called twice within 30 seconds for the same email.
  • Abuse caps: 20 requests per email per hour, 60 per IP per hour, across both signup and login.
  • Code lifetime: 10 minutes. 5 bad attempts locks the code out.
  • Purpose isolation: a code issued for signup cannot be consumed by cliCompleteLogin (and vice versa) — returns OTP_PURPOSE_MISMATCH.

POST /cliRequestSignupOtp

When to use

Brand-new user; no Slideless account yet. Pre-flight check: if a Firebase Auth user already exists for the email and has ≥1 organization, the request returns USER_ALREADY_HAS_ORGANIZATION — the client should switch to /cliRequestLoginOtp.

Endpoint

Request body

Response (200)

Examples

Errors


POST /cliCompleteSignup

When to use

Second half of signup. Consumes the emailed code, creates the Firebase Auth user (if missing), creates a users/{uid} doc, creates a single-owner organization, optionally uploads the logo to GCS, mints a cko_ API key with full presentation scopes, and returns the raw key.

Endpoint

Request body

Response (200)

apiKey.raw is only returned in this single response — the server stores a SHA-256 hash.

Errors


POST /cliRequestLoginOtp

When to use

Existing user on a new machine (or with a revoked key). Pre-flight check: if the email has no Firebase Auth user, returns USER_NOT_FOUND; if it exists but has no organization, returns USER_HAS_NO_ORGANIZATION. Both push the client back to /cliRequestSignupOtp.

Endpoint

Request body

Response (200)

Same shape as /cliRequestSignupOtp:

Errors


POST /cliCompleteLogin

When to use

Consume a login OTP and mint a fresh cko_ key for the account’s existing organization.

Endpoint

Request body

apiKey is optional (same defaults as /cliCompleteSignup).

Response (200)

Each successful call mints a new key. Previous keys stay valid until revoked from the dashboard.

Errors


Agent recipe

For a script or Claude Code skill: run the signup path optimistically; if the server says the user already has an organization, retry via login. This handles every case in two or three HTTP calls.
The setup-slideless marketplace skill encodes this logic.

See also

  • cli/auth — the CLI wrapper around these four endpoints.
  • Authentication — how the resulting cko_ key is used on subsequent calls.
  • concepts/api-keys — lifecycle and security model for cko_ keys.