POST
/
webhooks
Create a new webhook
curl --request POST \
  --url http://localhost:3001/portal-api/webhooks \
  --header 'Content-Type: application/json' \
  --data '{
  "Name": "<string>",
  "URL": "<string>",
  "Method": "<string>",
  "Timeout": 123,
  "Events": [
    "AccessRequestApproved"
  ]
}'
{
  "ID": "<string>",
  "Name": "<string>",
  "URL": "<string>",
  "Method": "<string>",
  "Timeout": 123,
  "Headers": [
    {
      "ID": "<string>",
      "Name": "<string>",
      "Value": "<string>"
    }
  ],
  "Events": [
    "AccessRequestApproved"
  ],
  "CreatedAt": "2023-06-25 13:37",
  "UpdatedAt": "2023-06-25 13:37"
}

Body

application/json

Webhook object that needs to be added

Name
string

Name of the webhook

URL
string

URL to which the webhook will send requests

Method
string

HTTP method used by the webhook (e.g., GET, POST)

Timeout
integer

Timeout in seconds for the webhook request

Events
enum<string>[]

List of event types that trigger the webhook

Response

Webhook created successfully.

ID
string

Unique identifier for the webhook

Name
string

Name of the webhook

URL
string

URL to which the webhook will send requests

Method
string

HTTP method used by the webhook (e.g., GET, POST)

Timeout
integer

Timeout in seconds for the webhook request

Headers
object[]

List of custom headers included in the webhook request

Events
enum<string>[]

List of event types that trigger the webhook

CreatedAt
string

Timestamp of when this webhook was created

Example:

"2023-06-25 13:37"

UpdatedAt
string

Timestamp of when this webhook was updated the last time

Example:

"2023-06-25 13:37"