Jebbit API (v1)

Download OpenAPI specification:Download

Introduction

Use our Jebbit API to automate tasks relating to your Jebbit Businesses, Campaigns, Product Feed, Launch Links, and Integrations.

Authentication Guide

Use the client_id and client_secret provided by Jebbit in the Auth Endpoint to generate an access_token. This token is valid for 24 hours. After that you'll need to hit the endpoint again to generate a new token.

Making API Requests

Jebbit requires your access_token (which is a Json Web Token / JWT) to be included in all API requests. It must be sent in the Authorization header in the following format:

Authorization: Bearer <your access_token here>

Important: If your access_token has permissions (scopes) to multiple businesses, then we require you to send an x-jebbit-business header with every request. The value of this header is a business' ID. This header sets the scope of the request to the business provided.

API Resource Sorting

All resources from the API are listed descending by the time they were created.

Integration/Webhook Client Guide

When using our Integrations endpoint to receive Jebbit webhooks there are a few key things you want to keep top-of-mind. To help assist in this process, we've created an Example Webhook Client Repo as a kickstarter.

Test Webhooks

You're able to send a test webhook to your endpoint to verify that your integration and endpoint are properly set up. Test Webhooks allow you to test out the signature verification process before activating your Integration.

Important: Jebbit sends an x-jebbit-test header with every test webhook. You should ensure there is logic in your application to properly discard these webhooks and not continue processing them through your data ingestion process.

Jebbit Webhooks

All webhooks Jebbit sends contain an x-jebbit-signature header. This header is how you can verify that the request to your endpoint is from Jebbit.

Anatomy of a Jebbit Signature

The value of a Jebbit Signature will be a string with two key/value pairs separated by a comma. The first part is the unix timestamp of when the webhook was sent and the second part is the hmac of the payload it carries. x-jebbit-signature: t=#{timestamp},v1=#{hmac}

Verifying a Signature

The first step of validating a signature is ensuring that the timestamp provided is within a reasonable threshold from the current timestamp, say 5 minutes. If a webhook is outside of this threshold it is recommended to not process it any further -- this helps guard against replay attacks.

# Example in Ruby
if timestamp < Time.now.to_i - 300 # 300 seconds = 5 minutes
  raise StandardError, 'Timestamp outside of tolerance'
end

The next step will be to verify the hmac passed along by the v1 attribute of the signature. To verify this you'll need to do the following:

# Example in Ruby/Rails
# Step 1 - regenerate the payload by using the timestamp the header
generated_payload = "#{timestamp}.#{request.body}"

# Step 2 - create an HMAC of the generated_payload using the `shared_secret` for the integration

calculated_hmac = Base64.strict_encode64(
  OpenSSL::HMAC.digest('sha256', shared_secret, generated_payload)
)

# Step 3 - securely verify that the two hmacs are equal
ActiveSupport::SecurityUtils.secure_compare(hmac, calculated_hmac)

# if they are equal, then you can accept the payload as valid & continue processing.

Auth

Request Token

Request Body schema: application/vnd.api+json
client_id
required
any
client_secret
required
any

Responses

Response Schema: application/vnd.api+json
object
type
string
object
access_token
string
token_type
string
scope
string

Request samples

Content type
application/vnd.api+json
{
  • "client_id": null,
  • "client_secret": null
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "access_token": "some.jwt.here",
    • "token_type": "Bearer",
    • "scope": "read:business:mybiz"
    }
}

Campaigns

Lists campaigns

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
data
Array of campaign

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "campaigns",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "campaigns",
      • "attributes": {
        }
      }
    ]
}

Retrieves a Campaign

Authorizations:
HTTP: JWT
path Parameters
campaign_id
required
string

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
title
required
string
launch_date
required
date or null
active_iteration
required
string or null

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "def567",
    • "type": "campaigns",
    • "attributes": {
      • "title": "My Cool Campaign",
      • "launch_date": "2021-01-01T18:35:53.371Z",
      • "active_iteration": "K6n"
      }
    }
}

Feed Columns

Lists feed columns

Authorizations:
HTTP: JWT
query Parameters
filter[feed_id]
required
Array of strings

Responses

Response Schema: application/vnd.api+json
data
Array of feed_column

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "feed_columns",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "feed_columns",
      • "attributes": {
        }
      }
    ]
}

Creates a feed column

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "name": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_column",
    • "attributes": {
      • "name": "Column Name"
      }
    }
}

Retrieves a Feed Column

Authorizations:
HTTP: JWT
path Parameters
feed_column_id
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_column",
    • "attributes": {
      • "name": "Column Name"
      }
    }
}

Updates a Feed Column

Authorizations:
HTTP: JWT
path Parameters
feed_column_id
required
string
Request Body schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "name": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_columns",
    • "attributes": {
      • "name": "Column Name"
      }
    }
}

Deletes a Feed Column

Authorizations:
HTTP: JWT
path Parameters
feed_column_id
required
string

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Feed Rows

Lists feed rows

Authorizations:
HTTP: JWT
query Parameters
filter[feed_id]
required
Array of strings

Responses

Response Schema: application/vnd.api+json
data
Array of feed_row

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "feed_rows",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "feed_rows",
      • "attributes": {
        }
      }
    ]
}

Creates a feed row

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object
type
required
string
object
feed_id
required
string
product_identifier
required
string
data
required
json

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
feed_id
required
string
product_identifier
required
string
data
required
json

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "feed_id": "string",
      • "product_identifier": "string",
      • "data": null
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_row",
    • "attributes": {
      • "data": "{\"hello\":\"world\"}"
      }
    }
}

Retrieves a Feed Row

Authorizations:
HTTP: JWT
path Parameters
feed_row_id
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
feed_id
required
string
product_identifier
required
string
data
required
json

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_row",
    • "attributes": {
      • "data": "{\"hello\":\"world\"}"
      }
    }
}

Updates a Feed Row

Authorizations:
HTTP: JWT
path Parameters
feed_row_id
required
string
Request Body schema: application/vnd.api+json
object
type
required
string
object
feed_id
required
string
product_identifier
required
string
data
required
json

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
feed_id
required
string
product_identifier
required
string
data
required
json

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "feed_id": "string",
      • "product_identifier": "string",
      • "data": null
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_rows",
    • "attributes": {
      • "data": "{\"data\":\"data\"}"
      }
    }
}

Deletes a Feed Row

Authorizations:
HTTP: JWT
path Parameters
feed_row_id
required
string

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Feeds

Lists feeds

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
data
Array of feed

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "feeds",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "feeds",
      • "attributes": {
        }
      }
    ]
}

Creates a feed

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "name": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed",
    • "attributes": {
      • "name": "My Test Feed",
      • "version": "1234235234",
      • "status": "uploaded",
      • "source": "API"
      }
    }
}

Retrieves a Feed

Authorizations:
HTTP: JWT
path Parameters
feed_id
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed",
    • "attributes": {
      • "name": "My Test Feed"
      }
    }
}

Updates a Feed

Authorizations:
HTTP: JWT
path Parameters
feed_id
required
string
Request Body schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Responses

Response Schema: application/vnd.api+json
object
type
required
string
object
name
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "string",
    • "attributes": {
      • "name": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed",
    • "attributes": {
      • "name": "My Test Feed"
      }
    }
}

Deletes a feed

Authorizations:
HTTP: JWT
path Parameters
feed_id
required
string

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Retrieves Related Feed Columns

Authorizations:
HTTP: JWT
path Parameters
feed_id
required
string

Responses

Response Schema: application/vnd.api+json
data
Array of feed_column

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_columns",
    • "attributes": {
      • "name": "Column Name"
      }
    }
}

Retrieves Related Feed Rows

Authorizations:
HTTP: JWT
path Parameters
feed_id
required
string

Responses

Response Schema: application/vnd.api+json
data
Array of feed_row

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "feed_rows",
    • "attributes": {
      • "data": "{\"hello\":\"world\"}"
      }
    }
}

Integration Historic Backfills

Index Integration Historic Backfills

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
data
Array of integration_historic_backfill

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "integration_historic_backfills",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "integration_historic_backfills",
      • "attributes": {
        }
      }
    ]
}

integration_historic_backfills

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object
type
string
Default: "integration_historic_backfills"
object
integration_id
string

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
status
required
string
created_at
date
updated_at
date
integration_id
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "integration_historic_backfills",
    • "attributes": {
      • "integration_id": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration_historic_backfills",
    • "attributes": {
      • "status": "processing"
      }
    }
}

Shows an Integration Historic Backfill

Authorizations:
HTTP: JWT
path Parameters
backfill_id
required
string

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
status
required
string
created_at
date
updated_at
date
integration_id
required
string

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration_historic_backfills",
    • "attributes": {
      • "status": "processing"
      }
    }
}

update integration historic backfill

Authorizations:
HTTP: JWT
path Parameters
backfill_id
required
string
Request Body schema: application/vnd.api+json
object

Responses

Request samples

Content type
application/vnd.api+json
{ }

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Integration Mappings

Index Integration Mappings

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
data
Array of integration_mapping

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abc123",
      • "type": "integration_mappings",
      • "attributes": {
        }
      },
    • {
      • "id": "def567",
      • "type": "integration_mappings",
      • "attributes": {
        }
      }
    ]
}

integration_mappings

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
client_var
required
string
jebbit_var
required
string
integration_id
required
string
default
string or null

Request samples

Content type
application/vnd.api+json
{ }

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration_mappings",
    • "attributes": {
      • "jebbit_var": "Outcome",
      • "client_var": "Bucket",
      • "default": "Default"
      }
    }
}

Shows an Integration Mapping

Authorizations:
HTTP: JWT
path Parameters
integration_mapping_id
required
string

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
client_var
required
string
jebbit_var
required
string
integration_id
required
string
default
string or null

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration_mappings",
    • "attributes": {
      • "jebbit_var": "Outcome",
      • "client_var": "Bucket",
      • "default": "Default"
      }
    }
}

update integration mapping

Authorizations:
HTTP: JWT
path Parameters
integration_mapping_id
required
string
Request Body schema: application/vnd.api+json
object

Responses

Request samples

Content type
application/vnd.api+json
{ }

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Delete an Integration Mapping

Authorizations:
HTTP: JWT
path Parameters
integration_mapping_id
required
string

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Integrations

integrations

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
data
Array of integration

Response samples

Content type
application/vnd.api+json
{}

integrations

Authorizations:
HTTP: JWT
Request Body schema: application/vnd.api+json
object
type
string
Default: "integrations"
object
endpoint
string
region
string
Default: "us"
object
campaign_name_filter
string
include_url_params
boolean
include_sub_channel
boolean
include_outcome_names
boolean
require_outcomes
boolean
hash_pii
boolean

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
endpoint
required
string or null
include_uids
boolean
region
string or null
require_opt_in
boolean or null
created_at
date
updated_at
date
service_name
required
string
shared_secret
required
string
include_mapped_attributes
boolean or null

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "type": "integrations",
    • "attributes": {
      • "endpoint": "string",
      • "region": "us",
      • "additional_options": {
        }
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration",
    • "attributes": {
      • "name": "Jebbit"
      }
    }
}

Retrieves an Integration

Authorizations:
HTTP: JWT
path Parameters
integration_id
required
string

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
endpoint
required
string or null
include_uids
boolean
region
string or null
require_opt_in
boolean or null
created_at
date
updated_at
date
service_name
required
string
shared_secret
required
string
include_mapped_attributes
boolean or null

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration",
    • "attributes": {
      • "name": "Jebbit"
      }
    }
}

Updates an Integration

Authorizations:
HTTP: JWT
path Parameters
integration_id
required
string
Request Body schema: application/vnd.api+json
object

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
endpoint
required
string or null
include_uids
boolean
region
string or null
require_opt_in
boolean or null
created_at
date
updated_at
date
service_name
required
string
shared_secret
required
string
include_mapped_attributes
boolean or null

Request samples

Content type
application/vnd.api+json
{ }

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "integration",
    • "attributes": {
      • "name": "Jebbit"
      }
    }
}

Delete an Integration

Authorizations:
HTTP: JWT
path Parameters
integration_id
required
string

Responses

Response samples

Content type
application/vnd.api+json
{
  • "errors": [
    • {
      • "status": 401,
      • "title": "Unauthorized Request"
      }
    ]
}

Send A test Integration Submission

Authorizations:
HTTP: JWT
path Parameters
integration_id
required
string

Responses

Lists Launch Links for a Campaign

Authorizations:
HTTP: JWT
path Parameters
campaign_id
required
string

Responses

Response Schema: application/vnd.api+json
Array of objects
Array
id
string
type
required
string
object
created_at
required
date
custom_param_value
string or null
enabled
required
boolean
label
required
string
link_group
required
string
link_parameter
string
include_uid_param
boolean
complete_live_link
required
string

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": "abC1234",
      • "type": "launch_links",
      • "attributes": {
        }
      },
    • {
      • "id": "def6789",
      • "type": "launch_links",
      • "attributes": {
        }
      }
    ]
}

Businesses

self

Authorizations:
HTTP: JWT

Responses

Response Schema: application/vnd.api+json
object
id
string
type
required
string
object
name
required
string

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": "abc123",
    • "type": "businesses",
    • "attributes": {
      • "name": "Jebbit Business"
      }
    }
}