---
updatedAt: 2025-07-26T16:54:38.000Z
agentTools:
  projectIndex: https://docs.metakeep.xyz/llms.txt
---

# Update Lambda

After the lambda is created from the `/v2/app/lambda/create` or imported using `/v2/app/lambda/import` API call, use this API to update your lambda if your lambda contract supports upgrades.

Once you have upgraded your lambda contract by calling the `upgrade` function using [Invoke Lambda](https://docs.metakeep.xyz/reference/v2applambdainvoke), you can use this API to update the lambda ABI if there are any changes to the ABI.

You can find detailed instructions on how to create an upgradeable lambda  [here](https://docs.metakeep.xyz/docs/lambda-upgradeable).

## Error Status

> 🚧 Api Error Status
>
> You can find error status returned by the api [here](https://docs.metakeep.xyz/reference/api-error-status#v2applambdaupdate).

© Copyright 2024, Passbird Research Inc.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "production",
    "version": "3.4"
  },
  "servers": [
    {
      "url": "https://api.metakeep.xyz/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v2/app/lambda/update": {
      "post": {
        "summary": "Update Lambda",
        "description": "",
        "operationId": "v2applambdaupdate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "lambda",
                  "abi"
                ],
                "properties": {
                  "lambda": {
                    "type": "string",
                    "description": "Hex encoded lambda address. This is obtained from a previous `/v2/app/lambda/create` or `/v2/app/lambda/import` API call"
                  },
                  "abi": {
                    "type": "string",
                    "description": "Smart Contract ABI. You get this after compiling your smart contract using hardhat or truffle.",
                    "default": "[{             \"inputs\": [                 {                     \"internalType\": \"string\",                     \"name\": \"_greeting\",                     \"type\": \"string\"                 }             ],             \"name\": \"setGreeting\",             \"outputs\": [],             \"stateMutability\": \"nonpayable\",             \"type\": \"function\",             \"signature\": \"0xa4136862\"         }]",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": \"SUCCESS\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "SUCCESS"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```