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

# Create Wallet

> Creates a wallet with provided metadata.

<Snippet file="header-project-id.mdx" />


## OpenAPI

````yaml post /wallets
openapi: 3.0.1
info:
  title: WalletKit
  version: 0.0.1
servers:
  - url: https://testnet.walletkit.com
    description: testnet
  - url: https://mainnet.walletkit.com
    description: mainnet
security: []
paths:
  /wallets:
    post:
      tags:
        - Wallets
      summary: Create Wallet
      description: Creates a wallet with provided metadata.
      operationId: wallets_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWalletRequest'
            examples:
              Example1:
                value:
                  network: Polygon
                  name: My Wallet
                  owner_id: 58c9095e-24db-43eb-b49d-b78f72573a29
                  control_mode: developer
                  developer_secret: testnet-secret
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Wallet'
              examples:
                Example1:
                  value:
                    id: 5884bd1d-ecb3-41ea-bcc7-e9e3d229618f
                    created_at: '2023-07-21T22:03:16Z'
                    network: Polygon
                    name: Joe's wallet
                    owner_id: 58c9095e-24db-43eb-b49d-b78f72573a29
                    address: '0x976Cf57B7EE1D84E73BE9115457889d49a8A1335'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateWalletRequest:
      title: CreateWalletRequest
      type: object
      properties:
        network:
          $ref: '#/components/schemas/Network'
        name:
          type: string
          example: My Wallet
        owner_id:
          type: string
          nullable: true
          description: >-
            An ID that you can use to associate the wallet with a user in your
            application. e.g. user uuid. When creating wallets for the same
            owner_id across different networks, the same seed phrase will be
            used.
        control_mode:
          $ref: '#/components/schemas/WalletControlMode'
          description: >-
            Defines whether the developer or the user controls the wallet. When
            control_mode is developer, the developer_secret must be provided.
            When control_mode is user, the user_pin must be provided.
        type:
          $ref: '#/components/schemas/WalletType'
          nullable: true
          description: >-
            Defines whether the wallet address is an externally owned address
            (EOA)  derived from the owner's key pair or address of the smart
            contract controlled by the owner's key pair.
        developer_secret:
          $ref: '#/components/schemas/DeveloperSecret'
          nullable: true
        user_pin:
          $ref: '#/components/schemas/UserPin'
          nullable: true
      required:
        - network
        - name
        - control_mode
    Wallet:
      title: Wallet
      type: object
      properties:
        id:
          type: string
          example: 5884bd1d-ecb3-41ea-bcc7-e9e3d229618f
        created_at:
          type: string
          example: '2023-07-21T22:03:16Z'
        network:
          $ref: '#/components/schemas/Network'
        name:
          type: string
          nullable: true
        owner_id:
          type: string
          nullable: true
        address:
          type: string
          example: '0x976Cf57B7EE1D84E73BE9115457889d49a8A1335'
      required:
        - id
        - created_at
        - network
        - address
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        code:
          type: string
          nullable: true
        error:
          type: string
      required:
        - error
    Network:
      title: Network
      type: string
      enum:
        - Ethereum
        - Polygon
        - Base
        - Avalanche
        - Polkadot
        - Vara
    WalletControlMode:
      title: WalletControlMode
      type: string
      enum:
        - developer
        - user
    WalletType:
      title: WalletType
      type: string
      enum:
        - eoa
        - contract
    DeveloperSecret:
      title: DeveloperSecret
      type: string
      nullable: true
      description: >-
        On testnet, the developer_secret is always "testnet-secret". On mainnet,
        the developer_secret is set by the developer during account activation.
    UserPin:
      title: UserPin
      type: string
      nullable: true
      description: >-
        A 6-digit numeric pin that is only known to the user, set during wallet
        creation. This pin is required to sign transactions from this wallet.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````