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

# Quickstart

> Get started with the AlfaOne API in under 5 minutes

## Setup your API Key

Before you can make API requests, you'll need to generate an API key from your AlfaOne dashboard.

<Steps>
  <Step title="Navigate to Integrations">
    Log in to your AlfaOne admin dashboard and navigate to **Settings → Integrations**.
  </Step>

  <Step title="Create an API Key">
    Click on **Generate API Key**, provide a descriptive name for your key, and save it.

    <Warning>
      Store your API key securely. You won't be able to see the full key again after creation.
    </Warning>
  </Step>

  <Step title="Copy your API Key">
    Copy the generated API key. It will be in the format: `ak_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
  </Step>
</Steps>

## Make your first API call

Now that you have your API key, let's make your first request to list all assessments in your organization.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://alfaone.app/api/v1/assessments" \
    -H "x-api-key: ak_live_your_api_key_here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://alfaone.app/api/v1/assessments', {
    method: 'GET',
    headers: {
      'x-api-key': 'ak_live_your_api_key_here'
    }
  });

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

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

  response = requests.get(
      'https://alfaone.app/api/v1/assessments',
      headers={'x-api-key': 'ak_live_your_api_key_here'}
  )

  assessments = response.json()['assessments']
  print(assessments)
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "assessments": [
    {
      "id": "7cac8eb9-09a8-4cec-b28e-dfc50db8d0f9",
      "name": "Software Engineer Assessment",
      "defaultQuestionFormat": "audio",
      "defaultAnswerFormat": "audio",
      "languages": ["en", "es"],
      "questionCount": 10,
      "inviteCount": 25,
      "createdAt": "2025-01-01T10:00:00.000Z",
      "updatedAt": "2025-01-02T15:30:00.000Z"
    }
  ]
}
```

## Send an assessment invite

Once you have an assessment ID, you can programmatically invite a candidate to take it.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://alfaone.app/api/v1/invites" \
    -H "x-api-key: ak_live_your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "assessmentId": "7cac8eb9-09a8-4cec-b28e-dfc50db8d0f9",
      "recipientEmail": "candidate@example.com"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://alfaone.app/api/v1/invites', {
    method: 'POST',
    headers: {
      'x-api-key': 'ak_live_your_api_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      assessmentId: '7cac8eb9-09a8-4cec-b28e-dfc50db8d0f9',
      recipientEmail: 'candidate@example.com'
    })
  });

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

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

  response = requests.post(
      'https://alfaone.app/api/v1/invites',
      headers={'x-api-key': 'ak_live_your_api_key_here'},
      json={
          'assessmentId': '7cac8eb9-09a8-4cec-b28e-dfc50db8d0f9',
          'recipientEmail': 'candidate@example.com'
      }
  )

  invite = response.json()['invite']
  print(invite)
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "invite": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "assessmentId": "7cac8eb9-09a8-4cec-b28e-dfc50db8d0f9",
    "assessmentName": "Software Engineer Assessment",
    "recipientEmail": "candidate@example.com",
    "recipientName": null,
    "status": "pending",
    "questionReplayLimit": 1,
    "answerRecordLimit": 1,
    "sentAt": "2025-01-15T12:00:00.000Z",
    "expiresAt": "2025-02-14T12:00:00.000Z",
    "acceptedAt": null,
    "startedAt": null,
    "completedAt": null
  }
}
```

The candidate will automatically receive an email with a link to start the assessment.

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn more about API authentication and security
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Explore all available endpoints
  </Card>
</CardGroup>
