---
title: "Install an application for a user"
method: POST
path: "/user/{appId}/install-app"
tags: ["User"]
---

# Install an application for a user

`POST /user/{appId}/install-app`

Installs an app for a user. If the user has never installed the app, mints a PKP and permits the app. If the user previously uninstalled the app, re-enables it.

## Path parameters

- `appId` number, required

## Request body

- InstallAppRequest
  - `userControllerAddress` string, required — EOA address that controls the user smart wallet
  - `sponsorGas` boolean — If true (default), returns EIP2771 typed data for sponsored gas relay. If false, returns raw transaction data for direct EOA submission (user pays gas).

## Response `200`

App installation data returned successfully

- InstallAppResponse
  - `agentSignerAddress` string, required — The PKP address that the app will use to sign things
  - `agentSmartAccountAddress` string, required — The smart account address calculated from the PKP address, used on the frontend to verify they get the same smart wallet address
  - `appInstallationDataToSign` object — The EIP2771 TypedData to sign for permitAppVersion via Gelato relay (gas-sponsored). Contains the transaction details for permitting the app version on the Vincent registry.
    - `chainId` union, required — Chain ID where the transaction will be executed
      - string
      - number
    - `target` string, required — Target contract address
    - `data` string, required — Encoded function call data
    - `user` string, required — User address that will sign the typed data
    - `userNonce` union, required — User nonce for replay protection
      - string
      - number
    - `userDeadline` union, required — Deadline timestamp for the transaction
      - string
      - number
  - `agentSmartAccountDeploymentDataToSign` object — Data for signing the smart account deployment UserOperation. Contains messageToSign (hex hash) and the complete userOperation object that will be submitted with the signature.
    - `messageToSign` string, required — Hex-encoded message hash to sign for UserOperation
    - `userOperation` object, required — Complete UserOperation object that will be submitted with the signature
      - `sender` string, required — Smart account address
      - `nonce` string, required — Account nonce as string
      - `factory` string — Factory address for account deployment
      - `factoryData` string — Factory calldata for deployment
      - `callData` string, required — Calldata for the account to execute
      - `callGasLimit` string, required — Gas limit for the call
      - `verificationGasLimit` string, required — Gas limit for verification
      - `preVerificationGas` string, required — Gas for pre-verification
      - `maxFeePerGas` string, required — Maximum fee per gas
      - `maxPriorityFeePerGas` string, required — Maximum priority fee per gas
      - `paymaster` string — Paymaster address
      - `paymasterVerificationGasLimit` string — Gas limit for paymaster verification
      - `paymasterPostOpGasLimit` string — Gas limit for paymaster post-op
      - `paymasterData` string — Paymaster-specific data
      - `signature` string — Signature placeholder
  - `sessionKeyApprovalDataToSign` object — EIP-712 TypedData for session key approval. This enables the PKP signer to act on behalf of the smart account by granting it permission to execute transactions.
    - `domain` object — EIP-712 domain
      - `name` string
      - `version` string
      - `chainId` union
        - string
        - number
      - `verifyingContract` string
      - `salt` string
    - `types` object, required — EIP-712 type definitions
    - `primaryType` string — Primary type name
    - `message` string, required — Message to sign
  - `alreadyInstalled` boolean — True if the app is already installed for this user. If true, the typed data fields will be undefined.

## Other responses

- `400` — Bad request
- `404` — App not found
- `default` — Error

---

[API](https://skmtc.net/lit-protocol/apis/vincent-registry-api.md) · [All operations](https://skmtc.net/lit-protocol/apis/vincent-registry-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lit-protocol/vincent-registry-api/versions/825608de85fb/schema)
