Skip to content

Put leads in a pipeline

Through the API, your own system can create pipelines in ownr Pipeline, add companies as leads and move them between stages.

Requires: the pipeline scope. Calls to Pipeline do not count against the API quota.

1. Check the lead capacity

Lead capacity is organisation-wide: every pipeline draws on the same pool. Leads that come from a purchased segment do not count.

Terminal window
curl "https://ownr.dk/api/v2/pipelines/capacity" \
-H "Authorization: Bearer ACCESS_TOKEN"

available in the answer is the number of leads there is room for.

2. Create a pipeline

Terminal window
curl -X POST "https://ownr.dk/api/v2/pipelines" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Egne kunder Q4","entity_type":"company"}'
  • entity_type is company, person or property and cannot be changed afterwards.
  • Without stages, the pipeline gets the standard set of 8 stages. With stages, you give the names of your own stages, which are inserted between the three fixed ones: Nye leads, Vundet and Tabt.
  • Creating a pipeline uses no capacity. Only leads do.

The answer holds the pipeline’s id and the id of each stage.

3. Add leads

Leads are added as CVR numbers, up to 10,000 per call:

Terminal window
curl -X POST "https://ownr.dk/api/v2/pipelines/189/leads" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cvr":[36732261,24256790,31183146]}'
  • The call is all or nothing: if the whole batch does not fit, none are added and the answer is 402 with the exact shortfall.
  • Send "partial": true to add as many as fit.
  • Leads already in the pipeline are skipped and counted in skipped_duplicates. Invalid CVR numbers are listed in invalid_cvr.
  • stage picks the stage. Without it, leads land in the first stage.

4. Move a lead

Terminal window
curl -X PATCH "https://ownr.dk/api/v2/pipelines/189/leads/90311" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"stage":1231}'

The move works like dragging the card in ownr: it is logged, and team members following the stage are notified. If a lead is moved to Vundet and automatic adding to Ajour is turned on, it is also put in Ajour.

5. Clean up

  • DELETE /pipelines/{pipelineId}/leads/{leadId} removes a lead and releases its capacity at once.
  • DELETE /pipelines/{pipelineId} deletes a pipeline and releases the capacity of its leads. Archiving a pipeline does not release capacity.

Every Pipeline endpoint is in the reference.