Webhooks

Register a webhook subscription

Changed on

Creates a webhook subscription and an optional list of event types to subscribe to (defaults to all when omitted). kind: "http" (the default) delivers signed JSON to a URL; the response includes the generated signing secret, which is returned only once at creation time and cannot be retrieved later. kind: "integration" posts each event as a message into a connected integration target (e.g. a Slack channel): pick the capability from GET /webhooks/integrations and the args from GET /webhooks/integrations/{capabilityId}/targets. Integration webhooks have no signing secret. Send an Idempotency-Key header to make the create safe to retry: the same key with the same body returns the existing webhook (status 201, Idempotent-Replayed: true) instead of creating a second one, and the same key with a different body is a 422. A replayed create does not return the signing secret again; use rotate-secret if the original response was lost. If that webhook was deleted in the meantime, the retry is a 404.

post/webhooks

Request

  • Base URL
    https://api.mobilerun.ai
  • URL
    https://api.mobilerun.ai/webhooks
  • Auth
    HTTP bearer

Headers

idempotency-keystring

Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

Example:b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f

Request body

OR

Example request

{
  "url": "https://example.com/webhooks/droidrun",
  "eventTypes": [
    "task.run.completed",
    "task.run.failed"
  ]
}

Response

Webhook created (secret shown once for http webhooks). A replayed create (same Idempotency-Key, same body) returns the current webhook without secret and with Idempotent-Replayed: true.

Example response

{
  "data": {
    "integration": {
      "capability": {
        "id": "slack.post_message",
        "revision": 1
      }
    }
  }
}

Changes

    • breaking

      the request's body type changed from object to no type

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became optional for the status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional header request parameter idempotency-key

    • info

      added subschema #1 subschema #2 to the request body oneOf list

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status