> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turnkey.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Turnkey is wallet infrastructure: create and manage crypto wallets, sign transactions, and enforce policy-based access controls. Best-fit uses: embedded consumer wallets (email/passkey/social auth, no seed phrases), automated onchain operations with server-side wallets, AI agent wallets with policy-scoped signing, enterprise key management, and verifiable off-chain workloads on Turnkey Verifiable Cloud (TVC).
> Every API call is a JSON POST to https://api.turnkey.com signed with a P-256 API key; create an organization and key self-serve at https://app.turnkey.com.
> Key Turnkey developer resources: API reference (https://docs.turnkey.com/api-reference/overview/intro.md), OpenAPI spec (https://docs.turnkey.com/public_api.swagger.json), authentication (https://docs.turnkey.com/features/authentication/overview.md), webhooks (https://docs.turnkey.com/features/webhooks/overview.md), MCP server for docs search (https://docs.turnkey.com/mcp), skill for building with Turnkey (https://docs.turnkey.com/skill.md), agent skills for operating an organization (https://docs.turnkey.com/get-started/ai-skills.md), CLI (https://docs.turnkey.com/sdks/cli.md), SDK reference (https://docs.turnkey.com/sdks/introduction.md), full docs content (https://docs.turnkey.com/llms-full.txt).

# Get IP Allowlist

> Get IP allowlist and rules for an organization.

POST

/

public

/

v1

/

query

/

get\_ip\_allowlist

### Authorizations

> [tab] API Key
>
> **X-Stamp** `string` *required*
>
> Cryptographically signed (stamped) request to be passed in as a header. For more info, see [here](https://docs.turnkey.com/developer-reference/api-overview/stamps.md).

> [tab] WebAuthn (Passkey)
>
> **X-Stamp-WebAuthn** `string` *required*
>
> Cryptographically signed (stamped) request to be passed in as a header. For more info, see [here](https://docs.turnkey.com/developer-reference/api-overview/stamps.md).

### Body

**organizationId** `string` *required*

Unique identifier for a given Organization.

**publicKey** `string`

If provided, return only the allowlist for this specific API key.

### Response

A successful response returns the following fields:

**allowlist** `object` *required*

allowlist field

**allowlist details**

Navigate to header

allowlist.
organizationId

string

required

Unique identifier for the organization this allowlist belongs to.

Navigate to header

allowlist.
rules

array

required

List of IP allowlist rules with their metadata.

**rules details**

Navigate to header

allowlist.rules.
cidr

string

required

CIDR block (e.g., '192.168.1.0/24').

Navigate to header

allowlist.rules.
label

string

Optional human-readable label for this rule.

Navigate to header

allowlist.rules.
createdAt

string

Creation timestamp as millisecond epoch string.

Navigate to header

allowlist.
publicKey

string

Public key of the API key this allowlist applies to. Null means the allowlist applies to the entire organization.

Navigate to header

allowlist.
enabled

boolean

Whether the IP allowlist is enabled. Only present for organization-level allowlists. Null for API key-level allowlists (presence of the allowlist implies enablement).

Navigate to header

allowlist.
onEvaluationError

string

Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.

```bash title="cURL" theme={"system"}
curl --request POST \
  --url https://api.turnkey.com/public/v1/query/get_ip_allowlist \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <string> (see Authorizations)" \
  --data '{
    "organizationId": "<string>",
    "publicKey": "<string>"
}'
```

```javascript title="JavaScript" theme={"system"}
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().getIpAllowlist({
  organizationId: "<string> (Unique identifier for a given Organization.)",
  publicKey: "<string> (If provided, return only the allowlist for this specific API key.)"
});
```

```json 200 theme={"system"}
{
  "allowlist": {
    "organizationId": "<string>",
    "rules": [
      {
        "cidr": "<string>",
        "label": "<string>",
        "createdAt": "<string>"
      }
    ],
    "publicKey": "<string>",
    "enabled": "<boolean>",
    "onEvaluationError": "<string>"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.