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

# Retrieve a user operation

> Retrieve an existing user operation.



## OpenAPI

````yaml openapi/buidl-wallets.yaml get /v1/w3s/buidl/userOps/{id}
openapi: 3.0.3
info:
  description: Modular Wallets API documentation.
  title: Modular Wallets
  version: '1.0'
servers:
  - url: https://api.circle.com
security:
  - BearerAuth: []
tags:
  - name: Transfers
  - name: UserOps
  - name: Wallets
paths:
  /v1/w3s/buidl/userOps/{id}:
    get:
      tags:
        - UserOps
      summary: Retrieve a user operation
      description: Retrieve an existing user operation.
      operationId: getUserOp
      parameters:
        - $ref: '#/components/parameters/Id'
        - $ref: '#/components/parameters/XRequestId'
      responses:
        '200':
          description: User operation retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserOpId'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/DefaultError'
        '401':
          $ref: '#/components/responses/NotAuthorized'
      security:
        - BearerAuth: []
components:
  parameters:
    Id:
      name: id
      description: The universally unique identifier of the resource.
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: b3d9d2d5-4c12-4946-a09d-953e82fae2b0
    XRequestId:
      name: X-Request-Id
      in: header
      description: >
        Developer-provided identifier for this request, used for tracing
        requests in Wallets API logs and the Developer Console, and when
        communicating with Circle Support.

        **Must be a UUID to appear in logs.** Non-UUID values are accepted by
        the API but are ignored by logging and tracing systems.
      schema:
        $ref: '#/components/schemas/XRequestId'
  schemas:
    UserOpId:
      title: UserOpResponse
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - userOperation
          properties:
            userOperation:
              $ref: '#/components/schemas/UserOp'
    XRequestId:
      type: string
      format: uuid
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
    UserOp:
      title: UserOp
      type: object
      required:
        - id
        - blockchain
        - state
        - userOpHash
        - userOperation
      properties:
        id:
          $ref: '#/components/schemas/Id'
        refId:
          $ref: '#/components/schemas/ReferenceId'
        actualGasCost:
          type: string
          description: Actual gas cost of user operation.
          example: '0.0015584763706281'
        actualGasUsed:
          type: string
          description: Actual gas used of user operation.
          example: '182385'
        blockDate:
          $ref: '#/components/schemas/BlockDate'
        blockHash:
          $ref: '#/components/schemas/BlockHash'
        blockHeight:
          $ref: '#/components/schemas/BlockHeight'
        blockchain:
          $ref: '#/components/schemas/Blockchain'
        errorReason:
          $ref: '#/components/schemas/UserOpErrorReason'
        revertReason:
          type: string
          description: On-chain failed revert reason of user operation.
        state:
          $ref: '#/components/schemas/UserOpState'
        to:
          $ref: '#/components/schemas/Address'
          description: Address of user operation executed with.
        txHash:
          $ref: '#/components/schemas/TxHash'
        userOpHash:
          $ref: '#/components/schemas/UserOpHash'
        userOperation:
          $ref: '#/components/schemas/UserOperation'
        createDate:
          $ref: '#/components/schemas/CreateDate'
        updateDate:
          $ref: '#/components/schemas/UpdateDate'
    Error:
      title: Error
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Code that corresponds to the error.
        message:
          type: string
          description: Message that describes the error.
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    ReferenceId:
      type: string
      description: >-
        Optional user-defined reference identifier for the wallet. Not used by
        Circle for wallet functionality. Used for internal tracking or
        associating wallets with entities in your own systems (for example, a
        customer or account ID).
      example: customer_12345
    BlockDate:
      title: BlockDate
      type: string
      format: date-time
      description: Date and time of block, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
    BlockHash:
      title: BlockHash
      type: string
      description: Blockchain generated identifier of block.
      example: '0x2eb19fd02850ff963efefbaa71dbcd4acb41a9c261c4f8961979db1b56d48704'
    BlockHeight:
      title: BlockHeight
      type: integer
      description: Blockchain height of block.
      example: 123456
    Blockchain:
      title: Blockchain
      type: string
      description: Blockchain network of resource.
      enum:
        - ETH
        - ETH-SEPOLIA
        - MATIC
        - MATIC-AMOY
        - ARB
        - ARB-SEPOLIA
        - UNI
        - UNI-SEPOLIA
        - BASE
        - BASE-SEPOLIA
        - OP
        - OP-SEPOLIA
        - AVAX
        - AVAX-FUJI
        - ARC-TESTNET
        - MONAD
        - MONAD-TESTNET
      example: MATIC-AMOY
    UserOpErrorReason:
      title: ErrorReason
      type: string
      description: Error reason of failed user operation.
      enum:
        - FAILED_ON_CHAIN
        - FAILED_REPLACED
      example: FAILED_REPLACED
    UserOpState:
      title: State
      type: string
      description: State of user operation.
      enum:
        - SENT
        - CONFIRMED
        - COMPLETE
        - FAILED
      example: COMPLETE
    Address:
      title: Address
      description: >
        Blockchain generated unique identifier, associated with wallet
        (account), smart contract or other blockchain objects.
      type: string
      example: '0x4b6c0b0078b63f881503e7fd3a9a1061065db242'
    TxHash:
      title: TxHash
      type: string
      description: Blockchain generated identifier of transaction.
      example: '0x4a25cc5e661d8504b59c5f38ba93f010e8518966f00e2ceda7955c4b8621357d'
    UserOpHash:
      title: UserOpHash
      type: string
      description: Generated identifier of user operation.
      example: '0x54d3cccda6ffa503bc1e554937fe67818b6ca1a5a05c7e66ebfa32bf27520152'
    UserOperation:
      title: UserOperation
      type: object
      required:
        - callData
        - nonce
        - sender
      properties:
        callData:
          type: string
        callGasLimit:
          type: string
        factory:
          type: string
        factoryData:
          type: string
        initCode:
          type: string
        maxFeePerGas:
          type: string
        maxPriorityFeePerGas:
          type: string
        nonce:
          type: string
        paymaster:
          type: string
        paymasterAndData:
          type: string
        paymasterData:
          type: string
        paymasterPostOpGasLimit:
          type: string
        paymasterVerificationGasLimit:
          type: string
        preVerificationGas:
          type: string
        sender:
          type: string
        signature:
          type: string
        verificationGasLimit:
          type: string
    CreateDate:
      type: string
      format: date-time
      description: Date and time the resource was created, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
    UpdateDate:
      type: string
      format: date-time
      description: Date and time the resource was last updated, in ISO-8601 UTC format.
      example: '2023-01-01T12:04:05Z'
  headers:
    XRequestId:
      description: >
        Developer-provided header parameter or Circle-generated universally
        unique identifier (UUID v4). Useful for identifying a specific request
        when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  responses:
    DefaultError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Error response
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotAuthorized:
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorizedResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 401
              message: Malformed authorization.
      description: >-
        Request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are required to make a successful
        request.

````