---
title: "List API key requests"
method: POST
path: "/developers/api_keys/requests"
tags: ["API Keys Requests", "dev-api"]
---

# List API key requests

`POST /developers/api_keys/requests`

## Request

- Base URL: `https://gateway.prem.io`
- URL: `https://gateway.prem.io/developers/api_keys/requests`
- Auth: HTTP bearer and API key in header `Authorization`

Get a filtered list of API key requests/usage logs

## Request body

- ListDeveloperApiKeyRequestsRequest: Request body for filtering API key requests
  - `api_key_id` string[]: Filter by API key ID(s)
  - `created_at_from` string, mysql-date-time: Filter requests from this date
  - `created_at_to` string, mysql-date-time: Filter requests until this date
  - `status` string[]: Filter by HTTP response status code
  - `method` string[]: Filter by HTTP method
  - `search` string: General search across path, ID, scope, and IP
  - `limit` integer: Maximum number of results to return
  - `offset` integer: Number of results to skip

## Response `200`

Successful API key requests list response

- object
  - `status` 200 | 201 | 202, required: Status code of the response
  - `data` object, nullable, required
    - `count` integer, required: Total count of matching requests
    - `items` DevelopersApiKeyRequest[], required: Array of API key request log entries
      - `id` integer, required: Unique identifier for the request log entry
      - `is_developer` number, required: Whether this was a developer API request
      - `organization_id` string, nullable: Organization ID that made the request
      - `user_id` string, nullable: User ID that made the request
      - `api_key_id` string, nullable: API key used for the request
      - `session_id` string, nullable: Authentication session ID associated with the request
      - `support_id` string, nullable: Support ticket ID if applicable
      - `ip` string, nullable: IP address that made the request
      - `path` string, required: Request path
      - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'null', nullable: HTTP method used
      - `user_agent` string, nullable: User agent string
      - `ms` number, required: Request duration in milliseconds
      - `overhead_ms` number, nullable: Proxy overhead in milliseconds: arrival to upstream dispatch, excluding queue wait. Null for requests logged before it was tracked
      - `response_code` string, required: HTTP response status code
      - `response_body` union, required: Response body as JSON
        - object
        - string
      - `request_body` string, nullable: Request body as text
      - `request_headers` string, nullable: Request headers as text
      - `memory_peak` number, nullable: Peak memory usage for the request
      - `created_at` string, mysql-date-time, required: Timestamp when the request was logged
  - `error` string, nullable: Error message of the response, human readable
  - `message` string, nullable, required: Message of the response, human readable
  - `env` 'development' | 'production', required: API environment
  - `log` union: Useful informaiton, not always present, to debug the response
    - string
    - object
  - `validator` union: Validator response object, each key is the field name and value is the error message
    - object
    - unknown[]
      - unknown
  - `support_id` string, uuid, nullable: Support ID linked to the response, used to identify it when talking with our team.

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: You do not have the required permissions to access this resource

## Changes

- **2026-11-13** `d46bc3931b34`: 10 warning, 2 info
  - removed the optional property `allOf[#/components/schemas/listDeveloperApiKeyRequestsResponse]/data/items/items/auth` from the response with the `200` status
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `401`
  - added the new `405.00` enum value to the `allOf[subschema #1]/status` response property for the response status `403`
  - added the new `405.00` enum value to the `status` response property for the response status `400`
  - …8 more
- **2026-10-16** `d5b1beb33be5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/developers/api_keys/requests/post.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) - [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/premai-io/apis/prem-studio-api/revisions/d46bc3931b34?raw)
