Webhooks

Retrieve all webhooks

GETaccount/webhooks

Retrieves a list of webhooks.

Definition

GET https://api.gosquared.com/account/v1/webhooks
Open Query Builder
Close

Authentication

Parameters * required

    Post Data * required

    Example Request

    require_once('gosquared-php-sdk/main.php');
    
    $GS = new GoSquared(array(
      'site_token' => 'GSN-106863-S',
      'api_key' => 'demo'
    ));
    
    $result = $GS->account->webhooks();

    Live Responseundefined undefined

    Your API Key is not authorised for this endpoint

    Add a webhook

    POSTaccount/webhooks

    Adds a webhook.

    POST Body

    name

    String

    url

    StringRequired

    trigger

    String

    Accepted values: chat_message, entered_smart_group, exited_smart_group, traffic_dip, traffic_spike

    value

    String or number

    include_unverified

    Boolean

    Definition

    POST https://api.gosquared.com/account/v1/webhooks
    Open Query Builder
    Close

    Authentication

    Parameters * required

      Post Data * required

      Example Request

      The PHP library does not support this function at this time

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Retrieve a webhook

      GETaccount/webhooks/{webhookID}

      Retrieves a webhook.

      Path Parameters

      webhookID

      NumberRequired

      Definition

      GET https://api.gosquared.com/account/v1/webhooks/{webhookID}
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      require_once('gosquared-php-sdk/main.php');
      
      $GS = new GoSquared(array(
        'site_token' => 'GSN-106863-S',
        'api_key' => 'demo'
      ));
      
      $result = $GS->account->webhooks->{webhookID}();

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Please fill in the required fields in the Query Builder

      Remove a webhook

      DELETEaccount/webhooks/{webhookID}

      Deletes a webhook.

      Path Parameters

      webhookID

      NumberRequired

      Definition

      DELETE https://api.gosquared.com/account/v1/webhooks/{webhookID}
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      The PHP library does not support this function at this time

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Retrieve all triggers for a webhook

      GETaccount/webhooks/{webhookID}/triggers

      Retrieve all triggers for a webhook.

      Path Parameters

      webhookID

      NumberRequired

      Definition

      GET https://api.gosquared.com/account/v1/webhooks/{webhookID}/triggers
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      require_once('gosquared-php-sdk/main.php');
      
      $GS = new GoSquared(array(
        'site_token' => 'GSN-106863-S',
        'api_key' => 'demo'
      ));
      
      $result = $GS->account->webhooks->{webhookID}->triggers();

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Please fill in the required fields in the Query Builder

      Add a trigger to a webhook

      POSTaccount/webhooks/{webhookID}/triggers

      Add a trigger to a webhook.

      Path Parameters

      webhookID

      NumberRequired

      POST Body

      trigger

      StringRequired

      Accepted values: chat_message, entered_smart_group, exited_smart_group, traffic_dip, traffic_spike

      value

      String or numberRequired

      Definition

      POST https://api.gosquared.com/account/v1/webhooks/{webhookID}/triggers
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      The PHP library does not support this function at this time

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Retrieve an trigger for a webhook

      GETaccount/webhooks/{webhookID}/triggers/{triggerID}

      Retrieve an trigger for a webhook.

      Path Parameters

      webhookID

      NumberRequired

      triggerID

      NumberRequired

      Definition

      GET https://api.gosquared.com/account/v1/webhooks/{webhookID}/triggers/{triggerID}
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      require_once('gosquared-php-sdk/main.php');
      
      $GS = new GoSquared(array(
        'site_token' => 'GSN-106863-S',
        'api_key' => 'demo'
      ));
      
      $result = $GS->account->webhooks->{webhookID}->triggers->{triggerID}();

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint

      Please fill in the required fields in the Query Builder

      Remove a trigger from a webhook

      DELETEaccount/webhooks/{webhookID}/triggers/{triggerID}

      Remove a trigger from a webhook.

      Path Parameters

      webhookID

      NumberRequired

      triggerID

      NumberRequired

      Definition

      DELETE https://api.gosquared.com/account/v1/webhooks/{webhookID}/triggers/{triggerID}
      Open Query Builder
      Close

      Authentication

      Parameters * required

      Post Data * required

      Example Request

      The PHP library does not support this function at this time

      Live Responseundefined undefined

      Your API Key is not authorised for this endpoint