Webhooks

About the Webhooks API

The EverTransit Webhooks API allows you to create a new webhook and delete an existing one. To make your requests, you can use the endpoints and their methods listed below.

Endpoints

The Webhook object

{
  "id": "5f886c22fe5dd800318f8092",
  "events": [
    "ride_created"
  ],
  "endpoint": "https://myexample.com/mywebhook",
  "description": "My first webhook",
  "status": "active",
  "secret": "mysecret"
}

Attributes

NameTypeDescription

id

string

A unique identifier for the webhook.

events

array

A list of all the events that the webhook will subscribe to.

endpoint

string

A URL endpoint that will be called after the webhook receives any of the events it is subscribed to.

description

string

Brief description of the webhook functionality.

status

boolean

The status of the webhook. For example, active or disabled.

secret

string

A unique identifier used to identify webhook.

Create a webhook

Create a webhook.

Create a new webhook.

POSThttps://endpoints.evertransit.com/v2beta/webhooks
Body

The data to create the webhook.

events*array of string

A list of all the events that the webhook will subscribe to.

endpoint*string (uri)

A URL endpoint that will be called after the webhook receives any of the events it is subscribed to.

Example: "https://myexample.com/mywebhook"
secretstring

A unique identifier used to identify your webhook.

Example: "my-secret"
descriptionstring

Brief description of the webhook functionality.

Example: "My first webhook"
Response

The webhook was created successfully.

Body
idstring
eventsarray of string
endpointstring (uri)

A URL endpoint that will be called after the webhook receives any of the events it is subscribed to.

Example: "https://myexample.com/mywebhook"
descriptionstring

Brief description of the webhook functionality.

Example: "My first webhook"
statusboolean

The status of the webhook.

Example: "active"
secretstring

A unique identifier used to identify your webhook.

Example: "my-secret"
Request
const response = await fetch('https://endpoints.evertransit.com/v2beta/webhooks', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "events": [
        "ride_created"
      ],
      "endpoint": "https://myexample.com/mywebhook"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "events": [
    "text"
  ],
  "endpoint": "https://myexample.com/mywebhook",
  "description": "My first webhook",
  "status": "active",
  "secret": "my-secret"
}

API playground for creating a webhook

Delete a webhook

Delete a webhook.

Delete a webhook.

DELETEhttps://endpoints.evertransit.com/v2beta/webhooks/{webhookId}
Path parameters
webhookId*string

A unique identifier for the webhook.

Example: "ivan1qdJKrlURIBx7Rsj"
Response

The webhook was deleted successfully.

Body
idstring
eventsarray of string
endpointstring (uri)

A URL endpoint that will be called after the webhook receives any of the events it is subscribed to.

Example: "https://myexample.com/mywebhook"
descriptionstring

Brief description of the webhook functionality.

Example: "My first webhook"
statusboolean

The status of the webhook.

Example: "active"
secretstring

A unique identifier used to identify your webhook.

Example: "my-secret"
Request
const response = await fetch('https://endpoints.evertransit.com/v2beta/webhooks/{webhookId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "events": [
    "text"
  ],
  "endpoint": "https://myexample.com/mywebhook",
  "description": "My first webhook",
  "status": "active",
  "secret": "my-secret"
}

API playground for deleting a webhook

Last updated