Skip to main content

Receive completed Transformation webhook

Webhook 

Pipelines can also be configured to send webhooks to your desired URL. Webhooks will be called upon the successful completion of each transformed data point, instead of batched.

Request

Body

A completed transformation

    transformationIDstringrequired

    Unique ID generated by bem following Segment's KSUID conventions.

    Example: tr_2bxoJPNdSD4LgRT4YVC4gt72hlI
    pipelineIDstringrequired

    ID of pipeline that transformed the original input data.

    Example: pl_2bxoUSASD7LPqz4YVC9jt38ZtZ
    referenceIDstringrequired

    The unique ID you use internally to refer to this data point.

    Example: 2bkFKzUi2ZNLae0E06vgo37zH2v
    createdAtdate-timerequired

    Timestamp indicating when the transformation was created.

    Example: {}
    publishedAtdate-time

    Timestamp indicating when the transform was published via webhook and received a successful 200 response. Value is null if the transformation hasn't been sent.

    Example: 2023-08-13T16:10:00+08:00"
    lastPublishErrorAtstringnullable

    Last timestamp indicating when the transform was published via webhook and received a non-200 response. Set to null if on a subsequent retry if the webhook service receives a 200 response.

    Example: {}
    inputTypeInputType (string)required

    The input type of the content you're sending for transformation.

    Possible values: [email, pdf, xlsx, xls, docx, csv, text, json, png, jpeg, heic, heif, webp, html, wav, mp3, m4a]

    itemOffsetintegerrequired

    For CSV transformations, this offset represents starting row of the CSV for which you want to fetch transformations for. For PDF transformations, this offset represents the starting page of the PDF that the transformation pertains to. For pipelines that have independentDocumentProcessingEnabled set to true. Note that this is zero-indexed.

    Example: 0
    transformedContent objectrequired

    The transformed content as an object, in the schema defined by the pipeline.

    anyOf
    output object[]
  • Array [
  • anyOf
    object
  • ]
  • invalidPropertiesstring[]

    Highlights any fields missing from transforming the original input data that are marked as required in the respective output schema for the pipeline.

Responses

we'll attempt to hit your webhook URL 4 times with exponential backoff if we don't receive a 200 response. If after 4 attempts we can't reach your endpoint, the webhook will be disabled and we'll notify you directly. All the transformed data will be safe in our servers and you can fetch it manually thereafter.

Authorization: x-api-key

name: x-api-keytype: apiKeyin: header
Request Collapse all
Auth
Body
{
  "transformationID": "tr_2bxoJPNdSD4LgRT4YVC4gt72hlI",
  "pipelineID": "pl_2bxoUSASD7LPqz4YVC9jt38ZtZ",
  "referenceID": "2bkFKzUi2ZNLae0E06vgo37zH2v",
  "createdAt": {},
  "publishedAt": "2023-08-13T16:10:00+08:00\"",
  "lastPublishErrorAt": {},
  "inputType": "email",
  "itemOffset": 0,
  "transformedContent": {
    "output": [
      {},
      [
        {}
      ],
      "string",
      0,
      0,
      true
    ]
  },
  "invalidProperties": [
    "string"
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!