curl --request POST \
  --url https://api.turnkey.com/public/v1/query/list_suborgs \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <YOUR_API_KEY.YOUR_API_SECRET>" \
  --data '{
    "organizationId": "<string>",
    "filterType": "<string>",
    "filterValue": "<string>",
    "paginationOptions": {
        "limit": "<string>",
        "before": "<string>",
        "after": "<string>"
    }
}'
{
  "activity": {
    "id": "<activity-id>",
    "status": "ACTIVITY_STATUS_COMPLETED",
    "type": "ACTIVITY_TYPE_UNKNOWN_V1",
    "organizationId": "<organization-id>",
    "timestampMs": "<timestamp> (e.g., 1745474677463)",
    "result": {
      "organizationIds": [
        "<string_element>"
      ]
    }
  }
}
POST
/
public
/
v1
/
query
/
list_suborgs

Authorizations

X-Stamp
string
header
required

Body

organizationId
string
required

Unique identifier for the parent Organization. This is used to find sub-organizations within it.

filterType
string

Specifies the type of filter to apply, i.e ‘CREDENTIAL_ID’, ‘NAME’, ‘USERNAME’, ‘EMAIL’, ‘PHONE_NUMBER’, ‘OIDC_TOKEN’ or ‘PUBLIC_KEY’

filterValue
string

The value of the filter to apply for the specified type. For example, a specific email or name string.

paginationOptions
object

paginationOptions field

Response

A successful response returns the following fields:

organizationIds
array
required

List of unique identifiers for the matching sub-organizations.

curl --request POST \
  --url https://api.turnkey.com/public/v1/query/list_suborgs \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <YOUR_API_KEY.YOUR_API_SECRET>" \
  --data '{
    "organizationId": "<string>",
    "filterType": "<string>",
    "filterValue": "<string>",
    "paginationOptions": {
        "limit": "<string>",
        "before": "<string>",
        "after": "<string>"
    }
}'
{
  "activity": {
    "id": "<activity-id>",
    "status": "ACTIVITY_STATUS_COMPLETED",
    "type": "ACTIVITY_TYPE_UNKNOWN_V1",
    "organizationId": "<organization-id>",
    "timestampMs": "<timestamp> (e.g., 1745474677463)",
    "result": {
      "organizationIds": [
        "<string_element>"
      ]
    }
  }
}