HTTP API Destination

Learn how to use the HTTP API Destination to send data to custom endpoints, enabling advanced configurations for HIPAA-compliant integrations.

HTTP API Destination

The HTTP API Destination allows you to send data to any custom endpoint with complete control over the request format. This destination is ideal for integrations with platforms that are not directly supported by Ours. You can configure headers, HTTP methods, and request bodies while maintaining HIPAA compliance.


Features of the HTTP API Destination

  • Custom URL: Specify the endpoint URL to which data should be sent.
  • Customizable HTTP Method: Choose between POST and GET requests.
  • Headers Configuration: Add custom headers for authentication or other requirements.
  • HIPAA Compliance: Ensure all data sent is compliant with privacy regulations, including hashing or redacting sensitive information.
  • Visitor and Event Data: Each request includes the current visitor state and event data, allowing for rich context in your integrations.

Configuring the HTTP API Destination

1. Add the Destination

  1. Log in to your Ours account and navigate to the Destinations section.
  2. Click Add Destination and select HTTP API Destination.
  3. Provide a Name for the destination to distinguish it from others.
  4. Enter the Destination URL (e.g., https://api.example.com/data).

2. Define the Mapping

After creating the destination, configure the data mapping to control how your data is structured when sent to the endpoint.

Default Mapping

  1. Navigate to the Mappings tab of the HTTP API Destination.
  2. Click on Default Mapping to configure the default mapping for the destination.
  3. Use the interface to configure:
    • Headers: Configure custom headers such as:
      • Authentication headers (e.g., Authorization: Bearer <token>)
      • Content type headers (e.g., Content-Type: application/json)
      • Custom headers specific to your integration

The payload sent to your endpoint will always be a JSON structure containing the current visitor state and event data in the following format:

{
  "visitor": {
    "id": "visitor_id",
    "email": "visitor_email",
    // visitor properties
  },
  "event": {
    "event": "event_name",
    // event properties
  }
}

3. Configure the HTTP Method

You can choose between POST and GET for your requests:

  • Use POST for sending data in the body. This is recommended when:
    • Sending large amounts of data
    • Including sensitive information
    • Working with complex JSON structures
  • Use GET for sending data in query parameters. This is useful when:
    • Working with simple data structures
    • Integrating with endpoints that only accept GET requests
    • Creating bookmarkable URLs

Set the HTTP method in the Default Mapping section or override it for specific events in the custom mapping. The method can be configured using the dropdown menu in the mapping interface.


Example: Using with Zapier

The HTTP API Destination can be easily integrated with Zapier and other tools used to automate workflows and connect with thousands of other applications. Here's how to set it up:

Note: This is just one example of how to use the HTTP API Destination. You can use any webhook-based automation tool or custom endpoint that accepts HTTP requests.

1. Create a Zapier Webhook

  1. Log in to your Zapier account and create a new Zap
  2. Select "Webhooks by Zapier" as the trigger
  3. Choose "Catch Hook" as the trigger event
  4. Copy the webhook URL provided by Zapier

2) Configure the HTTP API Destination

  1. In your Ours account, navigate to the HTTP API Destination settings
  2. Set the Destination URL to your Zapier webhook URL
  3. Configure the following in the Default Mapping:
    • Set HTTP Method to POST
    • The payload will automatically be sent to Zapier in the format:
      {
        "visitor": {
          "id": "visitor_id",
          "email": "visitor_email",
          // visitor properties
        },
        "event": {
          "event": "event_name",
          // event properties
        }
      }

Once the webhook is configured, you can set up various actions in Zapier.