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:
nameis empty or > 255 chars;subject_typeis 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_keydoes 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 indefault(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
- 200
- default
A successful response.
An unexpected error response.