Skip to Content
DocumentationPipeline

Pipeline

Pipeline is the data model we use to enrich data. It is extremely powerful.

A pipeline is made up of:

⛓️‍💥 Pipes and their order
🔢 Fields added by your input
🧮 Logic and conditions

Validation

Before pipelines are used, they are checked for validity.

In a valid pipeline:

  • All pipes have their input requirements met
  • All logical conditions between pipes can be resolved

Only valid pipelines can be run. If you send an invalid pipeline to our servers, we will respond with a 400 Bad Request status code instantly.

Pipeline request

You can run a pipeline by sending a pipeline request. You can choose between synchonous processing (wait for the enrichment to complete) and asynchonous processing (polling).

const result = await fetch("https://api.pipe0.com/v1/run", { method: "POST", headers: { "Authorization": `Bearer ${API_KEY}`, }, body: JSON.stringify({ pipes: [ { pipeId: "PeopleBusinessEmailWaterfallV1" }, ], input: [ { id: 1, name: "John Doe", companyName: "Google LLC" } ] }) });

When your pipeline is run, input objects get converted to output records. You can see the shape of output records in the pipeline response section.

Order of pipes

You may spend time reading pipe documentation to make sure pipes are added in the correct order. This is not necessary. We analyze pipelines and find the best order of execution.

As a user, the only thing you need to ensure is that the pipeline can be processed. For this, all pipes must have their input requirements met.

If your application runs in the browser or is based on Javascript you can use the browser SDK to validate your pipeline before sending a request to our servers.

Pipeline Response

All enrichment endpoints return the same response format: A pipeline response:

  • POST https://api.pipe0.com/v1/run (used to run the pipeline)
  • GET https://api.pipe0.com/v1/check (used to check the processing state)
  • POST https://api.pipe0.com/v1/run/sync (used to run the pipeline synchonously)
{ "success": true, "error": null, "data": { "id": "...", "type": "enrichment", "status": "pending", "order": [ "15991b91-4b3c-4907-a7cc-b838e223004d", "b0015d04-f25a-46ed-8131-4af0f9365880" ], "errors": [], "fields": { "id": { "name": "id", "type": "string", "addedBy": "input", "required": true }, "name": { "name": "name", "type": "string", "addedBy": "input", "required": true }, "email": { "name": "email", "type": "string", "addedBy": "input", "required": true }, "businessEmail": { "name": "businessEmail", "type": "string", "addedBy": "PeopleBusinessEmailWaterfallV1", "required": true }, "linkedInProfileUrl": { "name": "linkedInProfileUrl", "type": "string", "addedBy": "input", "required": true } }, "records": { "15991b91-4b3c-4907-a7cc-b838e223004d": { "id": "15991b91-4b3c-4907-a7cc-b838e223004d", "errors": [], "fields": { "id": { "meta": null, "type": "string", "value": "15991b91-4b3c-4907-a7cc-b838e223004d", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "name": { "meta": null, "type": "string", "value": "Jane Smith", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "email": { "meta": null, "type": "string", "value": "jane@me.com", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "businessEmail": { "meta": null, "type": "string", "value": "my@email.com", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "linkedInProfileUrl": { "meta": null, "type": "string", "value": "https://linkedin.com/in/janesmith", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" } } }, "b0015d04-f25a-46ed-8131-4af0f9365880": { "id": "b0015d04-f25a-46ed-8131-4af0f9365880", "errors": [], "fields": { "id": { "meta": null, "type": "string", "value": "b0015d04-f25a-46ed-8131-4af0f9365880", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "name": { "meta": null, "type": "string", "value": "Bob Example", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "email": { "meta": null, "type": "string", "value": "bob@example.com", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" }, "businessEmail": { "meta": null, "type": "string", "value": null, "errors": [], "status": "queued", "addedBy": "PeopleBusinessEmailWaterfallV1", "resolvedBy": null }, "linkedInProfileUrl": { "meta": null, "type": "string", "value": "https://linkedin.com/in/bobexample", "errors": [], "status": "completed", "addedBy": "input", "resolvedBy": "input" } } } }, "environment": "production", "pipes": [ { "pipeId": "PeopleBusinessEmailWaterfallV1", "config": { "providers": [ { "name": "clearbit" } ], "inputFieldNames": { "name": "", "email": "", "random": "" }, "outputFieldNames": { "businessEmail": "" } } } ], "organizationId": "di21noyh28g36ie146m5icew", "createdAt": "2025-03-06T23:51:38.256Z", "updatedAt": "2025-03-06T23:51:38.256Z" } }

Failure modes

If your pipeline is valid the endpoint will always return a HTTP 200 OK status.

The result of the processing can be read from the global task status as well as the field status of each record field. Remember, just because your pipeline has passed validation it does not mean that processing will succeed.

Last updated on