> ## 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.

# Assign wallet entity

> Assign a user or organization to a wallet.

<Warning>
  You can assign up to 150 wallets to an organization. If the organization is already at this limit,
  this endpoint returns a `409` response with the error code `wallet_entity_limit_exceeded`.
</Warning>


## OpenAPI

````yaml post /v1/wallets/{wallet_id}/entity
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: Cards
    description: Operations related to stablecoin-backed card issuing
  - 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 organizations
  - 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: Teams
    description: Operations related to dashboard team management
  - 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: Wallet Automations
    description: Operations related to wallet automations
  - 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/wallets/{wallet_id}/entity:
    post:
      tags:
        - Wallets
      summary: Assign wallet entity
      description: Assign a user or organization to a wallet.
      operationId: assignWalletEntity
      parameters:
        - schema:
            type: string
            description: ID of the wallet.
          required: true
          name: wallet_id
          in: path
        - 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/WalletEntityAssignmentRequestBody'
      responses:
        '200':
          description: The wallet entity assignment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletEntityAssignmentResponse'
      security:
        - appSecretAuth: []
components:
  schemas:
    WalletEntityAssignmentRequestBody:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/EntityId'
        type:
          $ref: '#/components/schemas/WalletEntityType'
      required:
        - id
        - type
      additionalProperties: false
      description: Request body for assigning an entity to a wallet.
      title: WalletEntityAssignmentRequestBody
      example:
        id: jorpjo4rfxj62nx1itt8y1zt
        type: user
      x-stainless-model: wallets.wallet_entity_assignment_request_body
    WalletEntityAssignmentResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique wallet entity assignment identifier.
        wallet_id:
          type: string
          description: ID of the assigned wallet.
        entity:
          $ref: '#/components/schemas/WalletEntity'
        created_at:
          type: number
          description: Unix timestamp when the assignment was created.
        updated_at:
          type: number
          description: Unix timestamp when the assignment was last updated.
      required:
        - id
        - wallet_id
        - entity
        - created_at
        - updated_at
      additionalProperties: false
      description: The entity assignment for a wallet.
      title: WalletEntityAssignmentResponse
      x-stainless-model: wallets.wallet_entity_assignment_response
    EntityId:
      type: string
      minLength: 1
      description: A Privy entity ID.
      title: EntityId
      example: jorpjo4rfxj62nx1itt8y1zt
      x-stainless-model: wallets.entity_id
    WalletEntityType:
      type: string
      enum:
        - user
        - organization
      description: The type of entity a wallet is attributed to.
      title: WalletEntityType
      example: user
      x-stainless-model: wallets.wallet_entity_type
    WalletEntity:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/EntityId'
            - description: The Privy entity ID.
        type:
          $ref: '#/components/schemas/WalletEntityType'
      required:
        - id
        - type
      additionalProperties: false
      description: The entity a wallet is attributed to.
      title: WalletEntity
      example:
        id: jorpjo4rfxj62nx1itt8y1zt
        type: user
      x-stainless-model: wallets.wallet_entity
  securitySchemes:
    appSecretAuth:
      type: http
      scheme: basic
      description: >-
        Basic Auth header with your app ID as the username and your app secret
        as the password.

````