---
updatedAt: 2026-05-27T18:13:48.000Z
agentTools:
  projectIndex: https://docs.infiniaweb.com/llms.txt
---

# Update Webhook

Updates an existing webhook's configuration or status. If the webhook is currently in an ERROR state, you can trigger a resend by updating its status to PENDING.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Webhooks",
    "description": "Manage your webhooks",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://app2test.infiniaweb.com/infinia_api/v1/webhooks",
      "description": "Sandbox"
    }
  ],
  "paths": {
    "/{webhook_id}/": {
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update Webhook",
        "description": "Updates an existing webhook's configuration or status. If the webhook is currently in an ERROR state, you can trigger a resend by updating its status to PENDING.",
        "operationId": "v1_update_webhook__webhook_id___patch",
        "security": [
          {
            "HTTPBasic": []
          }
        ],
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "x-company-id",
            "in": "header",
            "required": false,
            "schema": {
              "description": "ID of a child company for authentication. If not provided, the parent company will be authenticated.",
              "title": "X-Company-Id",
              "type": "integer"
            },
            "description": "ID of a child company for authentication. If not provided, the parent company will be authenticated."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSuccess"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unprocessable Entity"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error",
              "fail"
            ],
            "title": "Status",
            "default": "error"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "error_code": {
            "title": "Error Code",
            "type": "string"
          },
          "trace_id": {
            "title": "Trace Id",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "Error Response"
      },
      "PatchRequest": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "The new status of the webhook",
            "enum": [
              "PENDING"
            ]
          },
          "url": {
            "title": "Url",
            "description": "The new URL of the webhook to send.",
            "type": "string"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PatchRequest"
      },
      "PublicWebhookResponse": {
        "properties": {
          "id": {
            "title": "Id",
            "description": "The unique identifier of the webhook",
            "type": "string"
          },
          "status": {
            "description": "The current status of the webhook",
            "$ref": "#/components/schemas/StatusWebhook"
          },
          "created_at": {
            "title": "Created At",
            "description": "The creation timestamp of the webhook",
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "title": "Updated At",
            "description": "The last update timestamp of the webhook",
            "type": "string",
            "format": "date-time"
          },
          "operation_type": {
            "title": "Operation Type",
            "description": "The type of operation the webhook is associated with",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "description": "The URL the webhook is pointing to",
            "type": "string"
          },
          "last_response_status": {
            "title": "Last Response Status",
            "description": "The status of the last response received from the webhook",
            "type": "string"
          },
          "last_response_body": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "string"
              }
            ],
            "title": "Last Response Body",
            "description": "The body of the last response received from the webhook"
          }
        },
        "type": "object",
        "title": "PublicWebhookResponse"
      },
      "StatusWebhook": {
        "type": "string",
        "enum": [
          "INITIATED",
          "PENDING",
          "QUEUED",
          "SENT",
          "ERROR"
        ],
        "title": "StatusWebhook"
      },
      "WebhookSuccess": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/PublicWebhookResponse"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "WebhookSuccess"
      }
    },
    "securitySchemes": {
      "HTTPBasic": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```