Skip to main content

Update webhook

PUT 

/v2/webhooks/:webhookId

Updates a webhook using values specified by a webhook object passed as JSON in the POST payload. If the object does not define a specific property, its value will not be updated.

The response is the full webhook object as returned by the Get webhook endpoint.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).

Request

Path Parameters

    webhookId string required

    Webhook ID.


    Example: Zib4xbZsmvZeK55ua

Bodyrequired

  • isAdHoc boolean | null nullable
    Example: false
  • eventTypes WebhookEventType (string)[] nullable

    Possible values: [ACTOR.BUILD.ABORTED, ACTOR.BUILD.CREATED, ACTOR.BUILD.FAILED, ACTOR.BUILD.SUCCEEDED, ACTOR.BUILD.TIMED_OUT, ACTOR.RUN.ABORTED, ACTOR.RUN.CREATED, ACTOR.RUN.FAILED, ACTOR.RUN.RESURRECTED, ACTOR.RUN.SUCCEEDED, ACTOR.RUN.TIMED_OUT, TEST]


    Example: ["ACTOR.RUN.SUCCEEDED"]
  • condition object
      anyOf
    • actorId string | null nullable
      Example: hksJZtadYvn4mBuin
    • actorTaskId string | null nullable
      Example: asdLZtadYvn4mBZmm
    • actorRunId string | null nullable
      Example: hgdKZtadYvn4mBpoi
  • ignoreSslErrors boolean | null nullable
    Example: false
  • doNotRetry boolean | null nullable
    Example: false
  • requestUrl string,null<uri> nullable
    Example: http://example.com/
  • payloadTemplate string | null nullable
    Example: {\n "userId": {{userId}}...
  • headersTemplate string | null nullable
    Example: {\n "Authorization": "Bearer ..."}
  • title string | null nullable
    Example: Actor run succeeded webhook
  • description string | null nullable
    Example: this is webhook description
  • shouldInterpolateStrings boolean | null nullable
    Example: false

Status 200

Response Headers
    {
    "data": {
    "id": "YiKoxjkaS9gjGTqhF",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2019-12-13T08:36:13.202Z",
    "userId": "wRsJZtadYvn4mBZmm",
    "isAdHoc": false,
    "shouldInterpolateStrings": false,
    "eventTypes": [
    "ACTOR.RUN.SUCCEEDED"
    ],
    "condition": {
    "actorId": "hksJZtadYvn4mBuin",
    "actorTaskId": "asdLZtadYvn4mBZmm",
    "actorRunId": "hgdKZtadYvn4mBpoi"
    },
    "ignoreSslErrors": false,
    "doNotRetry": false,
    "requestUrl": "http://example.com/",
    "payloadTemplate": "{\\n \"userId\": {{userId}}...",
    "headersTemplate": "{\\n \"Authorization\": \"Bearer ...\"}",
    "title": "Actor run succeeded webhook",
    "description": "this is webhook description",
    "lastDispatch": {
    "status": "ACTIVE",
    "finishedAt": "2019-12-13T08:36:13.202Z"
    },
    "stats": {
    "totalDispatches": 1
    }
    }
    }