import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().listVerifiedSuborgs({ organizationId: "<string> (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 'EMAIL', 'PHONE_NUMBER'.)", filterValue: "<string> (The value of the filter to apply for the specified type. For example, a specific email or phone number string.)", paginationOptions: { // paginationOptions field, limit: "<string> (A limit of the number of object to be returned, between 1 and 100. Defaults to 10.)", before: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects before this ID.)", after: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects after this ID.)", }});
{ "organizationIds": [ "<string>" ]}
Queries
Get verified sub-organizations
Get all email or phone verified suborg IDs associated given a parent org ID.
import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().listVerifiedSuborgs({ organizationId: "<string> (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 'EMAIL', 'PHONE_NUMBER'.)", filterValue: "<string> (The value of the filter to apply for the specified type. For example, a specific email or phone number string.)", paginationOptions: { // paginationOptions field, limit: "<string> (A limit of the number of object to be returned, between 1 and 100. Defaults to 10.)", before: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects before this ID.)", after: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects after this ID.)", }});