Skip to main content
Follow these steps to make your first Pleo API call using curl.

Before You Begin

Example 1 – GET a List of Employees

Requirements

  • Standalone API Key with users.read API Scope

Endpoint

https://external.staging.pleo.io/v2/employees

cURL Template

Use the template below and replace your API Key:
  • YOUR-API-KEY → your generated Standalone API Key
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:
curl --request GET \
-u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
-H "Accept: application/json;charset=UTF-8" \
"https://external.staging.pleo.io/v2/employees" \
| jq

Sample Response

{
  "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

Endpoint

https://external.pleo.io/v1/companies/{companyId}

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
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:
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

{
  "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?


this how-to is part of: