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

# Quickstart

> Make your first API call in minutes

This guide will help you make your first request to the Tomorro API.

## Step 1: Get your API key

To authenticate with the Tomorro API, you need an API key.

<Steps>
  <Step title="Log in to Tomorro">Go to [app.tomorro.com](https://app.tomorro.com) and sign in to your account.</Step>
  <Step title="Navigate to API Settings">Go to **Settings** → **API** in your organization dashboard.</Step>

  <Step title="Generate an API Key">
    Click **Create API Key**, give it a name, and copy the generated key.
    <Warning>Store your API key securely. It won't be shown again after you leave the page.</Warning>
  </Step>
</Steps>

## Step 2: Make your first request

Let's list the members in your organization. Replace `your-api-key` with your actual API key.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.tomorro.com/v2/members" \
    -H "x-api-key: your-api-key" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.tomorro.com/v2/members', {
    method: 'GET',
    headers: {
      'x-api-key': 'your-api-key',
      'Content-Type': 'application/json',
    },
  });

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

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

  response = requests.get(
      'https://api.tomorro.com/v2/members',
      headers={
          'x-api-key': 'your-api-key',
          'Content-Type': 'application/json'
      }
  )

  print(response.json())
  ```
</CodeGroup>

You should receive a response like this:

```json theme={null}
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "role": "ADMIN",
      "status": "active",
      "user": {
        "email": "john.doe@example.com",
        "firstname": "John",
        "lastname": "Doe"
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasNext": false,
    "hasPrevious": false,
    "nextCursor": null,
    "previousCursor": null
  }
}
```

## Step 3: Create a member

Now let's create a new member in your organization:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.tomorro.com/v2/members" \
    -H "x-api-key: your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "username": "jane.smith@example.com",
      "role": "USER",
      "sendInvitation": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.tomorro.com/v2/members', {
    method: 'POST',
    headers: {
      'x-api-key': 'your-api-key',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      username: 'jane.smith@example.com',
      role: 'USER',
      sendInvitation: true,
    }),
  });

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

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

  response = requests.post(
      'https://api.tomorro.com/v2/members',
      headers={
          'x-api-key': 'your-api-key',
          'Content-Type': 'application/json'
      },
      json={
          'username': 'jane.smith@example.com',
          'role': 'USER',
          'sendInvitation': True
      }
  )

  print(response.json())
  ```
</CodeGroup>
