Skip to content
docs Explore the platform

ANTSAND · GUIDE

Login

> Production API availability: use /api/v1/help?view=guides and the resource operations catalog before following a recipe. Some localhost capabilities are not deployed yet; an absent operation is unavailable.

What this module owns

API-key identity, scopes, sign-in and central authentication. Generated-site member authentication is a separate account boundary.

Establish identity first

GET /api/v1/me verifies the key and returns its identity and scopes. ApiKeyAuth rejects a missing or invalid key with 401 and an insufficient required scope with 403. It accepts Authorization: Bearer and X-Antsand-Api-Key. Store secrets outside content and board data.

A session cookie, a central API key, a generated-site member session and a Labs machine token are different credentials. Transactional member-mail endpoints use their own service authorization; they are not generic mail-sending endpoints. Read the delivery contract before invoking them.

First read

Use API_URL with /api/v1, for example http://localhost/api/v1. Set API_KEY privately. Replace any resource placeholder with an ID returned by discovery.

Examplebash
curl --fail-with-body "$API_URL/me" \
  -H "Authorization: Bearer $API_KEY"

Registered agent routes

The entries below are extracted from the current route and handler source. Scope tokens can represent alternatives or different method branches, not a requirement to grant every listed scope. Body fields are observed inputs, not a complete required-field schema. Follow the resource guide and the deployed validation response for a write.

/api/v1/me

Intended request methods: GET. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: profile:read

/api/v1/help

Intended request methods: GET. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: No per-user scope token was extracted; inspect the service/token or discovery authorization before calling.

/api/v1/transactional/member-verification

Intended request methods: POST. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: No per-user scope token was extracted; inspect the service/token or discovery authorization before calling.

Observed JSON fields: email, site_alias, site_id, verification_url.

Selected rejection messages:

  • Method not allowed
  • Unauthorized member mail site
  • Invalid verification request
  • Mail service unavailable

/api/v1/transactional/member-password-recovery

Intended request methods: POST. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: No per-user scope token was extracted; inspect the service/token or discovery authorization before calling.

Observed JSON fields: email, recovery_url, site_alias, site_id.

Selected rejection messages:

  • Method not allowed
  • Unauthorized member mail site
  • Invalid recovery request
  • Mail service unavailable

/api/v1/site-design-contract

Unavailable in this production release. This reference describes a pending capability. Do not call this endpoint; use deployed discovery to check availability. Intended request methods: GET. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: No per-user scope token was extracted; inspect the service/token or discovery authorization before calling.

Selected rejection messages:

  • Site design contract unavailable

/api/v1/assets

Intended request methods: POST. Confirm allowed_methods and method_evidence in the deployed operations catalog; documented methods do not grant access.

Scope tokens in the implementation: carousel:write, databoard:write, notes:write

Selected rejection messages:

  • Use POST multipart/form-data with file[] or file
  • No uploaded files found
  • Upload at most
  • Only image uploads are currently allowed through the agent asset API
  • Image is too large. Compress to 1024px wide and under 1MB before upload.

Access boundary

External agents use only the versioned operations documented above and returned by the deployed catalog. Browser actions and internal controllers are not substitutes for missing API operations.

Verification before automation

Read back the owned record after a write. On a dedicated local fixture, test missing input, wrong owner, missing scope and stale revisions where supported. Confirm the request did not change state when rejected. Check the generated projection separately from the source record. Never replay sends, payments or deletion requests merely to test connectivity.

See API validation and remaining gaps for the shared test strategy.

HTTP discovery and safety contract

Read GET /api/v1/help?view=guide&resource=login for this module's machine-readable guidance. Discover supported operations through its discovery_url when present. A null discovery_url means no direct resource API is documented; related endpoints, when provided, have their own ownership and scope requirements.

Use GET /api/v1/me with your key to confirm identity and scopes. Only request methods and fields supported by this deployment. The shared transport boundary rejects unsupported methods and malformed JSON on covered routes, but field schemas and revision checks remain resource-specific. Notes and Carousels expose typed save schemas and payload-only validation; other modules must not be assumed to share that contract.

Create, update, replace, patch, delete, send and publish are distinct capabilities. An operation absent from the returned catalog is unavailable, not permission to guess a URL. Read back after writes; after a timeout inspect the result before retrying. Never automatically replay a payment, message, deployment or deletion.

See HTTP-only agent workflow and validation contracts.