> ## Documentation Index
> Fetch the complete documentation index at: https://docs.watchdog.no/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create an API key and make your first request.

This page gets you from nothing to your first successful request in a few minutes.

<Warning>
  The API is in beta. Endpoints, fields and behavior may change without notice until we release a
  stable version. See [changes to the API](/api-reference/conventions#changes-to-the-api).
</Warning>

## Connect and check access

<Steps>
  <Step title="Create an API key">
    In Watchdog, open **Settings → Personal → API keys → Create API key**. Choose **Write** if you
    will upload or change data, or **Read** if you only need to read it. Select the organization
    the key should work in, and copy the key when it is shown. You won't see it again.
  </Step>

  <Step title="Find your organization ID">
    Open your organization in Watchdog. The organization ID is the `org_…` part of the address.
  </Step>

  <Step title="Make a request">
    Every request sends your key and your organization ID:

    ```bash theme={null}
    export API_URL=https://api.watchdog.no
    export API_KEY='<your API key>'
    export ORGANIZATION_ID='<your org_… ID>'

    curl "$API_URL/v1/organization" \
      -H "Authorization: Bearer $API_KEY" \
      -H "X-Organization-Id: $ORGANIZATION_ID"
    ```

    The answer describes your organization, and `access` shows what your key is allowed to do.
  </Step>
</Steps>

If you get `401`, the key is wrong or has been revoked. If you get `403`, the key doesn't have
access to that organization or isn't allowed to do what you asked. See
[authentication and API keys](/api-reference/authentication) for the details.

## What next

<CardGroup cols={2}>
  <Card title="Upload invoices" icon="file-arrow-up" href="/api-reference/upload-invoices">
    Send invoice files to Watchdog and get the result of the checks.
  </Card>

  <Card title="Work with invoices" icon="file-invoice" href="/api-reference/invoices">
    Find, create and edit invoices.
  </Card>

  <Card title="Agreements" icon="file-contract" href="/api-reference/agreements">
    Manage agreements and their prices.
  </Card>

  <Card title="API conventions" icon="book" href="/api-reference/conventions">
    Pagination, errors and safe retries, shared by every endpoint.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.