# `abacusai.webhook`

## Module Contents

### Classes

`Webhook` | A Abacus.AI Webhook attached to an endpoint and event trigger for a given object.

class abacusai.webhook.Webhook(client, webhookId=None, deploymentId=None, endpoint=None, webhookEventType=None, payloadTemplate=None, createdAt=None)

  Bases: `abacusai.return_class.AbstractApiClass`

  A Abacus.AI Webhook attached to an endpoint and event trigger for a given object.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - webhookId (str) – Unique identifier for this webhook.

    - deploymentId (str) – Identifier for the deployment this webhook is attached to.

    - endpoint (str) – The URI this webhook will send HTTP POST requests to.

    - webhookEventType (str) – The event that triggers the webhook action.

    - payloadTemplate (str) – Template for JSON Dictionary to be sent as the body of the POST request.

    - createdAt (str) – The date and time this webhook was created.

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      Webhook

  describe()

    Describe the webhook with a given ID.

    Parameters:

      webhook_id (str) – Unique string identifier of the target webhook.

    Returns:

      The webhook with the given ID.

    Return type:

      Webhook

  update(endpoint=None, webhook_event_type=None, payload_template=None)

    Update the webhook

    Parameters:

      - endpoint (str) – If provided, changes the webhook’s endpoint.

      - webhook_event_type (str) – If provided, changes the event type.

      - payload_template (dict) – If provided, changes the payload template.

  delete()

    Delete the webhook

    Parameters:

      webhook_id (str) – Unique identifier of the target webhook.