---
title: "Create Session Key"
method: POST
path: "/v1/wallets/create-session-key"
tags: ["Wallets"]
---

# Create Session Key

`POST /v1/wallets/create-session-key`

Create a session key for a smart account using EIP-7702.

## Request body

- object
  - `chainId` number, required — The chain ID where the session key will be active.
  - `sessionKeyAddress` string, required — The address of the session key to create.
  - `durationInSeconds` number, required — The duration in seconds for which the session key is valid.
  - `grantFullPermissions` boolean — If true, grants full admin permissions to the session key. Use with caution.
  - `callPolicies` object[] — List of allowed contract calls.
    - `target` string, required — The target contract address for the call.
    - `selector` string, required — The 4-byte function selector to allow.
    - `maxValuePerUse` string — The maximum native token value (in wei) allowed per call.
    - `valueLimit` object — The total native token value limit for this call policy.
      - `limitType` 'Unlimited' | 'Lifetime' | 'Allowance', required — The type of limit to apply. Options: 'Unlimited', 'Lifetime', 'Allowance'
      - `limit` string, required — The maximum limit value. Ignored if limitType is Unlimited.
      - `period` string, required — The time period in seconds for Allowance limit type. Ignored if limitType is not Allowance.
    - `constraints` object[] — List of constraints on function parameters.
      - `condition` 'Unconstrained' | 'Equal' | 'Greater' | 'Less' | 'GreaterOrEqual' | 'LessOrEqual' | 'NotEqual', required — The condition to check. Options: 'Unconstrained', 'Equal', 'Greater', 'Less', 'GreaterOrEqual', 'LessOrEqual', 'NotEqual'
      - `index` string, required — The index of the parameter in the function call to check against.
      - `refValue` string, required — The reference value to compare the parameter against (32 bytes hex).
      - `limit` object — Optional usage limit for this constraint.
        - `limitType` 'Unlimited' | 'Lifetime' | 'Allowance', required — The type of limit to apply. Options: 'Unlimited', 'Lifetime', 'Allowance'
        - `limit` string, required — The maximum limit value. Ignored if limitType is Unlimited.
        - `period` string, required — The time period in seconds for Allowance limit type. Ignored if limitType is not Allowance.
  - `transferPolicies` object[] — List of allowed native token transfers.
    - `target` string, required — The recipient address for the transfer.
    - `maxValuePerUse` string — The maximum native token value (in wei) allowed per transfer.
    - `valueLimit` object — The total native token value limit for this transfer policy.
      - `limitType` 'Unlimited' | 'Lifetime' | 'Allowance', required — The type of limit to apply. Options: 'Unlimited', 'Lifetime', 'Allowance'
      - `limit` string, required — The maximum limit value. Ignored if limitType is Unlimited.
      - `period` string, required — The time period in seconds for Allowance limit type. Ignored if limitType is not Allowance.

## Response `200`

Transaction queued

- object
  - `transactionId` string, required

---

[API](https://skmtc.net/thirdweb/apis/thirdweb-api.md) · [All operations](https://skmtc.net/thirdweb/apis/thirdweb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thirdweb/thirdweb-api/revisions/fb4cb67da1c7/schema)
