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

# Making your first request

> Make your first ATS API request to list candidates from a connected applicant tracking system

This guide walks you through making your first API request to retrieve data from a linked account.

## Prerequisites

1. [**API Key created in StackOne Dashboard**](https://docs.stackone.com/embed/api-keys) and copied to a secure location

2. [**Basic Authentication Setup**](https://docs.stackone.com/platform-api/authentication) - Learn how to properly authenticate with StackOne API using your API key

3. Required provider integration enabled

4. Account linked successfully

5. (Optional) Use an [SDK](https://docs.stackone.com/platform-api/api-sdks)

## Getting Account ID

> [!NOTE]
>
> **Authentication**: When using `curl -u "$API_KEY:"`, encoding is handled automatically. When setting the `Authorization` header manually, base64 encode `{api_key}:`, your key followed by a colon. See [Authentication](https://docs.stackone.com/platform-api/authentication) for details.

1. List your linked accounts to find the account ID:

```bash theme={null}
curl --request GET \
     --url https://api.stackone.com/accounts \
     --header 'accept: application/json' \
     --header 'authorization: Basic {base64_encoded_api_key}'
```

2. From the response, copy the `id` value for your desired provider account.

> [!TIP]
>
> Filter by provider using the `providers` query parameter:
>
> ```bash theme={null}
> curl --request GET \
>      --url 'https://api.stackone.com/accounts?providers={provider_name}' \
>      --header 'accept: application/json' \
>      --header 'authorization: Basic {base64_encoded_api_key}'
> ```

## Making Your First Request

Now you're ready to make your first ATS API call. Let's list candidates from the connected applicant tracking system:

> [tab] cURL
>
> ```bash theme={null}
> curl --request GET \
>   --url 'https://api.stackone.com/unified/ats/candidates' \
>   --header 'accept: application/json' \
>   --header 'authorization: Basic {base64_encoded_api_key}' \
>   --header 'x-account-id: {account_id}'
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> import { StackOne } from "@stackone/stackone-client-ts";
>
> const client = new StackOne({ apiKey: "YOUR_API_KEY" });
>
> const response = await client.ats.listCandidates({
>   xAccountId: "your-account-id"
> });
>
> console.log(response.candidates);
> ```

> [tab] Python
>
> ```python theme={null}
> from stackone_client import StackOne
>
> client = StackOne(api_key="YOUR_API_KEY")
>
> response = client.ats.list_candidates(
>     x_account_id="your-account-id"
> )
>
> print(response.candidates)
> ```

### Example Response

```json theme={null}
{
  "data": [
    {
      "id": "cand_123",
      "remote_id": "abc123",
      "first_name": "Alex",
      "last_name": "Johnson",
      "name": "Alex Johnson",
      "email": "alex.johnson@email.com",
      "phone_number": "+1-555-0123",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-20T14:45:00Z"
    }
  ]
}
```

## Next Steps

> [card] [Get Candidate](https://hub.stackone.com/ats/api-reference/candidates/get-candidate.md)
>
> Retrieve details for a specific candidate

> [card] [List Jobs](https://hub.stackone.com/ats/api-reference/jobs/list-jobs.md)
>
> Get open positions from the ATS

> [card] [Pagination](https://hub.stackone.com/legacy-unified-apis/common-guide/pagination.md)
>
> Handle large result sets efficiently

> [card] [Applications](https://hub.stackone.com/ats/api-reference/applications/list-applications.md)
>
> View candidate applications

## References

* [Authentication](https://docs.stackone.com/platform-api/authentication)
* [List Accounts](https://docs.stackone.com/platform/api-reference/accounts/list-accounts)
* [API SDKs](https://docs.stackone.com/platform-api/api-sdks)
* [Connector Profiles](https://app.stackone.com/connector_profiles)


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