Account

Request a magic-link signup

Consumer self-serve sign-up entry point. Accepts an email (required) and an optional company_name, requests a Supabase Auth magic link, and returns a constant-time {ok: true} response on every valid Zod input — regardless of whether the email is already registered. The email-enumeration defense is intentional: returning a different shape for new vs existing emails would let attackers probe the registered-email set. The login flow MUST omit company_name to avoid clobbering returning-user metadata; the signup flow sends it together with consent: true — active acceptance of the Terms of Service and Privacy Policy, required on every signup-shaped body (GDPR active opt-in; never defaulted). Consent is version-bound: on every consenting signup the server stamps the CURRENT terms version (published in the machine-readable manifest at /.well-known/terms.json) into user_metadata beside the consent timestamp, and the optional terms_version field lets an agent assert which version it read — an assertion that does not match the current version is rejected rather than recorded, so a stale consent can never be stamped. Rate-limited at two layers: 5 requests per hour per IP (fail-CLOSED — a rate-limit-store outage blocks that IP rather than widening the gate) and a global hourly signup ceiling across all callers (an IP-agnostic circuit-breaker against distributed burner-signup floods; fail-OPEN so a store outage never takes the whole surface offline). Returns 400 on request-validation failure: a malformed / non-JSON body (VALIDATION_FAILED with a $body details entry and summary Invalid JSON body) or a Zod failure (malformed email, a disposable / temporary-inbox email domain on a signup-shaped body — login-shaped/email-only bodies are not domain-blocked so returning users aren't locked out, company_name present but empty / oversize, a signup-shaped body without consent: true, a signup-shaped body whose terms_version claim does not equal the current terms version, or a login-shaped body carrying consent or terms_version — both fields belong to the signup shape exclusively); 429 when either rate-limit layer is hit.

post/api/v1/account/signup

Request

  • Base URL: https://www.apier.no
  • URL: https://www.apier.no/api/v1/account/signup
  • Auth: none required

Request body

OR

Response

Magic link request accepted. The same response is returned whether the email was new or already registered. The X-Correlation-ID response header echoes the request's correlation id (or a freshly-minted one) so the caller can thread it into their own trace system. The Link header carries </openapi.json>; rel="service-desc".

successtrue required

Example response

{
  "_meta": {
    "rulebook_version": "v1.0.0",
    "source": "apier.no",
    "data_source": "Brønnøysund Enhetsregisteret + Apier Universal Rulebook",
    "schema_version": "1.0.0",
    "legal_basis": "NLOD — public registry reuse",
    "response_timestamp": "2026-04-24T12:00:00.000Z",
    "response_hash": "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    "source_snapshot_id": "brreg-2026-04-24T02:00:00.000Z",
    "cost_nok": 0.5,
    "wallet_remaining_nok": 9.5,
    "spend_cap_remaining_nok": 12.5
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.