---
updatedAt: 2026-02-07T16:27:06.000Z
agentTools:
  projectIndex: https://triplewhale.readme.io/llms.txt
---

# Enrich Pixel With Offline Events

Send offline or server-side Pixel events—such as leads, MQLs, SQLs, opportunities, book-a-demo events, or fully custom events—into Triple Whale.  Rate limit is 1,000 events/min. Max payload is 3 KB. When `type = custom`, you can add additional properties of type **Number, Float, String, Boolean, or Date**.


> 📘 **Source Values and Attribution Grouping**
>
> To have offline events grouped into existing paid channels in the [Attribution dashboard](https://app.triplewhale.com/dashboards/attribution/all/), use a [standardized source ID](https://triplewhale.readme.io/docs/post-purchase-survey-pps-standardized-source-ids) (e.g. `facebook-ads`).
>
> Custom values (e.g. `meta`, `facebook`, `source-1`, `source-2`) will appear as separate custom sources instead of being grouped into an existing channel.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Triple Whale API",
    "version": "1.0",
    "description": "Triple Whale API documentation, providing endpoints for managing user authentication, API key validation, and uploading data such as ads and metrics.\n"
  },
  "servers": [
    {
      "url": "https://api.triplewhale.com/api/v2/"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "paths": {
    "/data-in/event": {
      "post": {
        "summary": "Enrich Pixel With Offline Events",
        "description": "Send offline or server-side Pixel events—such as leads, MQLs, SQLs, opportunities, book-a-demo events, or fully custom events—into Triple Whale.  Rate limit is 1,000 events/min. Max payload is 3 KB. When `type = custom`, you can add additional properties of type **Number, Float, String, Boolean, or Date**.\n",
        "operationId": "enrich-pixel-with-offline-events",
        "tags": [
          "Data In"
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "shop",
                  "type",
                  "profileIdentifiers"
                ],
                "properties": {
                  "shop": {
                    "type": "string",
                    "description": "The unique identifier for the shop (e.g., `example.myshopify.com`). This is the `shop-id` value in your Triple Whale app URL (for example `?shop-id=example.myshopify.com`). The API key owner must  also have access to the shop, otherwise the request will return 403.\n",
                    "example": "example.myshopify.com"
                  },
                  "type": {
                    "type": "string",
                    "description": "The event category. Can be a standard lifecycle event (`lead`, `mql`, `sql`, `opportunity`, `book_demo`) or a Custom event (`custom`).\n",
                    "enum": [
                      "lead",
                      "mql",
                      "sql",
                      "opportunity",
                      "book_demo",
                      "custom"
                    ],
                    "example": "custom"
                  },
                  "profileIdentifiers": {
                    "type": "object",
                    "description": "At least one identifier is required.   Use these to match the event to an existing or future profile.\n",
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email",
                        "example": "john.smith@gmail.com"
                      },
                      "phone": {
                        "type": "string",
                        "example": "+1-555-123-4567"
                      },
                      "externalId": {
                        "type": "string",
                        "example": "user_123"
                      }
                    }
                  },
                  "eventId": {
                    "type": "string",
                    "description": "Optional unique identifier for the event to prevent duplicates.\n",
                    "example": "event_456"
                  },
                  "timestamp": {
                    "type": "number",
                    "format": "int64",
                    "description": "Optional UNIX timestamp in **seconds** for when the event occurred.   Defaults to the current server time if omitted.\n",
                    "example": 1732579200
                  },
                  "event_name": {
                    "type": "string",
                    "description": "Required only when **type** = `custom`.   A descriptive name for the custom event.\n",
                    "example": "productCustomizationInteraction"
                  },
                  "source": {
                    "type": "string",
                    "description": "Optional attribution source for custom events. To have events grouped into existing paid channels in [Attribution](https://app.triplewhale.com/dashboards/attribution/all/), use a [standardized source ID](https://triplewhale.readme.io/docs/post-purchase-survey-pps-standardized-source-ids) (e.g. `facebook-ads`). Custom values will appear as separate custom sources.\n",
                    "example": "facebook-ads"
                  },
                  "campaign": {
                    "type": "string",
                    "description": "Optional attribution campaign for custom events.\n",
                    "example": "Winter_Sale_2025"
                  },
                  "ad": {
                    "type": "string",
                    "description": "Optional attribution ad name for custom events.\n",
                    "example": "Winter_Sale_2025_Ad_1"
                  },
                  "adset": {
                    "type": "string",
                    "description": "Optional attribution ad set name for custom events.\n",
                    "example": "Winter_Sale_2025_Adset_A"
                  }
                },
                "additionalProperties": {
                  "type": "object",
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "string"
                    },
                    {
                      "type": "boolean"
                    }
                  ],
                  "description": "Extra properties allowed **only** when `type = custom`.   Each value must be a **Number (Integer or Float), String (Plain String or Date), or Boolean**.\n"
                }
              },
              "examples": {
                "LeadEvent": {
                  "value": {
                    "shop": "example.myshopify.com",
                    "type": "lead",
                    "profileIdentifiers": {
                      "email": "john.smith@gmail.com"
                    }
                  }
                },
                "CustomEvent": {
                  "value": {
                    "shop": "example.myshopify.com",
                    "type": "custom",
                    "timestamp": 1732579200,
                    "profileIdentifiers": {
                      "email": "abcdef@gmail.com"
                    },
                    "event_name": "my_test_event",
                    "value": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Pixel event successfully received.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "example": "Pixel event received"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "message": {
                      "type": "string",
                      "example": "Invalid pixel event data."
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "message": {
                      "type": "string",
                      "example": "Payload too large"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds until another request can be made.\n",
                "schema": {
                  "type": "string"
                },
                "example": "60"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "message": {
                      "type": "string",
                      "example": "Rate limit exceeded. Try again later."
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "message": {
                      "type": "string",
                      "example": "Error processing pixel event"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```