GET /webhooks

Get all webhooks configured for the current device

Responses

  • 200 application/json

    Webhooks retrieved successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data array[object]
      Hide data attributes Show data attributes object
      • id integer
      • url string
      • events array[string]
      • active boolean
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
GET /webhooks
curl \
 --request GET 'http://localhost:7001/webhooks' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "code": 200,
  "data": [
    {
      "id": 1,
      "url": "https://your-server.com/webhook",
      "active": true,
      "events": [
        "message.received",
        "connection.connected"
      ],
      "created_at": "2025-01-01T00:00:00Z"
    },
    {
      "id": 2,
      "url": "https://backup-server.com/webhook",
      "active": true,
      "events": [],
      "created_at": "2025-02-15T00:00:00Z"
    }
  ],
  "status": true,
  "message": "Webhooks retrieved successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Webhooks retrieved successfully",
  "data": [
    {
      "id": 1,
      "url": "https://your-server.com/webhook",
      "events": [
        "message.received"
      ],
      "active": true
    }
  ]
}
Response examples (401)
{
  "code": 401,
  "error": "Invalid or expired JWT token",
  "status": false,
  "message": "Unauthorized"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "code": 500,
  "error": "Failed to retrieve webhooks",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}