Skip to main content
GET
http://localhost:3000
/
subjects
/
by-external
curl -X GET 'https://api.example.com/subjects/by-external?type=user&externalId=user-456' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "sub_123",
    "type": "user",
    "externalId": "user-456",
    "metadata": {}
  }
]

Query Parameters

type
string
required
Subject type. One of: user, api_key, service, agent
externalId
string
required
The external identifier to search for

Response

Returns an array of subjects matching the external ID and type.
subjects
array
curl -X GET 'https://api.example.com/subjects/by-external?type=user&externalId=user-456' \
  -H 'Authorization: Bearer YOUR_TOKEN'
[
  {
    "id": "sub_123",
    "type": "user",
    "externalId": "user-456",
    "metadata": {}
  }
]