Download OpenAPI specification:Download
Use our Jebbit API to automate tasks relating to your Jebbit Businesses, Campaigns, Product Feed, Launch Links, and Integrations.
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.
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.
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.
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.
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.
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}
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.
client_id required | any |
client_secret required | any |
object | |||||||||||||
|
{- "client_id": null,
- "client_secret": null
}
{- "data": {
- "access_token": "some.jwt.here",
- "token_type": "Bearer",
- "scope": "read:business:mybiz"
}
}
data | Array of campaign |
{- "data": [
- {
- "id": "abc123",
- "type": "campaigns",
- "attributes": {
- "title": "My Cool Campaign",
- "launch_date": "2021-01-01T18:35:53.371Z",
- "active_iteration": "ajH"
}
}, - {
- "id": "def567",
- "type": "campaigns",
- "attributes": {
- "title": "My Cool Campaign",
- "launch_date": "2021-01-01T18:35:53.371Z",
- "active_iteration": "K6n"
}
}
]
}
campaign_id required | string |
object | |||||||||||||||
|
{- "data": {
- "id": "def567",
- "type": "campaigns",
- "attributes": {
- "title": "My Cool Campaign",
- "launch_date": "2021-01-01T18:35:53.371Z",
- "active_iteration": "K6n"
}
}
}
filter[feed_id] required | Array of strings |
data | Array of feed_column |
{- "data": [
- {
- "id": "abc123",
- "type": "feed_columns",
- "attributes": {
- "name": "Column 1"
}
}, - {
- "id": "def567",
- "type": "feed_columns",
- "attributes": {
- "name": "Column 2"
}
}
]
}
object | |||||||||
|
object | |||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "name": "string"
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed_column",
- "attributes": {
- "name": "Column Name"
}
}
}
feed_column_id required | string |
object | |||||||||
|
{- "data": {
- "id": "abc123",
- "type": "feed_column",
- "attributes": {
- "name": "Column Name"
}
}
}
feed_column_id required | string |
object | |||||||||
|
object | |||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "name": "string"
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed_columns",
- "attributes": {
- "name": "Column Name"
}
}
}
filter[feed_id] required | Array of strings |
data | Array of feed_row |
{- "data": [
- {
- "id": "abc123",
- "type": "feed_rows",
- "attributes": {
- "data": "{\"hello\":\"world\"}"
}
}, - {
- "id": "def567",
- "type": "feed_rows",
- "attributes": {
- "data": "{\"hello\":\"world\"}"
}
}
]
}
object | |||||||||||||
|
object | |||||||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "feed_id": "string",
- "product_identifier": "string",
- "data": null
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed_row",
- "attributes": {
- "data": "{\"hello\":\"world\"}"
}
}
}
feed_row_id required | string |
object | |||||||||||||
|
{- "data": {
- "id": "abc123",
- "type": "feed_row",
- "attributes": {
- "data": "{\"hello\":\"world\"}"
}
}
}
feed_row_id required | string |
object | |||||||||||||
|
object | |||||||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "feed_id": "string",
- "product_identifier": "string",
- "data": null
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed_rows",
- "attributes": {
- "data": "{\"data\":\"data\"}"
}
}
}
data | Array of feed |
{- "data": [
- {
- "id": "abc123",
- "type": "feeds",
- "attributes": {
- "name": "My Feed",
- "status": "uploaded",
- "source": "API"
}
}, - {
- "id": "def567",
- "type": "feeds",
- "attributes": {
- "title": "My Other Feed",
- "status": "uploaded",
- "source": "Platform"
}
}
]
}
object | |||||||||
|
object | |||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "name": "string"
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed",
- "attributes": {
- "name": "My Test Feed",
- "version": "1234235234",
- "status": "uploaded",
- "source": "API"
}
}
}
feed_id required | string |
object | |||||||||
|
{- "data": {
- "id": "abc123",
- "type": "feed",
- "attributes": {
- "name": "My Test Feed"
}
}
}
feed_id required | string |
object | |||||||||
|
object | |||||||||
|
{- "data": {
- "type": "string",
- "attributes": {
- "name": "string"
}
}
}
{- "data": {
- "id": "abc123",
- "type": "feed",
- "attributes": {
- "name": "My Test Feed"
}
}
}
feed_id required | string |
data | Array of feed_column |
{- "data": {
- "id": "abc123",
- "type": "feed_columns",
- "attributes": {
- "name": "Column Name"
}
}
}
feed_id required | string |
data | Array of feed_row |
{- "data": {
- "id": "abc123",
- "type": "feed_rows",
- "attributes": {
- "data": "{\"hello\":\"world\"}"
}
}
}
data | Array of integration_historic_backfill |
{- "data": [
- {
- "id": "abc123",
- "type": "integration_historic_backfills",
- "attributes": {
- "endpoint": "processing",
- "integration_id": "asdf1234"
}
}, - {
- "id": "def567",
- "type": "integration_historic_backfills",
- "attributes": {
- "status": "received",
- "integration_id": "zmejas58"
}
}
]
}
object | |||||||||
|
object | |||||||||||||||||
|
{- "data": {
- "type": "integration_historic_backfills",
- "attributes": {
- "integration_id": "string"
}
}
}
{- "data": {
- "id": "abc123",
- "type": "integration_historic_backfills",
- "attributes": {
- "status": "processing"
}
}
}
backfill_id required | string |
object | |||||||||||||||||
|
{- "data": {
- "id": "abc123",
- "type": "integration_historic_backfills",
- "attributes": {
- "status": "processing"
}
}
}
backfill_id required | string |
{ }
{- "errors": [
- {
- "status": 401,
- "title": "Unauthorized Request"
}
]
}
data | Array of integration_mapping |
{- "data": [
- {
- "id": "abc123",
- "type": "integration_mappings",
- "attributes": {
- "jebbit_var": "Outcome",
- "client_var": "Bucket",
- "integration_id": "asdf1234"
}
}, - {
- "id": "def567",
- "type": "integration_mappings",
- "attributes": {
- "jebbit_var": "Outcome",
- "client_var": "Bucket",
- "integration_id": "zmejas58"
}
}
]
}
object | |||||||||||||||||
|
{ }
{- "data": {
- "id": "abc123",
- "type": "integration_mappings",
- "attributes": {
- "jebbit_var": "Outcome",
- "client_var": "Bucket",
- "default": "Default"
}
}
}
integration_mapping_id required | string |
object | |||||||||||||||||
|
{- "data": {
- "id": "abc123",
- "type": "integration_mappings",
- "attributes": {
- "jebbit_var": "Outcome",
- "client_var": "Bucket",
- "default": "Default"
}
}
}
integration_mapping_id required | string |
{ }
{- "errors": [
- {
- "status": 401,
- "title": "Unauthorized Request"
}
]
}
object | |||||||||||||||||||||||||||
|
object | |||||||||||||||||||||||||||
|
{- "data": {
- "type": "integrations",
- "attributes": {
- "endpoint": "string",
- "region": "us",
- "additional_options": {
- "campaign_name_filter": "string",
- "include_url_params": true,
- "include_sub_channel": true,
- "include_outcome_names": true,
- "require_outcomes": true,
- "hash_pii": true
}
}
}
}
{- "data": {
- "id": "abc123",
- "type": "integration",
- "attributes": {
- "name": "Jebbit"
}
}
}
integration_id required | string |
object | |||||||||||||||||||||||||||
|
{- "data": {
- "id": "abc123",
- "type": "integration",
- "attributes": {
- "name": "Jebbit"
}
}
}
integration_id required | string |
object | |||||||||||||||||||||||||||
|
{ }
{- "data": {
- "id": "abc123",
- "type": "integration",
- "attributes": {
- "name": "Jebbit"
}
}
}
campaign_id required | string |
Array of objects | |||||||||||||||||||||||||
Array
|
{- "data": [
- {
- "id": "abC1234",
- "type": "launch_links",
- "attributes": {
- "created_at": "2021-01-17T19:37:47.151Z",
- "custom_param_value": "JC=Product+Quiz+LP",
- "enabled": "true",
- "label": "Product Quiz LP",
- "link_group": "Owned Web",
- "link_parameter": "L=Owned+Web",
- "include_uid_param": "false",
}
}, - {
- "id": "def6789",
- "type": "launch_links",
- "attributes": {
- "created_at": "2020-12-29T18:58:35.791Z",
- "custom_param_value": "null",
- "enabled": "true",
- "label": "Linkedin",
- "link_group": "Linkedin",
- "link_parameter": "L=Linkedin",
- "include_uid_param": "false",
}
}
]
}