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

# Make Your First Request

> Test your API key with a real call and understand the response structure.

You have your Location ID and API key. Let's make a real call.

## Fetch your contacts

This retrieves the first 5 contacts in your account — a simple read operation that confirms everything is working.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X GET "https://services.leadconnectorhq.com/contacts/?locationId=YOUR_LOCATION_ID&limit=5" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Version: 2021-07-28"
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const response = await fetch(
      'https://services.leadconnectorhq.com/contacts/?locationId=YOUR_LOCATION_ID&limit=5',
      {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY',
          'Version': '2021-07-28'
        }
      }
    );
    const data = await response.json();
    console.log(data);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.get(
        'https://services.leadconnectorhq.com/contacts/',
        params={'locationId': 'YOUR_LOCATION_ID', 'limit': 5},
        headers={
            'Authorization': 'Bearer YOUR_API_KEY',
            'Version': '2021-07-28'
        }
    )
    print(response.json())
    ```
  </Tab>
</Tabs>

## What you get back

```json theme={null}
{
  "contacts": [
    {
      "id": "abc123",
      "name": "Jane Smith",
      "email": "jane@example.com",
      "phone": "+15551234567",
      "tags": ["lead", "website-visitor"],
      "dateAdded": "2025-01-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "total": 142,
    "currentPage": 1,
    "nextPage": 2
  }
}
```

The `meta` object tells you the total number of matching records and how to paginate. See [Making Requests](/developer/guide/making-requests) for pagination details.

## Common errors

| Status                  | Meaning                        | Fix                                                          |
| ----------------------- | ------------------------------ | ------------------------------------------------------------ |
| `401 Unauthorized`      | Missing or invalid token       | Check your `Authorization: Bearer` header                    |
| `403 Forbidden`         | Token lacks the required scope | Go to Private Integrations and add the Contacts (Read) scope |
| `422 Unprocessable`     | Missing required field         | Check the API reference for required parameters              |
| `429 Too Many Requests` | Rate limit hit                 | Back off and retry — max 100 requests / 10 seconds           |

## Try creating a contact

Once reads work, try a write:

```bash theme={null}
curl -X POST "https://services.leadconnectorhq.com/contacts/" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Version: 2021-07-28" \
  -H "Content-Type: application/json" \
  -d '{
    "locationId": "YOUR_LOCATION_ID",
    "firstName": "Test",
    "lastName": "Contact",
    "email": "test@example.com"
  }'
```

## What's next

<CardGroup cols={2}>
  <Card title="Contacts API" icon="address-book" href="/api-reference/contacts/overview">
    Full reference for creating, updating, and searching contacts
  </Card>

  <Card title="Conversations API" icon="comments" href="/api-reference/conversations/overview">
    Send messages and manage conversation threads
  </Card>

  <Card title="Making Requests" icon="code" href="/developer/guide/making-requests">
    Pagination, filtering, sorting, and error handling patterns
  </Card>

  <Card title="Webhooks" icon="bell" href="/developer/guide/webhooks">
    React to real-time events instead of polling
  </Card>
</CardGroup>
