Skip to main content

Setster Webhooks API Documentation - Real-Time Notifications (2.0)

Explore our comprehensive guide to using Setster's Webhooks API. Learn how to set up real-time notifications for your application's events and improve your integration efficiency.

About Webhooks

What Are Webhooks?

A webhook is an endpoint on your server that receives requests from Setster, notifying you about events that happen on your account, such as an appointment change. Once a webhook is set up, Setster will begin sending data to your server when it's available, with no further requests required as a one-way data sharing mechanism. Webhook events trigger the data to be sent to your server's endpoint via a POST request. In short, webhooks make getting near real-time data changes effortless. If this sounds too complicated, you may be looking to use the Setster Zapier integration instead.

Webhook Event Triggers

Events trigger a webhook to send data to your application. For each Setster webhook, you create you can opt-in to one, multiple, or all events.

The Setster API fires webhooks for the following appointment events:

Event Name Related Endpoint
appointment.created Appointment Creation
appointment.updated Appointment Updated
appointment.deleted Appointment Deleted
appointment.rescheduled Appointment Rescheduled
appointment.reminder Appointment Reminder
appointment.canceled Appointment Canceled
* Subscribe to all events

How to Setup a Webhook

  1. Add a public endpoint on your server
  2. Test your new endpoint
  3. Configure webhook details
  4. Create Setster webhook
  5. Test webhook integration

Add New Endpoint

To set up a webhook, you'll need to add a new publicly accessible endpoint to your server. Setster will send unauthenticated POST requests to this endpoint, which could be written in Ruby, PHP, Node.js, or any server-side language.

Test Your Endpoint

Test that your endpoint is public and can receive POST requests by sending a test request in your terminal or using a request client like Postman.

Configure Webhook Details

An example request body for creating a webhook is structured as follows:

{
  "company_id": 24232,
  "target_url": "",
  "events": [
    "appointment.created",
    {
    "event": "appointment.rescheduled",
    "active": 0
    }
  ],
  "active": 1
}

In this request body the target_url, company_id, and events array are required and the request must include your session_token retreived from authenticating your Setster API key.

  • Register your target_url. This is the new endpoint you created on your server for Setster to POST event data to.
  • Enter your company_id. Your company id is returned from the Authentication request.
  • Select which events from the list of available events you'd like to be sent to your target_url and add them to the events array

See Create a Webhook for full the full webhook specification.

Once you've finished editing all of the details you'd like to add to your webhook, you're ready to make a POST request with the /createWebhook Setster endpoint. For sample request code See Create a Webhook.

Test webhook integration

To test your webhook integration, make a test appointment change in the API that would trigger the event type(s) you've added to your webhook(s).

Change Webhook Url

At some point in time, you may need to change your webhook. To do so you'll need to send a PUT request to the /subscribe/{id} endpoint ensuring to update the target_url to your new server endpoint.

0 - 1 - 2 - 3 - 4 - 6 - 8 - 9 - 10 - 11 - checked in 12 - just arrived 13 - delayed

Status Code Status Definition
0 Waiting email confirmation from the client
1 Email confirmed but not validated by the admin/provider
2 Email confirmed and validated or paid
3 Declined or canceled
4 Busy time imported from external sources (e.g., Google calendar)
6 Busy time imported from Zapier
8 Completed
9 No show (the scheduled event did not take place)
10 In progress
11 Checked-in
12 Just arrived
13 Delayed

Webhooks

Webhooks Receive notifications with webhooks Setster offers webhooks to notify your application when an event happens within your account. Webhooks are especially useful for asynchronous events and building workflows within your application. For example, a new appointment is created and triggers a set of customer communications within your application.

List Webhooks

Get a list of created webhooks and their attributes.

Authorizations:
session_token
query Parameters
company_id
required
integer <int64>
Example: company_id=2345

The unique ID of the account. Account ID.

target_url
string <uri>
active
integer
Enum: 0 1
verification_key
string
created_at
string <date-time>
updated_at
string <date-time>

Responses

Request samples

curl --location --request GET 'https://www.setster.com/api/v2/subscribe?session_token=SESSION_TOKEN&target_url=TARGET_URL&active=ACTIVE&verification_key=VERIFICATION_KEY&created_at=CREATED_AT&updated_at=UPDATED_AT'

Response samples

Content type
application/json
{
  • "statusCode": 0,
  • "statusDescriptions": "OK",
  • "data": [
    • {
      }
    ]
}

Create a Webhook

Create a new webhook.

Authorizations:
session_token
query Parameters
company_id
required
integer <int64>
Example: company_id=2345

The unique ID of the account. Account ID.

Request Body schema: application/json
company_id
required
integer <int64>
Example: "24232"

The ID of the company

target_url
required
string <uri>
Default: ""
Array of strings or objects
Example: "appointment.created,[object Object]"

The list of events. The currently supported events are:

  1. appointment.created
  2. appointment.updated
  3. appointment.deleted
  4. appointment.rescheduled
  5. appointment.reminder
  6. appointment.canceled
  7. *

The "*" event means that you will subscribe to all currently supported events as well as future added events.

active
integer
Default: 1
Enum: 0 1

Responses

Request samples

Content type
application/json
{
  • "company_id": 24232,
  • "target_url": "",
  • "events": [
    • "appointment.created",
    • {
      }
    ],
  • "active": 0
}

Response samples

Content type
application/json
{
  • "statusCode": 0,
  • "statusDescriptions": "OK",
  • "data": {
    • "id": 13425,
    • "company_id": 24232,
    • "target_url": "",
    • "events": [
      ],
    • "active": 0,
    • "verification_key": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
}

Get a Webhook

Get the attributes of a specific webhook.

Authorizations:
session_token
path Parameters
id
required
integer <int64>

WebHook id

query Parameters
company_id
required
integer <int64>
Example: company_id=2345

The unique ID of the account. Account ID.

Responses

Request samples

curl --location -g --request GET 'https://www.setster.com/api/v2/subscribe/{id}?session_token=SESSION_TOKEN&id=ID'

Response samples

Content type
application/json
{
  • "statusCode": 0,
  • "statusDescriptions": "OK",
  • "data": [
    • {
      }
    ]
}

Modify a Webhook

Modify the attributes for an existing webhook.

Authorizations:
session_token
path Parameters
id
required
integer <int64>

WebHook id

query Parameters
company_id
required
integer <int64>
Example: company_id=2345

The unique ID of the account. Account ID.

Request Body schema: application/json
company_id
required
integer <int64>
Example: "24232"

The ID of the company

target_url
required
string <uri>
Default: ""
Array of strings or objects
Example: "appointment.created,[object Object]"

The list of events. The currently supported events are:

  1. appointment.created
  2. appointment.updated
  3. appointment.deleted
  4. appointment.rescheduled
  5. appointment.reminder
  6. appointment.canceled
  7. *

The "*" event means that you will subscribe to all currently supported events as well as future added events.

active
integer
Default: 1
Enum: 0 1

Responses

Request samples

Content type
application/json
{
  • "company_id": 24232,
  • "target_url": "",
  • "events": [
    • "appointment.created",
    • {
      }
    ],
  • "active": 0
}

Response samples

Content type
application/json
{
  • "statusCode": 0,
  • "statusDescriptions": "OK",
  • "data": {
    • "id": 13425,
    • "company_id": 24232,
    • "target_url": "",
    • "events": [
      ],
    • "active": 0,
    • "verification_key": "string",
    • "created_at": "2019-08-24T14:15:22Z",
    • "updated_at": "2019-08-24T14:15:22Z"
    }
}

Delete a Webhook

Delete an existing webhook.

Authorizations:
session_token
path Parameters
id
required
integer <int64>

WebHook id

query Parameters
company_id
required
integer <int64>
Example: company_id=2345

The unique ID of the account. Account ID.

Responses

Request samples

curl --location -g --request DELETE 'https://www.setster.com/api/v2/subscribe/{id}?session_token=SESSION_TOKEN&id=ID'

Response samples

Content type
application/json
{
  • "statusCode": 0,
  • "statusDescriptions": "OK",
  • "data": { }
}