Manage webhooks

See, edit, and delete webhooks.


See created webhooks

To get a list of all webhooks in your workspace with their IDs, call the /workspaces/{workspace_id}/webhooks endpoint with your workspace ID as a path parameter:

GET /workspaces/{workspace_id}/webhooks HTTP/1.1
Host: api.up42.com
Authorization: Bearer {token}
See response example
{
  "data": [
    {
      "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
      "url": "https://my.sample.endpoint.com/",
      "name": "My alert for job and order statuses",
      "active": true,
      "events": ["job.status, order.status"],
      "createdAt": "2022-02-17T08:47:11.377149Z",
      "updatedAt": "2022-02-17T08:47:11.377149Z",
      "secret": "QWZTFnMEXhqZKNmu"
    },
    {
      "id": "3ca2cab0-87b0-66d5-a755-55c13e353ac4",
      "url": "https://my.sample.endpoint.com/",
      "name": "An old alert for job statuses",
      "active": false,
      "events": ["job.status"],
      "createdAt": "2021-02-17T08:47:11.377149Z",
      "updatedAt": "2021-02-17T08:47:11.377149Z",
      "secret": ""
    }
  ],
  "error": null
}

To get information about one webhook, call the /workspaces/{workspace_id}/webhooks/{webhook_id} endpoint with your workspace ID and a specific webhook ID as path parameters:

GET /workspaces/{workspace_id}/webhooks/{webhook_id} HTTP/1.1
Host: api.up42.com
Authorization: Bearer {token}
See response example
{
  "data": {
    "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
    "url": "https://my.sample.endpoint.com/",
    "name": "My alert for job and order statuses",
    "active": true,
    "events": ["job.status, order.status"],
    "createdAt": "2022-02-17T08:47:11.377149Z",
    "updatedAt": "2022-02-17T08:47:11.377149Z",
    "secret": "QWZTFnMEXhqZKNmu"
  },
  "error": null
}

Edit a webhook

To change parameters of a created webhook, call the /workspaces/{workspace_id}/webhooks/{webhook_id} endpoint with your workspace ID and a specific webhook ID as path parameters:

PUT /workspaces/{workspace_id}/webhooks/{webhook_id} HTTP/1.1
Host: api.up42.com
Authorization: Bearer {token}

Change webhook parameters in a request body.

See request example
{
  "events": ["job.status, order.status"],
  "name": "My updated alert for job and order statuses",
  "url": "https://my.sample.endpoint.com/",
  "secret": "QWZTFnMEXhqZKNmu",
  "active": true
}

See response example
{
  "data": {
    "id": "1df1ebb0-78a4-55d9-b806-15d22e391bd3",
    "url": "https://my.sample.endpoint.com/",
    "name": "My updated alert for job and order statuses",
    "active": true,
    "events": ["job.status, order.status"],
    "createdAt": "2022-02-17T08:47:11.377149Z",
    "updatedAt": "2022-02-17T08:47:11.377149Z",
    "secret": "QWZTFnMEXhqZKNmu"
  },
  "error": null
}

Delete a webhook

To delete a webhook, call the /workspaces/{workspace_id}/webhooks/{webhook_id} endpoint with your workspace ID and a specific webhook ID as path parameters:

DELETE /workspaces/{workspace_id}/webhooks/{webhook_id} HTTP/1.1
Host: api.up42.com
Authorization: Bearer {token}

If a webhook is deleted successfully, there will be no response body.