PgBeam Docs
Agents

List agent credentials

GET
/v1/projects/{project_id}/agents

Lists agent credentials for the project. Secrets are never returned.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

Query Parameters

page_size?integer

Maximum number of items to return (1-100, default 20).

page_token?string

Opaque token for cursor-based pagination.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/string/agents"
{  "agents": [    {      "id": "agt_01h455vb4pex5vsknk084sn02q",      "project_id": "prj_01h455vb4pex5vsknk084sn02q",      "policy_profile_id": "pol_01h455vb4pex5vsknk084sn02q",      "name": "Claude Code (analytics)",      "pg_username": "agent_a1b2c3d4e5f6",      "status": "active",      "principal_type": "agent",      "auth_method": "cleartext",      "last_used_at": "2019-08-24T14:15:22Z",      "expires_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "next_page_token": "string"}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}