Test the Webhook Integration
    • Dark
      Light
    • PDF

    Test the Webhook Integration

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/livechat/webhook.test

    This endpoint sends sample data to test whether the configured webhook URL is functioning correctly. Permission required: view-livechat-webhooks.

    The data you can expect on your webhook for this test follows this format:

    {
      "type": "LivechatSession",
      "_id": "fasd6f5a4sd6f8a4sdf",
      "label": "title",
      "topic": "asiodojf",
      "createdAt": "2024-09-18T12:22:02.975Z",
      "lastMessageAt": "2024-09-18T12:22:02.975Z",
      "tags": [
        "tag1",
        "tag2",
        "tag3"
      ],
      "customFields": {
        "productId": "123456"
      },
      "visitor": {
        "_id": "",
        "name": "visitor name",
        "username": "visitor-username",
        "department": "department",
        "email": "[email protected]",
        "phone": "192873192873",
        "ip": "123.456.7.89",
        "browser": "Chrome",
        "os": "Linux",
        "customFields": {
          "customerId": "123456"
        }
      },
      "agent": {
        "_id": "asdf89as6df8",
        "username": "agent.username",
        "name": "Agent Name",
        "email": "[email protected]"
      },
      "messages": [
        {
          "username": "visitor-username",
          "msg": "message content",
          "ts": "2024-09-18T12:22:02.975Z"
        },
        {
          "username": "agent.username",
          "agentId": "asdf89as6df8",
          "msg": "message content from agent",
          "ts": "2024-09-18T12:22:02.975Z"
        }
      ]
    }
    
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Responses
    200

    OK

    Success
    {
      "success": true
    }
    object
    success
    boolean

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.