# ClickOptions auth.md

This document tells automated agents how authentication and registration
work on ClickOptions.

## Audience

Agents and API clients that use the public ClickOptions APIs. The API
catalog is at [https://clickoptions.ai/.well-known/api-catalog](https://clickoptions.ai/.well-known/api-catalog).

## Agent registration

Agents register through the same public endpoints as human users. There
is no separate agent-only registration flow.

- Registration endpoint: `POST https://client-api.clickoptions.ai/api/signup/email`
- Supported registration method: email + password (JSON body).
- The signup request must include a Cloudflare Turnstile token. The web
  app at [https://app.clickoptions.ai](https://app.clickoptions.ai) issues that token, so an agent must complete
  registration through the web app.
- Email confirmation is required. The link in the confirmation email
  calls `POST https://client-api.clickoptions.ai/api/auth/email/confirm`.

## Credential use

- `POST https://client-api.clickoptions.ai/api/login/email` returns a JWT token pair in the
  response body.
- Send the access token in the `Authorization: Bearer <token>` header
  on every API request.
- `GET https://client-api.clickoptions.ai/api/auth/session` returns the current session.
- `GET https://client-api.clickoptions.ai/api/auth/refresh` returns a new token pair.

## OAuth metadata

This service does not publish OAuth Protected Resource Metadata or
Authorization Server metadata. There is no dynamic client registration.

## Limits

- Real-money trading requires KYC verification of a human identity.
- Login and signup endpoints are rate-limited.
- The full endpoint reference is in the OpenAPI spec:
  [https://client-api.clickoptions.ai/api/docs-json](https://client-api.clickoptions.ai/api/docs-json).
