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

# Create condition set

> Create a new condition set. You must provide either "owner" or "owner_id" (but not both) to specify ownership.



## OpenAPI

````yaml post /v1/condition_sets
openapi: 3.1.0
info:
  version: 0.0.1
  title: Privy API
  description: >-
    REST API for Privy's wallet infrastructure — provision and manage wallets
    across EVM, Solana, and Bitcoin, authenticate users, sign transactions, and
    configure programmable policies and authorization intents.
  contact:
    name: Privy
    url: https://www.privy.io/
    email: support@privy.io
servers:
  - url: https://api.privy.io
security: []
tags:
  - name: Accounts
    description: Operations related to asset accounts
  - name: Aggregations
    description: Operations related to aggregations for tracking and measuring metrics
  - name: Apps
    description: Operations related to app settings and allowlist management
  - name: Client Auth
    description: OAuth token exchange and device authorization operations
  - name: Condition Sets
    description: Operations related to condition sets
  - name: Embedded wallets
    description: Operations related to embedded wallet creation and authentication
  - name: Fiat
    description: Operations related to fiat onramping and offramping
  - name: Intents
    description: Operations related to authorization intents for wallet actions
  - name: Key quorums
    description: Operations related to key quorums
  - name: Kraken Embed
    description: >-
      Operations for Kraken Embed integration, including quotes, trades, user
      management, and portfolio operations
  - name: OAuth
    description: >-
      OAuth 2.0 endpoints including Device Authorization Grant (RFC 8628) for
      CLI and limited-input device login flows
  - name: Organizations
    description: Operations related to organization secret management
  - name: Policies
    description: Operations related to policies
  - name: Shared
    description: Common schemas shared across resources
  - name: Swaps
    description: Operations for swapping tokens within wallets
  - name: Transactions
    description: Operations related to transactions
  - name: User signers
    description: Operations related to user signers
  - name: Users
    description: Operations related to users
  - name: Wallet Actions
    description: Operations related to wallet actions
  - name: Wallets
    description: Operations related to wallets
  - name: Webhooks
    description: >-
      Webhook events that Privy sends to your configured endpoint when specific
      actions occur in your app
  - name: Yield
    description: >-
      Operations for depositing and withdrawing funds from ERC-4626 yield vaults
      (Morpho, Aave)
paths:
  /v1/condition_sets:
    post:
      tags:
        - Policies
      summary: Create Condition Set
      description: >-
        Create a new condition set. You must provide either "owner" or
        "owner_id" (but not both) to specify ownership.
      operationId: createConditionSet
      parameters:
        - schema:
            type: string
            description: ID of your Privy app.
          required: true
          name: privy-app-id
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConditionSetRequestBody'
            examples:
              with-owner-id:
                summary: Create with key quorum ID
                value:
                  name: Approved Recipients
                  owner_id: asgkan0r7gi0wdbvf9cw8qio
              with-user-id:
                summary: Create with user ID
                value:
                  name: Approved Recipients
                  owner:
                    user_id: did:privy:clxyz123abc456
              with-public-key:
                summary: Create with public key
                value:
                  name: Approved Recipients
                  owner:
                    public_key: >-
                      MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==
      responses:
        '200':
          description: Created condition set object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionSet'
              examples:
                with-owner-id:
                  summary: Created with key quorum ID
                  value:
                    id: qvah5m2hmp9abqlxdmfiht90
                    name: Approved Recipients
                    owner_id: asgkan0r7gi0wdbvf9cw8qio
                    created_at: 1761271537642
                with-user-id:
                  summary: Created with user ID (new key quorum created)
                  value:
                    id: qvah5m2hmp9abqlxdmfiht91
                    name: Approved Recipients
                    owner_id: newkeyquorumid1234567890
                    created_at: 1761271537642
                with-public-key:
                  summary: Created with public key (new key quorum created)
                  value:
                    id: qvah5m2hmp9abqlxdmfiht92
                    name: Approved Recipients
                    owner_id: anotherkeyquorum9876543
                    created_at: 1761271537642
      security:
        - appSecretAuth: []
components:
  schemas:
    ConditionSetRequestBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: Name to assign to condition set.
        owner:
          allOf:
            - $ref: '#/components/schemas/OwnerInput'
            - description: >-
                Owner of the condition set. Exactly one of `owner` or `owner_id`
                is required; cannot be used together with `owner_id`.
        owner_id:
          allOf:
            - $ref: '#/components/schemas/OwnerIdInput'
            - description: >-
                Key quorum ID to set as the owner of the condition set. Exactly
                one of `owner` or `owner_id` is required; cannot be used
                together with `owner`.
      required:
        - name
      additionalProperties: false
      description: >-
        Request body for creating a condition set. Optionally provide `owner` or
        `owner_id` (but not both) to specify ownership.
      title: ConditionSetRequestBody
      x-stainless-model: policies.condition_set_request_body
    ConditionSet:
      type: object
      properties:
        id:
          type: string
          minLength: 24
          maxLength: 24
          description: >-
            Unique ID of the created condition set. This will be the primary
            identifier when using the condition set in the future.
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: Name of the condition set.
        owner_id:
          description: >-
            The key quorum ID of the owner of the condition set, or null if
            unowned.
          anyOf:
            - $ref: '#/components/schemas/KeyQuorumId'
            - type: 'null'
        created_at:
          type: number
          description: >-
            Unix timestamp of when the condition set was created in
            milliseconds.
      required:
        - id
        - name
        - owner_id
        - created_at
      description: A condition set for grouping related condition values.
      title: ConditionSet
      example:
        id: qvah5m2hmp9abqlxdmfiht95
        name: Approved Recipients
        owner_id: asgkan0r7gi0wdbvf9cw8qio
        created_at: 1761271537642
      x-stainless-model: policies.condition_set
    OwnerInput:
      anyOf:
        - $ref: '#/components/schemas/OwnerInputUser'
        - $ref: '#/components/schemas/OwnerInputPublicKey'
        - type: 'null'
        - type: 'null'
      description: >-
        The owner of the resource, specified as a Privy user ID, a P-256 public
        key, or null to remove the current owner.
      title: OwnerInput
      x-stainless-model: shared.owner_input
    OwnerIdInput:
      type:
        - string
        - 'null'
      format: cuid2
      description: >-
        The key quorum ID to set as the owner of the resource. If you provide
        this, do not specify an owner.
      title: OwnerIdInput
      x-stainless-model: shared.owner_id_input
    KeyQuorumId:
      type: string
      format: cuid2
      description: A unique identifier for a key quorum.
      title: KeyQuorumId
      x-stainless-model: shared.key_quorum_id
    OwnerInputUser:
      type: object
      properties:
        user_id:
          type: string
      required:
        - user_id
      additionalProperties: false
      description: Owner input specifying a Privy user ID.
      title: OwnerInputUser
      x-stainless-model: shared.owner_input_user
    OwnerInputPublicKey:
      type: object
      properties:
        public_key:
          $ref: '#/components/schemas/P256PublicKey'
      required:
        - public_key
      additionalProperties: false
      description: Owner input specifying a P-256 public key.
      title: OwnerInputPublicKey
      x-stainless-model: shared.owner_input_public_key
    P256PublicKey:
      type: string
      description: A P-256 (secp256r1) public key.
      title: P256PublicKey
      x-stainless-model: shared.p_256_public_key
  securitySchemes:
    appSecretAuth:
      type: http
      scheme: basic
      description: >-
        Basic Auth header with your app ID as the username and your app secret
        as the password.

````