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

# Authentication

Zenskar’s APIs use API key–based authentication, requiring two headers in every request: `x-api-key` and `organisation`. The `x-api-key` header carries your unique API key, while the `organisation` header identifies your Zenskar account. This guide walks you through how to generate and manage API keys, authenticate requests using tools like Postman and Zenskar’s interactive docs, and follow best practices for secure access.

<Accordion title="Create an API key" icon="fa-shoe-prints">
  1. Click your name at the bottom of the side panel to open the menu.
  2. Click **Settings** option to open the **Settings** page.
  3. On the **Settings** page, navigate to the **API Keys** tab.
  4. Click on the **+ CREATE API KEY** button.
  5. Enter a descriptive name for the key and click on the **GENERATE API KEY** button.
  6. Click on the **Copy** button.

  <Warning>
    Save the API key somewhere safe. The API key cannot be viewed or copied after this step.
  </Warning>
</Accordion>

<Accordion title="Retrieve the Organization Id" icon="fa-shoe-prints">
  The value for the `organisation` header can be obtained by navigating to the **General** tab on the **Settings** page. The `organisation` header accepts a valid [universally unique identifier (UUID)](https://developer.mozilla.org/en-US/docs/Glossary/UUID).
</Accordion>

<Accordion title="Test APIs in Zenskar documentation" icon="fa-shoe-prints">
  1. Navigate to the API documentation for the endpoint you want to test.
  2. Enter your API key in the **Header** field under the **AUTHORIZATION** section (see below). This adds an `x-api-key` header to the request.
  3. Some APIs require you to include the mandatory `organisation` header in your request. You can find it listed under the **Headers** section of the API documentation (see screenshot below).
  4. Optionally, provide additional query parameters to refine your request.
  5. Click the **Try It!** button. A successful response will return `HTTP 200 OK` along with the expected JSON output.
</Accordion>

<Accordion title="Test the API using other tools" icon="fa-shoe-prints">
  You can use your API keys to test Zenskar APIs with tools like Postman or Thunder Client. Refer to the documentation for each tool to learn how to set headers and send requests.
</Accordion>

<Accordion title="Delete API key" icon="fa-shoe-prints">
  1. Click your name at the bottom of the side panel to open the menu.
  2. Click **Settings** option to open the **Settings** page.
  3. On the **Settings** page, navigate to the **API Keys** tab.
  4. Click the kebab menu (⋮) next to the API key you want to delete.
  5. Select **Delete** from the menu.
</Accordion>
