> ## Documentation Index
> Fetch the complete documentation index at: https://plain-docs-orca-916-agent-docs-restructure.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Create a machine user and an API key, and scope it with fine-grained permissions.

A machine user can have several API keys, so you can rotate them without downtime. Each API key carries its own fine-grained permissions.

<Steps>
  <Step title="Create a machine user">
    Go to **Settings** → **Machine Users** and click **+ Add Machine User**

    A machine user has two fields:

    * **Name:** visible only to you and could indicate the usage e.g. "Autoresponder"
    * **Public name:** This is the name visible to customers (if the machine user interacts with customers) e.g. "Mr Robot"
  </Step>

  <Step title="Create an API Key">
    Click "Add API key" and select the permissions you need. When making API calls, if you have insufficient permissions, the error should tell you which permissions you need.

    The relevant documentation will tell you which permissions are required for each feature.

    Once you've made an API key you should copy it and put it somewhere safe, as you will not be able to see it again once you navigate away.
  </Step>

  <Step title="Go build things 🚀">
    Now that you have an API key, pass it on any API call as a header:

    ```plaintext theme={null}
    Authorization: Bearer plainApiKey_xxx
    ```
  </Step>
</Steps>
