Skip to main content

CreatePipelineDefinition creates a new pipeline in `draft` status. The schema is validated for stage/action key shape and uniqueness, graph reachability, and per-action-type config requirements.

POST 

/api/v1/crm/pipelines

Errors:

  • UNAUTHENTICATED: missing auth context.
  • INVALID_ARGUMENT: name is empty or > 255 chars; subject_type is not "contact" or "deal"; a stage or action key does not match the key pattern (ErrPipelineStageKeyInvalid, ErrPipelineActionKeyInvalid); a stage or action key is duplicated (ErrPipelineStageKeyDuplicate, ErrPipelineActionKeyDuplicate); entry_stage_key does not reference an existing stage (ErrPipelineEntryStageUnknown); the stage graph has a cycle (ErrPipelineStageCycle) or an unreachable stage (ErrPipelineUnreachableStage); a non-terminal stage has no branches (ErrPipelineBranchMissing) or branches do not end in default (ErrPipelineBranchNotExhaustive); a branch references an unknown stage (ErrPipelineBranchTargetUnknown); an action type is unsupported (ErrPipelineActionTypeUnsupported); a branch expression fails to parse (ErrPipelineExpressionInvalid); a form action references a non-published form (ErrPipelineFormNotPublished); auto-enroll set on a deal-subject pipeline (ErrPipelineAutoEnrollSubjectMismatch).

Request

Responses

A successful response.