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

# Get Started with the TeamCare Vendor API

> Learn how to authenticate and make your first TeamCare API request in four steps: register, generate keys, get a token, and query data.

This guide walks you through the steps to create your TeamCare vendor account, generate API credentials, and make your first authenticated request to the Vendor API.

<Steps>
  <Step title="Register your consulting firm">
    Visit the TeamCare production environment at [https://app.teamcaredental.com](https://app.teamcaredental.com) and register your consulting firm (also referred to as your vendor or agency account).
  </Step>

  <Step title="Add practices under your account">
    After registration, add the dental practices (organizations) you want to access. Each practice can have multiple locations, and data is stored per location.
  </Step>

  <Step title="Accept the API agreement and generate API keys">
    1. Go to **Settings > Company > Agreement** and accept the Developer API Agreement (only the account owner can do this).
    2. Go to **Settings > Company > API Access** and generate your API keys.
    3. Copy your `client_id` and `client_secret`. The secret is shown only once. If you regenerate keys, the old ones are immediately invalidated.
  </Step>

  <Step title="Get a Bearer Token">
    Exchange your credentials for a JWT Bearer Token by sending a POST request to the authentication endpoint.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://app.teamcaredental.com/api/v1/vendors/auth/token" \
        -H "Content-Type: application/json" \
        -d '{
          "client_id": "YOUR_CLIENT_ID",
          "client_secret": "YOUR_CLIENT_SECRET"
        }'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://app.teamcaredental.com/api/v1/vendors/auth/token",
          json={
              "client_id": "YOUR_CLIENT_ID",
              "client_secret": "YOUR_CLIENT_SECRET"
          }
      )
      token = response.json()["token"]
      ```
    </CodeGroup>

    The response looks like this:

    ```json theme={null}
    {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
    ```

    <Note>
      The token is valid for 6 hours. Cache it and reuse it until it expires. Do not request a new token for every API call.
    </Note>
  </Step>

  <Step title="Make your first request">
    Use your Bearer Token to call the organizations endpoint and list the practices associated with your account.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET "https://app.teamcaredental.com/api/v1/vendors/organizations" \
        -H "Authorization: Bearer YOUR_TOKEN"
      ```

      ```python Python theme={null}
      import requests

      headers = {"Authorization": "Bearer YOUR_TOKEN"}
      response = requests.get(
          "https://app.teamcaredental.com/api/v1/vendors/organizations",
          headers=headers
      )
      print(response.json())
      ```
    </CodeGroup>

    Example response:

    ```json theme={null}
    {
      "data": [
        {
          "id": "org_123",
          "name": "Bright Smile Dental Group",
          "created_at": "2024-01-15T09:30:00Z"
        }
      ],
      "meta": {
        "next_cursor": null
      }
    }
    ```
  </Step>
</Steps>

<Note>
  The token endpoint has its own rate limit: 10 requests per minute per IP. If you request a token on every API call, you will quickly exhaust this budget and receive 429 errors.
</Note>

## Next steps

<CardGroup cols="2">
  <Card title="Authentication" icon="key" href="/authentication">
    Dive deeper into key generation, token handling, and best practices.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Explore all available endpoints for patients, appointments, treatments, and more.
  </Card>
</CardGroup>
