> For the complete documentation index, see [llms.txt](https://legacydocs.nexudus.com/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://legacydocs.nexudus.com/platform/settings/integrations-and-apps-1/webhooks.md).

# Webhooks

### What are webhooks? <a href="#webhooks-whatarewebhooks" id="webhooks-whatarewebhooks"></a>

Nexudus can communicate with other systems and automatically push data on to those systems when specific actions take place. This information is transferred over the internet by means of **webhooks**. The receiving end of these webhooks is normally a system that understands this data and is able to process it.

The receiving end of a webhook will listen for incoming calls from Nexudus with specific data. For example, if you want to notify another system every time you make a change to a member or contact you could use the "Coworker Update" webhook which sends the data of the contact or member whose record you have updated.&#x20;

Webhooks are created from the **Settings** **> Integrations** menu. We keep adding new webhooks as users require them for specific integrations but these are the ones we have available so far:

* Coworker Update
* Coworker Create
* BlogPost Create
* BlogPost Update
* Booking Create
* Booking Update
* Booking Delete
* Send Welcome Email
* Coworker Contract Activate
* Coworker Contract Cancel
* Coworker Contract Renew
* Coworker Contract Upgrade Downgrade
* Coworker Contract Activate First
* Coworker Invoice Create First
* Coworker Invoice Create
* Coworker Invoice Delete
* Coworker Invoice Update
* Coworker Invoice Refund
* Coworker Invoice Credit Note
* Coworker Invoice Paid
* Coworker Invoice Failed Payment
* Coworker Invoice Received Payment
* Coworker Invoice Awaiting Payment
* Team Create
* Team Update
* Team Delete
* Calendar Event Create
* Calendar Event Update
* Calendar Event Attendee Delete
* Calendar Event Attendee Create
* Calendar Event Attendee Update
* Global Chat Message Create
* NewsLetter Subscriber Create
* NewsLetter Subscriber Subscribed
* NewsLetter Subscriber UnSubscribed
* NewsLetter Subscriber Removed From Group
* Coworker Checkout
* Coworker Checkin
* Coworker Checkin Failed
* Visitor Notification
* Community Board New Thread
* Community Board New Reply
* Visitor Checked in
* Visitor Registered
* Blog Post Delete
* Calendar Event Delete
* HelDesk Message Created
* HelpDesk Comment Created
* Checkin Created
* Checkin Updated
* Checkin Deleted
* Coworker Delete
* Coworker Message Create
* Delivery Created
* Delivery Assigned
* Proposal Created
* Proposal Updated
* Proposal Deleted

Webhook requests created by our servers can be verified by calculating a digital signature using a shared secret you can type in **Settings > Integrations**.

## Webhook Types

<mark style="color:blue;">`GET`</mark> `https://spaces.nexudus.com/api/utils/enums?name=eWebhookAction`

Gets all the available webhook types

#### Query Parameters

| Name | Type   | Description    |
| ---- | ------ | -------------- |
| name | string | eWebhookAction |

{% tabs %}
{% tab title="200 " %}

```javascript
[ 
   { 
      "Name":"None",
      "Id":1
   },
   { 
      "Name":"CoworkerUpdate",
      "Id":2
   },
   { 
      "Name":"CoworkerCreate",
      "Id":3
   },
   { 
      "Name":"BlogPostCreate",
      "Id":4
   },
   { 
      "Name":"BlogPostUpdate",
      "Id":5
   },
   { 
      "Name":"BookingCreate",
      "Id":6
   },
   { 
      "Name":"BookingUpdate",
      "Id":7
   },
   { 
      "Name":"BookingDelete",
      "Id":8
   },
   { 
      "Name":"SendWelcomeEmail",
      "Id":9
   },
   { 
      "Name":"CoworkerContractActivate",
      "Id":10
   },
   { 
      "Name":"CoworkerContractCancel",
      "Id":11
   },
   { 
      "Name":"CoworkerContractRenew",
      "Id":12
   },
   { 
      "Name":"CoworkerContractUpgradeDowngrade",
      "Id":13
   },
   { 
      "Name":"CoworkerContractActivateFirst",
      "Id":14
   },
   { 
      "Name":"CoworkerInvoiceCreateFirst",
      "Id":15
   },
   { 
      "Name":"CoworkerInvoiceCreate",
      "Id":16
   },
   { 
      "Name":"CoworkerInvoiceDelete",
      "Id":17
   },
   { 
      "Name":"CoworkerInvoiceUpdate",
      "Id":18
   },
   { 
      "Name":"CoworkerInvoiceRefund",
      "Id":19
   },
   { 
      "Name":"CoworkerInvoiceCreditNote",
      "Id":20
   },
   { 
      "Name":"CoworkerInvoicePaid",
      "Id":21
   },
   { 
      "Name":"CoworkerInvoiceFailedPayment",
      "Id":22
   },
   { 
      "Name":"CoworkerInvoiceReceivedPayment",
      "Id":23
   },
   { 
      "Name":"CoworkerInvoiceAwaitingPayment",
      "Id":24
   },
   { 
      "Name":"CalendarEventCreate",
      "Id":25
   },
   { 
      "Name":"CalendarEventUpdate",
      "Id":26
   },
   { 
      "Name":"CalendarEventAttendeeDelete",
      "Id":27
   },
   { 
      "Name":"CalendarEventAttendeeCreate",
      "Id":28
   },
   { 
      "Name":"CalendarEventAttendeeUpdate",
      "Id":29
   },
   { 
      "Name":"GlobalChatMessageCreate",
      "Id":30
   },
   { 
      "Name":"NewsLetterSubscriberCreate",
      "Id":31
   },
   { 
      "Name":"NewsLetterSubscriberSubscribed",
      "Id":32
   },
   { 
      "Name":"NewsLetterSubscriberUnSubscribed",
      "Id":33
   },
   { 
      "Name":"NewsLetterSubscriberRemovedFromGroup",
      "Id":34
   },
   { 
      "Name":"CoworkerCheckout",
      "Id":35
   },
   { 
      "Name":"CoworkerCheckin",
      "Id":36
   },
   { 
      "Name":"CoworkerCheckinFailed",
      "Id":37
   },
   { 
      "Name":"VisitorNotification",
      "Id":38
   },
   { 
      "Name":"CommunityBoardNewThread",
      "Id":39
   },
   { 
      "Name":"CommunityBoardNewReply",
      "Id":40
   },
   { 
      "Name":"VisitorCheckedin",
      "Id":41
   },
   { 
      "Name":"VisitorRegistered",
      "Id":42
   },
   { 
      "Name":"BlogPostDelete",
      "Id":43
   },
   { 
      "Name":"CalendarEventDelete",
      "Id":44
   },
   { 
      "Name":"HelDeskMessageCreated",
      "Id":45
   },
   { 
      "Name":"HelpDeskCommentCreated",
      "Id":46
   },
   { 
      "Name":"CheckinCreated",
      "Id":47
   },
   { 
      "Name":"CheckinUpdated",
      "Id":48
   },
   { 
      "Name":"CheckinDeleted",
      "Id":49
   },
   { 
      "Name":"CoworkerDelete",
      "Id":50
   },
   { 
      "Name":"CoworkerMessageCreate",
      "Id":51
   },
   { 
      "Name":"DeliveryCreated",
      "Id":52
   },
   { 
      "Name":"DeliveryAssigned",
      "Id":53
   },
   { 
      "Name":"ProposalCreated",
      "Id":54
   },
   { 
      "Name":"ProposalUpdated",
      "Id":55
   },
   { 
      "Name":"ProposalDeleted",
      "Id":56
   },
   { 
      "Name":"TeamCreated",
      "Id":57
   },
   { 
      "Name":"TeamUpdated",
      "Id":58
   },
   { 
      "Name":"TeamDeleted",
      "Id":59
   },
   { 
      "Name":"CoworkerContractUpdate",
      "Id":60
   },
   { 
      "Name":"AccessControlUpdate",
      "Id":61
   },
   { 
      "Name":"CoworkerContractCreate",
      "Id":62
   }
]
```

{% endtab %}
{% endtabs %}

### Verify a webhook created through the API <a href="#webhooks-webhookrequestscreatedbyourserverscanbeverifiedbycalculatingadigitalsignatureusingasharedse" id="webhooks-webhookrequestscreatedbyourserverscanbeverifiedbycalculatingadigitalsignatureusingasharedse"></a>

If a shared secret is available, each Webhook request includes a **X-Nexudus-Hook-Signature** header which is generated using the app's shared secret along with the data sent in the request.

The following code is used to generate the hash header:

```csharp
var wr = GetWebRequest();
var dataString = JsonConvert.SerializeObject(new[] { dto });

//Calculate signature hash
var sharedSecret = GetSharedSecret();
if (!string.IsNullOrEmpty(sharedSecret))
{
    var encoding = new System.Text.ASCIIEncoding();
    var keyBytes = encoding.GetBytes(sharedSecret);
    var hmacsha256 = new HMACSHA256(keyBytes);
    var messageBytes = encoding.GetBytes(dataString);
    var hashBytes = hmacsha256.ComputeHash(messageBytes);
    var hash = ByteToString(hashBytes);
    wr.Headers.Add("X-Nexudus-Hook-Signature", hash);
}

string ByteToString(byte[] buff)
{
    string sbinary = "";
    for (int i = 0; i < buff.Length; i++)
        sbinary += buff[i].ToString("X2"); // hex format
        
    return sbinary;
}


```

To verify that the request came from Nexudus, compute the HMAC 256 digest and compare it with the value in the **X-Nexudus-Hook-Signature** header. If they match, you can be sure that the Webhook was sent from Nexudus and the data has not been compromised.

### Failed Requests and retries.

If your server fails to process a webhook request, Nexudus will reattempt to call the webhook URL at different delayed intervals up to 10 times.&#x20;

{% hint style="danger" %}
If your server fails to process a request 10 consecutive times, the failing webhook will be automatically disabled.
{% endhint %}
