Skip to main content
Use this endpoint to retrieve every Open API key in your workspace alongside the organization’s API profile. The profile includes credit rates and usage limits that apply to all jobs submitted through the API.
This endpoint uses session cookie authentication (plangrep_session). It is used by the Plangrep app’s API settings page and does not accept a bearer API key.

Endpoint

GET https://plangrep.com/api/open-api/keys

Authentication

MethodValue
Cookieplangrep_session=YOUR_SESSION_COOKIE

Parameters

No query or path parameters.

Response

200 OK Returns an OpenApiKeyListResponse object.
keys
OpenApiKey[]
required
All API keys belonging to the current workspace.
profile
OpenApiProfile
required
Your organization’s API configuration and credit rates.
Use the profile object to display current credit rates and limits to your users before they submit jobs. The drawingCreditsPerPage and documentCreditsPerPage fields let you estimate costs upfront.

Example

curl https://plangrep.com/api/open-api/keys \
  -H "Cookie: plangrep_session=YOUR_SESSION_COOKIE"

Example Response

{
  "keys": [
    {
      "id": "key_01hx3z...",
      "label": "Production Integration",
      "keyPrefix": "pgk_live_abc1",
      "scopes": ["jobs:read", "jobs:write", "artifacts:read"],
      "createdByUserId": "usr_01hx3y...",
      "hashVersion": "v1",
      "createdAt": "2024-11-01T10:00:00Z",
      "expiresAt": null,
      "lastUsedAt": "2025-01-15T08:42:00Z",
      "lastUsedIp": "203.0.113.42",
      "revokedAt": null
    }
  ],
  "profile": {
    "documentCreditsPerPage": 2,
    "drawingCreditsPerPage": 5,
    "enabled": true,
    "jobPageLimit": 500,
    "retentionDays": 30,
    "updatedAt": "2024-10-15T12:00:00Z"
  }
}