Update a pipeline
Partially updates a pipeline, e.g. to rename it, change its visibility or its config.
Endpoint
Body
Any of name, description, visibility, config, type. For deal pipelines config replaces the stored object, so send the full object. For conversation pipelines config is merged with the stored object, and the body may also carry channel_scope_migration (see below).
Request
Request (conversation pipeline — channel scope)
Limit a conversation pipeline to one WhatsApp number and Instagram (channel scope). Send [] to accept every channel again.
If the pipeline still holds conversations of channels you are removing, the request fails with 400 and data.code = "PIPELINE_SCOPE_CONFLICT", plus data.total and data.by_channel ([{ "channel_key": "whatsapp:15", "count": 42 }]). Repeat it with channel_scope_migration to say where they go:
channel_scope_migration | Effect |
|---|---|
{ "action": "unassign" } | The conversations leave every pipeline (they show in the Incoming column of the pipelines that accept their channel). |
{ "action": "move", "pipeline_id": 11, "pipeline_stage_id": 70 } | They move to another conversation pipeline that accepts all those channels. pipeline_stage_id is optional (null = Incoming). |
After a migration the response also has channel_scope_migrated_count, the number of conversations moved.
Response
Returns the updated pipeline object.
json
Errors
| Status | When |
|---|---|
400 Bad Request | Invalid channel key, a WhatsApp number of another organization, PIPELINE_SCOPE_CONFLICT (see above), or a migration destination that does not accept the moved channels (PIPELINE_CHANNEL_NOT_ALLOWED). |
403 Forbidden | The API key's user has the member role in the organization. |
Report an issue with this documentation
Please log in to report issues with our documentation.