Documentation
Getting started

Registration via API

A single endpoint to obtain access — for sandbox testing or full accounts with their own tenant.

Two flows

Both flows go through the same waitlist queue and use POST /v1/signup. Differ by the body params.

  • Sandbox (default): instant ldm_pk_* bearer with quota 500/month. Messages held for moderation.
  • Full account (full_account: true): creates a User + Tenant + DB after admin approval. Email confirmation + ToS acceptance required.

Full account flow (state machine)

POST /v1/signup { email, password, firstName, full_account: true }
   → registration_status = awaiting_email_confirm

User clicks confirmation link in email
   → registration_status = awaiting_agreement

User clicks "I accept Terms" link in email
   → registration_status = awaiting_admin_approval  ← visible in admin panel

Admin approves
   → User + Tenant + DB created, key scope = approved, registration_status = approved
Admin rejects
   → waitlist & key deleted (no orphan User/Tenant since none were created)

TTL: inactive >24h or pending approval >7d → auto-deleted

Polling for status

The api_key returned at signup is the SAME token you keep using throughout. While pending, it has no API privileges (use it only for /v1/me polling). When the admin approves, the same key is auto-promoted to scope approved — no rotation needed.

curl -X POST https://api.live-direct-marketing.online/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"a@example.com","password":"strongpass1","firstName":"A","full_account":true}'
# => { api_key, registration_status: "awaiting_email_confirm" }

# poll
curl -H "Authorization: Bearer $API_KEY" https://api.live-direct-marketing.online/v1/me
# while pending => { registration_status: "awaiting_email_confirm" | "awaiting_agreement" | "awaiting_admin_approval" }
# after approve => { registration_status: "approved", user, tenant }

Limits and notes

  • Signup rate limit: 5 per IP / hour + a global ceiling of 50 / hour. Exceeding either returns 429.
  • Request body limit on /v1/signup: 64 KB (returns 413 if exceeded).
  • Password: minimum 10 characters. Common passwords (e.g. password, qwerty123) are rejected with 400.
  • Extra fields in the request body are rejected with 400 (the schema is strictly whitelisted).
  • Re-using an email that already has a registered account returns the same 201 as a fresh signup — the existing account is never revealed to the caller, and the real owner receives a notification email.
  • Email confirm + ToS acceptance links expire in 24 hours.
  • Pending admin approval expires in 7 days.
  • Authentication · Moderation · Rate limits