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

# Authenticate API Key

> Verify that the PCI Booking service is available and your API key is valid.

This method lets you verify that the PCI Booking service is available and that your API key is valid.

<Card title="Authentication Guide" icon="book" href="/getting-started/authentication#api-key">
  Learn about API key authentication
</Card>

## Error Responses

| HTTP Status | Error Code | Description                                                                  |
| ----------- | ---------- | ---------------------------------------------------------------------------- |
| 401         | -1003      | Not authenticated. The API key is missing, malformed, or invalid.            |
| 401         | -1005      | User suspended. The account associated with this API key has been suspended. |
| 401         | -1006      | User closed. The account associated with this API key has been closed.       |
| 429         |            | Rate limited. Too many authentication requests in a short period.            |

Both `POST` and `GET` methods are supported:

```text theme={null}
GET https://service.pcibooking.net/api/accounts/authenticate/
```

## Parameters

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. See the [Authentication guide](/getting-started/authentication).
</ParamField>

<RequestExample>
  ```javascript Node.js theme={null}
  const response = await fetch('https://service.pcibooking.net/api/accounts/authenticate/', {
    method: 'POST',
    headers: {
      'Authorization': 'APIKEY your-api-key'
    }
  });

  console.log(response.status); // 200 if valid
  ```

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

  response = requests.post(
      'https://service.pcibooking.net/api/accounts/authenticate/',
      headers={
          'Authorization': 'APIKEY your-api-key'
      }
  )

  print(response.status_code)  # 200 if valid
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 theme={null}
  // Empty body. The API key is valid and the service is available.
  ```

  ```json 401 theme={null}
  {
      "code": -1003,
      "message": "Not authorized to access this resource",
      "moreInfo": "Bad or missing authorization data, expected APIKEY",
      "errorList": null
  }
  ```
</ResponseExample>
