Notification

This section provides endpoints to manage webhook notifications, enabling users to retrieve, create, update, and delete webhooks. These endpoints allow seamless integration with external systems to receive event notifications in real time.

  • Manifold will send requests to your webhook URL using static IP addresses. If your network settings restrict inbound connections, please whitelist 137.184.170.53 in your firewall to ensure you receive notifications.
  • You will receive notifications in a general format consisting of three parts: timestamp, type, and a JSON payload (data). Below is a sample notification that will be sent via webhooks:
{
  "timestamp": "2024-01-01T12:30:00Z",
  "type": 1,
  "data": {
    "reportReady": false,
    "eventId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "eventTime": "2024-01-01T12:00:00Z",
    "vin": "1HGCM82633A123456",
    "connection": "SampleConnection",
    "tSP": "SampleProvider",
    "location": {
      "latitude": 37.7749,
      "longitude": -122.4194
    }
  }
}

Retrieve All Webhooks

Endpoint:

GET /webhooks

Description:

Retrieve a list of all webhooks configured for the current client account.

Headers:

HeaderTypeDescription
x-api-keyStringAPI key to authenticate the request. Obtain from portal.

Response:

{
  "status": 200,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "url": "https://example.com/webhook",
      "httpVerb": "POST",
      "headers": {
        "Custom-Header": "Header Value"
      },
      "notificationTypes": {'Fnol' : 1},
      "connectionIds": ["123e4567-e89b-12d3-a456-426614174001"],
      "createdAt": "2024-01-01T12:00:00Z"
    }
  ]
}

Response Fields Explained:

  • id: Unique ID of the webhook.
  • url: Target URL for the webhook.
  • httpVerb: HTTP method used by the webhook (e.g., POST).
  • headers: Custom headers included in webhook requests.
  • notificationTypes: List of notification types the webhook is subscribed to.
  • connectionIds: List of connection IDs associated with the webhook.
  • createdAt: Timestamp of when the webhook was created.

Create Webhook

Endpoint:

POST /webhook

Description:

Registers a new webhook to receive event notifications.

Headers:

HeaderTypeDescription
x-api-keyStringAPI key to authenticate the request. Obtain from portal.

Request Body:

{
  "connectionIds": ["123e4567-e89b-12d3-a456-426614174001"],
  "url": "https://example.com/webhook",
  "httpVerb": "POST",
  "headers": {
    "Custom-Header": "Header Value"
  },
  "notificationTypes": {'Fnol' : 1}
}

Response:

{
  "status": 200,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "url": "https://example.com/webhook",
    "httpVerb": "POST",
    "headers": {
      "Custom-Header": "Header Value"
    },
    "notificationTypes": {'Fnol' : 1},
    "connectionIds": ["123e4567-e89b-12d3-a456-426614174001"],
    "createdAt": "2024-01-01T12:00:00Z"
  }
}

Request Fields Explained:

  • url: Target URL for the webhook.
  • httpVerb: HTTP method used by the webhook (POST, PUT).
  • headers: Optional custom headers included in webhook requests.
  • notificationTypes: List of notification types the webhook is subscribed to (Fnol: 1).
  • connectionIds: Optional list of connection IDs associated with the webhook.

Response Fields Explained:

  • id: Unique ID of the webhook.
  • url: Target URL for the webhook.
  • httpVerb: HTTP method used by the webhook (e.g., POST).
  • headers: Custom headers included in webhook requests.
  • notificationTypes: List of notification types the webhook is subscribed to.
  • connectionIds: List of connection IDs associated with the webhook.
  • createdAt: Timestamp of when the webhook was created.

Update Webhook

Endpoint:

PUT /webhook/{id}

Description:

Update the configuration of an existing webhook.

Path Parameters:

ParameterRequiredTypeDescription
idYesGuidUnique ID of the webhook.

Headers:

HeaderTypeDescription
x-api-keyStringAPI key to authenticate the request. Obtain from portal.

Request Body:

{
  "connectionIds": ["123e4567-e89b-12d3-a456-426614174001"],
  "url": "https://example.com/updated-webhook",
  "httpVerb": "PUT",
  "headers": {
    "Updated-Header": "Updated Value"
  },
  "notificationTypes": {'Fnol' : 1}
}

Response:

{
  "status": 200,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "url": "https://example.com/updated-webhook",
    "httpVerb": "PUT",
    "headers": {
      "Updated-Header": "Updated Value"
    },
    "notificationTypes":{'Fnol' : 1},
    "connectionIds": ["123e4567-e89b-12d3-a456-426614174001"],
    "createdAt": "2024-01-01T12:00:00Z"
  }
}

Delete Webhook

Endpoint:

DELETE /webhook/{id}

Description:

Remove an existing webhook.

Path Parameters:

ParameterRequiredTypeDescription
idYesStringUnique ID of the webhook.

Headers:

HeaderTypeDescription
x-api-keyStringAPI key to authenticate the request. Obtain from portal.

Response:

{
  "status": 200,
  "data": true
}

Response Fields Explained:

  • status: HTTP response status.
  • data: Boolean indicating the deletion success.