Create webhook configuration

Creates a new webhook configuration for the Tenant, allowing registration of a webhook with details such as the Target URL and subscribed events.

POST
/v2/manage/webhooks

Creates a new webhook configuration for the Tenant, allowing registration of a webhook with details such as the Target URL and subscribed events.

Authorization

M2MBearerToken
AuthorizationBearer <token>

M2M Token for authentication

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.loginradius.com/v2/manage/webhooks" \  -H "Content-Type: application/json" \  -d '{    "Event": "Login",    "TargetUrl": "string"  }'
{
  "Id": "wh_001",
  "TargetUrl": "https://example.com/webhook",
  "Event": "Login",
  "CreatedDate": "2025-04-08T12:00:00Z",
  "LastModifiedDate": "2025-04-08T12:30:00Z",
  "SecretName": "webhook-secret",
  "Name": "TestSecret",
  "IsIntegrationWebhook": true,
  "Headers": {
    "X-Custom-Header": "CustomValue",
    "Authorization": "Bearer abc123"
  },
  "QueryParams": {
    "token": "xyz987",
    "mode": "sync"
  },
  "Authentication": {
    "AuthType": "Basic",
    "BasicAuth": {
      "Username": "admin",
      "Password": "password123"
    },
    "BearerToken": {
      "Token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
    }
  }
}

{
  "Message": "A parameter is not formatted correctly.",
  "Description": "The parameter is not formatted correctly, please check all the parameters in the API call",
  "ErrorCode": 7900
}

{
  "Message": "Access Unauthorized",
  "Description": "Access Unauthorized, please use valid authorization to access this endpoint.",
  "ErrorCode": 6002
}

{
  "Message": "Webhook target URL is already subscribed",
  "Description": "The provided Webhook target URL is already subscribed, please enter a unique web URL.",
  "ErrorCode": 7989
}

{
  "Message": "Operation failed due to an internal error.",
  "Description": "An unknown internal error occurred, please try again in a few minutes or contact your system administrator.",
  "ErrorCode": 7909
}