Skip to content
1 of 7 · Headless foundations

Quickstart and authentication

Create an operational API key, verify it safely, and make your first server-side request.

Before you begin#

  • Create your account, organization, and API key in the authenticated platform UI.
  • Copy the raw API key when it is shown and store it in a server-side secret manager.
  • Choose the production API origin supplied for your organization; do not invent an /api or /v1 prefix.

Verify access#

  1. Set the credential

    Load the raw key from a secret such as MODASTERA_API_KEY. Never embed it in browser JavaScript or commit it to source control.

  2. Send the authentication header

    Use Authorization: Api-Key <raw_api_key>. Bearer compatibility exists for selected legacy flows, but API-key authentication is the documented operational contract.

  3. List datasets

    Call GET /datasets/datasets/ and confirm the response belongs to the intended organization.

  4. Handle failure explicitly

    Treat 401 as a missing or invalid credential and 403 as an authenticated permission failure. Do not retry either response indefinitely.

Use the canonical examples#

The complete reference contains copyable cURL and Python examples, exact response distinctions, and the current production endpoint cards.