Register a webhook subscription
Changed onCreates 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.
Request
- Base URLhttps://api.mobilerun.ai
- URLhttps://api.mobilerun.ai/webhooks
- AuthHTTP bearer
Headers
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.
Request body
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
objectto 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
headerrequest parameteridempotency-key - info
added
subschema #1subschema #2to the request bodyoneOflist - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor 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
- breaking
- info
added the required property
/to the response with the status
- info