Skip to main content
GET
/
api
/
adm
/
companyProjectKeys
Get Project API Keys
curl --request GET \
  --url https://localhost:44371/api/adm/companyProjectKeys \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": []
}

Description

Queries API keys with optional filtering by project, active status, or other criteria. Returns masked key values for security - use GetActualEntry to retrieve the unmasked key value. Commonly used for displaying API key lists in admin dashboards and key management interfaces.

Input

  • Query Parameters: model (CompanyProjectKeyQueryRequest) — Filtering options including:
    • projectId (guid, optional) — Filter by specific project identifier.
    • isActive (bool, optional) — Filter by active status.
    • limit (int, optional) — Maximum number of records to return (default: 20).
    • offset (int, optional) — Number of records to skip for pagination.

Output

Returns a CompanyProjectKeyQueryResponse containing matching API keys or an empty list if none found.

Example Request

GET /api/admin/companyProjectKeys?projectId=7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a&isActive=true
Authorization: Bearer {token}

Example Response

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "entries": [
    {
      "id": "9ef15c43-a955-6f4h-c7g3-1h6d4f0e3g9c",
      "projectId": "7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a",
      "name": "Production API Key",
      "keyValue": "pk_live_****************************xyz",
      "isActive": true,
      "createdDate": "2025-09-01T08:00:00Z"
    }
  ]
}

Errors

  • 400 Bad Request — Invalid query parameters or filter values.
  • 404 Not Found — Specified project does not exist when filtering by projectId.
  • 401 Unauthorized — Missing or invalid authentication token.

Notes

  • Key values are masked for security; only the last few characters are visible.
  • Use GetActualEntry endpoint to retrieve the full unmasked key value when needed.
  • Filter by isActive to show only active keys that can authenticate API requests.
  • Results are paginated; use limit and offset parameters for large datasets.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

CompanyId
string<guid> | null

The company identifier used to filter the results.

CompanyProjectId
string<guid> | null

The company project identifier used to filter the results.

Id
string<guid> | null

Optional identifier to filter results by a specific entity.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Represents the response returned when querying for company project keys.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

entries
object[] | null

Collection of entities matching the query criteria.

Example:
[]