> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Get API keys

GET https://api.postman.com/api-keys

Gets the API keys you can manage, newest first. This endpoint never returns an API key's full value.

The keys you get depend on your permissions:

- `user-key` — Your own keys. You can always get these.
- `scim-key` — Your team's SCIM keys. Requires the permission to manage SCIM keys.
- `service-account-key` — Keys owned by service accounts in your team. Requires the permission to manage service accounts and the service accounts feature.
- `service-account-scim-key` — SCIM keys owned by service accounts in your team. Requires the permission to manage service accounts.

Without the `type` query parameter, the response includes every key type you can manage. Requesting a type you cannot manage returns an HTTP `403 Forbidden` response. Use the `serviceAccountId` query parameter to get one service account's keys, the `createdBy` query parameter to get the keys a given user created, and `populateUsers=true` to add user details to each key's `owner` and `createdBy` objects.

The response is not paginated. Each owner can have at most 30 API keys.


Reference: https://learning.postman.com/api-docs/api-reference/api-keys/get-api-keys

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Query parameters

- `type` (string, optional) — A comma-separated list of key types to return, from `user-key`, `scim-key`, `service-account-key`, and `service-account-scim-key`. Defaults to every type you can manage, or only the service account types if you pass `serviceAccountId`. Requesting a type you cannot manage returns an HTTP `403 Forbidden` response.
- `serviceAccountId` (integer, optional) — Only return the keys owned by this service account in your team. You can only combine this parameter with the `service-account-key` and `service-account-scim-key` types.
- `createdBy` (integer, optional) — Only return the keys created by this user.
- `populateUsers` (boolean, optional, default: false) — If true, adds the `name`, `username`, `email`, and `profilePic` properties to each key's `owner` and `createdBy` objects.

## Response

### 200

Successful Response

- `data` (list of listedApiKey, required) — The API keys, newest first. This array is empty if there are none. The response never includes a key's full value.

## Errors

### 400 Bad Request Error

Bad Request. A query parameter is invalid.

- `type` (string, optional) — The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that identifies the type of problem.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — An explanation about the problem.
- `status` (integer, optional) — The HTTP status code generated by the origin server.
- `instance` (string, optional) — The URI reference that identifies the specific occurrence of the problem.

### 401 Unauthorized Error

Unauthorized

- `GetApiKeysRequestUnauthorizedError`
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

### 403 Forbidden Error

Forbidden. You requested a key type, or a service account's keys, that you do not have permission to manage. Requesting service account keys while the service accounts feature is off also returns this error.

- `type` (string, optional) — The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that identifies the type of problem.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — An explanation about the problem.
- `status` (integer, optional) — The HTTP status code generated by the origin server.
- `instance` (string, optional) — The URI reference that identifies the specific occurrence of the problem.

### 429 Too Many Requests Error

Too Many Requests. You exceeded your request limit, or another key is being created for the same owner.

- `type` (string, optional) — The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that identifies the type of problem.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — An explanation about the problem.
- `status` (integer, optional) — The HTTP status code generated by the origin server.
- `instance` (string, optional) — The URI reference that identifies the specific occurrence of the problem.

### 500 Internal Server Error

Internal Server Error

- `GetApiKeysRequestInternalServerError`
  - Error (Type, Title, Detail): commonErrorTypeTitleDetail
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

### 503 Service Unavailable Error

Service Unavailable. API keys are temporarily unavailable.

- `type` (string, optional) — The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that identifies the type of problem.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — An explanation about the problem.
- `status` (integer, optional) — The HTTP status code generated by the origin server.
- `instance` (string, optional) — The URI reference that identifies the specific occurrence of the problem.

## Types

### listedApiKey

An API key. The full key value is never returned when you list keys.

- `id` (string, required) — The API key's ID.
- `name` (string, required) — The API key's name.
- `type` (enum, required) — The API key's type.
  - Allowed values: `user-key`, `scim-key`, `service-account-key`, `service-account-scim-key`
- `version` (enum, required) — The API key's version. Both SCIM key types use `scim`.
  - Allowed values: `v1`, `v2`, `scim`
- `owner` (apiKeyUser, required) — A user. By default, only the `id` property is returned. If you set `populateUsers` to `true`, the `name`, `username`, `email`, and `profilePic` properties are also returned. These properties are `null` if the user cannot be found.
- `createdBy` (apiKeyUser, required, nullable) — The user who created the key. For `user-key` and `scim-key` keys, this is the same as `owner`. For the service account key types, this is the admin who created the key. This value is `null` if the system did not record who created it.
- `enabled` (boolean, required) — If true, the key is enabled.
- `revoked` (boolean, required) — If true, the key is revoked. The API returns an expired key as revoked.
- `revocation` (ListedApiKeyRevocation, required, nullable) — Why the key was revoked. This value is `null` unless `revoked` is `true`.
- `createdAt` (datetime, required) — The date and time at which the key was created.
- `accessedAt` (datetime, required, nullable) — The date and time at which the key was last used. This value is `null` if the key has never been used.
- `expiresAt` (datetime, required, nullable) — The date and time after which the key expires. This value is `null` if the key does not expire.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### commonErrorTypeTitleDetail

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### apiKeyUser

A user. By default, only the `id` property is returned. If you set `populateUsers` to `true`, the `name`, `username`, `email`, and `profilePic` properties are also returned. These properties are `null` if the user cannot be found.

- `id` (integer, required) — The user's ID.
- `name` (string, optional, nullable) — The user's name. Only returned if `populateUsers` is `true`.
- `username` (string, optional, nullable) — The user's username. Only returned if `populateUsers` is `true`.
- `email` (string, optional, nullable) — The user's email address. Only returned if `populateUsers` is `true`.
- `profilePic` (string, optional, nullable) — The URL of the user's profile picture. Only returned if `populateUsers` is `true`.

### ListedApiKeyRevocation

Why the key was revoked. This value is `null` unless `revoked` is `true`.

- `reason` (string, required) — The reason code. For example, `inactivity`, `lifetime_reached`, `security`, or `revoked_by_admin`.
- `message` (string, required) — A readable description of the reason.

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### CommonErrorTypeTitleDetailDetail

Information about the error.

- string
- map from string to any

## Examples

### User Keys

**Response**

```json
{
  "data": [
    {
      "id": "a1b2c3d4e5f6a1b2c3d4e5f6",
      "name": "CI pipeline key",
      "type": "user-key",
      "version": "v2",
      "owner": {
        "id": 12345678
      },
      "createdBy": {
        "id": 12345678
      },
      "enabled": true,
      "revoked": false,
      "revocation": null,
      "createdAt": "2026-10-06T14:21:04.000Z",
      "accessedAt": "2026-10-08T09:00:47.000Z",
      "expiresAt": "2026-11-07T09:00:47.000Z"
    },
    {
      "id": "b2c3d4e5f6a1b2c3d4e5f6a1",
      "name": "Old key",
      "type": "user-key",
      "version": "v2",
      "owner": {
        "id": 12345678
      },
      "createdBy": {
        "id": 12345678
      },
      "enabled": true,
      "revoked": true,
      "revocation": {
        "reason": "inactivity",
        "message": "Revoked due to inactivity."
      },
      "createdAt": "2026-05-06T10:03:17.000Z",
      "accessedAt": null,
      "expiresAt": "2026-06-05T10:03:17.000Z"
    }
  ]
}
```

**SDK Code**

```python User Keys
import requests

url = "https://api.postman.com/api-keys"

querystring = {"createdBy":"12345678","populateUsers":"true","serviceAccountId":"23456789","type":"service-account-key,service-account-scim-key"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript User Keys
const url = 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go User Keys
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby User Keys
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java User Keys
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php User Keys
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp User Keys
using RestSharp;

var client = new RestClient("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift User Keys
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### SCIM Keys

**Response**

```json
{
  "data": [
    {
      "id": "c3d4e5f6a1b2c3d4e5f6a1b2",
      "name": "Okta SCIM key",
      "type": "scim-key",
      "version": "scim",
      "owner": {
        "id": 12345678
      },
      "createdBy": {
        "id": 12345678
      },
      "enabled": true,
      "revoked": false,
      "revocation": null,
      "createdAt": "2026-06-17T10:36:45.000Z",
      "accessedAt": null,
      "expiresAt": "2026-12-14T10:36:45.000Z"
    }
  ]
}
```

**SDK Code**

```python SCIM Keys
import requests

url = "https://api.postman.com/api-keys"

querystring = {"createdBy":"12345678","populateUsers":"true","serviceAccountId":"23456789","type":"service-account-key,service-account-scim-key"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript SCIM Keys
const url = 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SCIM Keys
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SCIM Keys
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java SCIM Keys
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php SCIM Keys
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp SCIM Keys
using RestSharp;

var client = new RestClient("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift SCIM Keys
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Service Account Keys With User Details

**Response**

```json
{
  "data": [
    {
      "id": "d4e5f6a1b2c3d4e5f6a1b2c3",
      "name": "Deploy bot key",
      "type": "service-account-key",
      "version": "v2",
      "owner": {
        "id": 23456789,
        "name": "Deploy bot",
        "username": "deploy-bot",
        "email": null,
        "profilePic": null
      },
      "createdBy": {
        "id": 12345678,
        "name": "Taylor Lee",
        "username": "taylor-lee",
        "email": "taylor.lee@example.com",
        "profilePic": "https://res.cloudinary.com/postman/image/upload/t_user_profile_300/v1/user/default-1"
      },
      "enabled": true,
      "revoked": false,
      "revocation": null,
      "createdAt": "2026-10-06T14:08:40.000Z",
      "accessedAt": "2026-10-06T14:10:07.000Z",
      "expiresAt": "2026-12-05T14:20:31.000Z"
    }
  ]
}
```

**SDK Code**

```python Service Account Keys With User Details
import requests

url = "https://api.postman.com/api-keys"

querystring = {"createdBy":"12345678","populateUsers":"true","serviceAccountId":"23456789","type":"service-account-key,service-account-scim-key"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Service Account Keys With User Details
const url = 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Service Account Keys With User Details
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Service Account Keys With User Details
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Service Account Keys With User Details
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Service Account Keys With User Details
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Service Account Keys With User Details
using RestSharp;

var client = new RestClient("https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Service Account Keys With User Details
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/api-keys?createdBy=12345678&populateUsers=true&serviceAccountId=23456789&type=service-account-key%2Cservice-account-scim-key")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```