> ## 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.

# How to Make an API Call Using a Standalone API Key

export const WhatComesNext = ({children, href}) => <div className="mt-4">
    <a href={href} className="
        inline-flex items-center justify-center
        rounded-full
        bg-black text-white dark:bg-[#1f262b]
        px-5 py-2.5 text-sm font-medium
        no-underline border-0
        hover:bg-[#ffe6ea] dark:hover:bg-[#2b1f23]
        hover:text-black
        transition-colors
      ">
      {children} →
    </a>
  </div>;

export const RememberCallout = ({title, children, icon = "🪢"}) => <div style={{
  backgroundColor: 'var(--recommended-bg)',
  borderLeft: '4px solid #f63b92',
  borderRadius: '10px',
  padding: '18px 22px',
  marginBottom: '20px',
  boxShadow: '1px 1px 3px rgba(0,0,0,0.06)'
}}>
    <div style={{
  display: 'flex',
  alignItems: 'flex-start',
  gap: '14px'
}}>
      <span style={{
  fontSize: '22px',
  lineHeight: '1',
  flexShrink: 0
}}>
        {icon}
      </span>
      <div>
        {title && <div style={{
  fontSize: '16px',
  fontWeight: 600,
  color: 'var(--recommended-title)',
  marginBottom: '6px'
}}>
            {title}
          </div>}
        <div style={{
  fontSize: '14px',
  lineHeight: 1.65
}}>
          {children}
        </div>
      </div>
    </div>
  </div>;

Follow these steps to make your first Pleo API call using `curl`.

## Before You Begin

* Make sure you have generated a [Standalone API Key](/docs/current/how-tos/api-keys/how-to-generate-standalone-api-keys)
* Understand the [permission and scope](/docs/current/authentication/standalone-api-keys-overview#how-standalone-api-keys-work-conceptually) requirements for Standalone API Keys
* Use the correct [Base URL](/docs/current/authentication/api-base-urls) for the environment you're working in

<RememberCallout title="Remember">
  Standalone API Keys authenticate your API calls and are scoped by environment, company, and permissions. Ensure you use the correct company ID for every request.
</RememberCallout>

## Example 1 – GET a List of Employees

### Requirements

* Standalone API Key with `users.read` [API Scope](/docs/current/authentication/api-scopes)

### Endpoint

[`https://external.staging.pleo.io/v2/employees`](/reference/employees/search-for-employees)

### cURL Template

Use the template below and replace your API Key:

* `YOUR-API-KEY` → your generated Standalone API Key

```bash theme={null}
curl --request GET \
-u "YOUR-API-KEY:" \
-H "Accept: application/json;charset=UTF-8" \
"https://external.staging.pleo.io/v2/employees" \
| jq
```

### Execute the Request

Example with placeholders replaced:

```bash theme={null}
curl --request GET \
-u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
-H "Accept: application/json;charset=UTF-8" \
"https://external.staging.pleo.io/v2/employees" \
| jq
```

### Sample Response

```json theme={null}
{
  "data": [
    {
      "id": "abcdefgh-1234-5abc-6789-de01234fa12b",
      "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
      "firstName": "Simon",
      "lastName": "Schöt",
      "email": "simon.scottie@pleo.dev",
      "phone": "+298200000"
    },
    {
      "id": "987abc45-ab67-5abc-d6e7-de89012fa13c",
      "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
      "firstName": "Avani",
      "lastName": "Challa",
      "email": "avani.challa123@pleo.dev",
      "phone": "+298200000"
    }
    # entries omitted for brevity
  ],
  "pagination": {
    "hasPreviousPage": false,
    "hasNextPage": true,
    "startCursor": "72GNR65XMJGXDAWIZ4EUE3FFNQ=AAAAAADJIF7KOJHFGDAA",
    "endCursor": "QYGEX3OMBNHJZHOWD74B7B5JOE=AAAAAADJIF7KOJOZKTAA",
    "total": 36
  }
}
```

## Example 2 – GET Details of a Specific Company

### Requirements

* Standalone API Key with `companies:read` [API Scope](/docs/current/authentication/api-scopes)

### Endpoint

[`https://external.pleo.io/v1/companies/{companyId}`](/reference/companies/search-for-a-specific-company)

### cURL Template

Use the template below and replace your API Key and Company ID:

* `YOUR-API-KEY` → your generated Standalone API Key
* `{companyId}` → the Company ID you want details for
  > Tip: You can extract the `companyId` from the response in [Example 1](#example-1-–-get-a-list-of-employees)

```bash theme={null}
curl --request GET \
-u "YOUR-API-KEY:" \
-H "Accept: application/json;charset=UTF-8" \
"https://external.staging.pleo.io/v1/companies/{companyId}" \
| jq
```

### Execute the Request

Example with placeholders replaced:

```bash theme={null}
curl --request GET \
-u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
-H "Accept: application/json;charset=UTF-8" \
"https://external.staging.pleo.io/v1/companies/12abc3d4-e567-890e-1234-abc56e78fabc" \
| jq
```

### Sample Response

```json theme={null}
{
  "data": {
    "id": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "name": "MyTestCompany",
    "address": {
      "addressLine1": "51462 Littel Common",
      "addressLine2": "Apt. 210",
      "locality": "North Kris",
      "region": "Mississippi",
      "postalCode": "D6H 4XH",
      "country": "GB"
    },
    "organizationId": "98a7bc6d-efgh-5a43-b21c-0a9bc876de5f",
    "registrationNumber": "12345678"
  }
}
```

## Result

* You’ve successfully made API requests using your **Standalone API Key**
* You’ve verified that your API Key has the correct **permissions and scope**
* You understand how to extract IDs (like `companyId`) for subsequent requests

***

## What Comes Next?

<WhatComesNext href="/docs/current/guides/standalone-api-keys-workflow-guide#result">
  Return to the Standalone API Key Workflow Guide
</WhatComesNext>

***

<div className="text-xs uppercase" style={{ fontVariant: 'small-caps' }}>
  this how-to is part of:
</div>

<div className="mt-4 flex flex-wrap gap-2">
  <a
    href="/docs/current/guides/standalone-api-keys-workflow-guide"
    className="inline-flex items-center rounded-full border border-gray-300 dark:border-gray-600 
px-3 py-1 text-xs font-medium 
bg-white dark:bg-[#1f262b] text-black dark:text-white
hover:bg-gray-100 dark:hover:bg-[#2b2f33]
transition-colors"
  >
    Standalone API Key Workflow Guide
  </a>
</div>

***

## Related Reading

* [How to Make an API Call Using a Standalone API Key (Postman)](/docs/current/how-tos/api-keys/how-to-make-an-api-call-using-standalone-api-keys-postman)
* [OAuth 2.0 Setup Workflow Guide](/docs/current/guides/oauth-workflow-guide): Step-by-step instructions on how to configure OAuth 2.0 where you handle the full token lifecycle.

***
