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

# Quickstart

<Warning>
  **This page has now been ARCHIVED. Please visit:**

  * **[OAuth 2.0 Setup Workflow Guide](/docs/current/guides/oauth-workflow-guide)**
  * **[OAuth 2.0 Setup with Postman Workflow Guide](/docs/current/guides/oauth-workflow-guide-postman)**
  * **[API Keys Workflow Guide](/docs/current/guides/standalone-api-keys-workflow-guide)**
</Warning>

Welcome to the Pleo API! We're here to help you get connected fast. This Quickstart guide walks you through using an API key to get up and running.

### Introduction

There are two ways to authenticate:

* [OAuth 2.0](/docs/oauth-20)
* [API keys](/docs/api-keys)

For this guide, we will be using the **API keys flow** and assume you have a Pleo account.

### 1. Get your API key

1. Head to your Pleo account > Settings > Scroll down and click on [API keys](https://app.pleo.io/settings/api-keys)

<Frame>
  <img src="https://mintcdn.com/pleo-61d4d38b/UuiilCOMmC9ytc__/images/docs/quickstart/getting-started-api-key-settings.jpg?fit=max&auto=format&n=UuiilCOMmC9ytc__&q=85&s=28e29fd21af3950c0441f53868dd5808" alt="getting started api key settings" width="1651" height="1245" data-path="images/docs/quickstart/getting-started-api-key-settings.jpg" />
</Frame>

2. Click on *Create API key*

<Frame>
  <img src="https://mintcdn.com/pleo-61d4d38b/UuiilCOMmC9ytc__/images/docs/quickstart/getting-started-create-api-key-settings.jpg?fit=max&auto=format&n=UuiilCOMmC9ytc__&q=85&s=30e211cbd9515d6d0e343f5606827a90" alt="getting started create api key settings" width="1653" height="1239" data-path="images/docs/quickstart/getting-started-create-api-key-settings.jpg" />
</Frame>

3. Add the following details

* **Name**: give your key a name that will help you remember what it's for, like `Pleo API Quickstart`
* **Expiration date**: choose when you want the key to expire
* **Access level**: decide if the key is for a specific entity (company) or for multiple entities of a business (organisation). [Read about the differences here](/docs/multi-entity-setup-with-pleo).
* **Permissions**: select the scopes you need. Your selections will automatically enable the right permissions in your key.

4. Click on *Create API Key*

<Frame>
  <img src="https://mintcdn.com/pleo-61d4d38b/UuiilCOMmC9ytc__/images/docs/quickstart/getting-started-click-on-create-api-key-settings.jpg?fit=max&auto=format&n=UuiilCOMmC9ytc__&q=85&s=5be22952418c53e7cbd90bf82d2f4806" alt="getting started click on create API key settings" width="1652" height="1238" data-path="images/docs/quickstart/getting-started-click-on-create-api-key-settings.jpg" />
</Frame>

5. Store your key securely as you will only be able to see it once

### 2. Make your first API call

Time to put your new key to use!

When authenticating with API keys, include the key in the `Authorization` header of the request, using the `Basic` schema. The key should be used as the username, and an empty string should be used as the password.

We'll use the [Get Search for employees](/reference/employees/search-for-employees) query for this example.

**curl**

With curl, specify the `-u / --user` flag, followed by the API key. The password is an empty string.

<CodeGroup>
  ```shell Request example theme={null}
  curl --request GET \
       --url https://external.pleo.io/v2/employees \
       --header 'accept: application/json;charset=UTF-8' \
       --header 'authorization: Basic API_KEY'
  ```
</CodeGroup>

If the request is successful, you will receive a response such as:

<CodeGroup>
  ```json Response example theme={null}
  {
    "data": [
      {
        "code": "string",
        "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "email": "string",
        "firstName": "string",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "jobTitle": "string",
        "lastName": "string",
        "phone": "string"
      }
    ],
    "pagination": {
      "currentRequestPagination": {
        "after": "string",
        "before": "string",
        "limit": 0,
        "offset": 0,
        "parameters": {
          "additionalProp": [
            "string"
          ]
        },
        "sortingKeys": [
          "string"
        ],
        "sortingOrder": [
          "ASC"
        ]
      },
      "endCursor": "string",
      "hasNextPage": true,
      "hasPreviousPage": true,
      "startCursor": "string",
      "total": 0
    }
  }
  ```
</CodeGroup>

**Postman**

In Postman, you can specify the API key in the Authorization tab, selecting the Basic Auth type, and using the API key as the username, and an empty string as the password.

<Frame>
  <img src="https://mintcdn.com/pleo-61d4d38b/UuiilCOMmC9ytc__/images/docs/quickstart/getting-started-postman.jpg?fit=max&auto=format&n=UuiilCOMmC9ytc__&q=85&s=a7b8a616125a5a082c570951b6000063" alt="getting started postman" width="998" height="452" data-path="images/docs/quickstart/getting-started-postman.jpg" />
</Frame>

### Errors

We use standard HTTP status codes to let you know if a request was successful or if there was an issue. For a full list of codes and what they mean, check out our [API Response Codes | Errors guide](/reference/api-response-codes-errors-1).

### Next steps

Congrats, you've just completed the Quickstart 🎉 We recommend checking the [Authorization guide](/docs/authentication-authorisation-introduction) next.

**What’s Next**

[Introduction ->](/docs/authentication-authorisation-introduction)
