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

# Quickstart

> Make your first API call in under 5 minutes

## Prerequisites

Before you begin, make sure you have:

<Steps>
  <Step title="A Sesame HR account">
    Sign up at [sesamehr.com](https://sesamehr.com) if you don't have one
  </Step>

  <Step title="Admin access">
    You need admin permissions to generate API tokens
  </Step>
</Steps>

## Step 1: Get Your API Token

<Steps>
  <Step title="Log in to Sesame HR">
    Go to [app.sesametime.com](https://app.sesametime.com) and log in with your credentials
  </Step>

  <Step title="Navigate to API Settings">
    Go to **Settings** > **Integrations** > **API**
  </Step>

  <Step title="Generate a new token">
    Click **Generate Token** and copy the token immediately
  </Step>
</Steps>

## Step 2: Make Your First Request

Test your token by fetching your account information:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api-{region}.sesametime.com/core/v3/info" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api-{region}.sesametime.com/core/v3/info', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

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

  response = requests.get(
      'https://api-{region}.sesametime.com/core/v3/info',
      headers={
          'Authorization': 'Bearer YOUR_API_TOKEN',
          'Content-Type': 'application/json'
      }
  )

  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
      CURLOPT_URL => "https://api-{region}.sesametime.com/core/v3/info",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "Authorization: Bearer YOUR_API_TOKEN",
          "Content-Type: application/json"
      ],
  ]);

  $response = curl_exec($curl);
  curl_close($curl);

  echo $response;
  ?>
  ```
</CodeGroup>

You should receive a response like:

```json theme={null}
{
  "data": {
    "company": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "Demo Company",
      "notificationEmail": "demo@example.com",
      "language": "en-GB",
      "createdAt": "2020-01-01T10:00:00+01:00",
      "updatedAt": "2020-01-01T10:00:00+01:00"
    }
  }
}
```

## Step 3: List Your Employees

Now let's fetch your employee list:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api-{region}.sesametime.com/core/v3/employees?limit=10" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api-{region}.sesametime.com/core/v3/employees?limit=10', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  });

  const { data, meta } = await response.json();
  console.log(`Found ${meta.total} employees`);
  data.forEach(emp => console.log(`${emp.firstName} ${emp.lastName}`));
  ```

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

  response = requests.get(
      'https://api-{region}.sesametime.com/core/v3/employees',
      headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
      params={'limit': 10}
  )

  result = response.json()
  print(f"Found {result['meta']['total']} employees")
  for emp in result['data']:
      print(f"{emp['firstName']} {emp['lastName']}")
  ```
</CodeGroup>

## Common Use Cases

Now that you're set up, explore these common integration scenarios:

<CardGroup cols={2}>
  <Card title="Sync Employees" icon="sync">
    Keep your HR system in sync with Sesame
  </Card>

  <Card title="Automate Time Tracking" icon="clock">
    Build automated clock-in/out systems
  </Card>

  <Card title="Manage Vacations" icon="umbrella-beach">
    Handle vacation requests programmatically
  </Card>

  <Card title="Integrate Payroll" icon="money-bill-wave">
    Export time data for payroll processing
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={3}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn about token management and security
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/errors">
    Handle errors gracefully
  </Card>

  <Card title="Rate Limiting" icon="gauge" href="/rate-limiting">
    Understand API limits
  </Card>
</CardGroup>
