Create a flow
POST/v1/flows
Creates a flow in draft. Add steps and candidates, then activate it. A flow is owned by the user who creates it, and an account API key cannot own one, so a key must pass on_behalf_of to name the owner.
Request
Responses
- 201
- 401
- 403
- 409
- 422
Flow created
Missing or invalid bearer token.
The public API is not enabled for this account (err_feature_not_enabled), the acting user is not allowed to create flows, or the API key lacks the flows:write scope (err_insufficient_scope).
Validation failed. Error codes:
err_flow_name_taken- another flow in the account already has this name
Validation failed. Error codes:
err_duplicate_member- a user is listed more than once incollaboratorserr_interested_stage_required-job_idwas given withoutinterested_job_stage_iderr_interested_stage_requires_job-interested_job_stage_idwas given withoutjob_iderr_interested_stage_incompatible_job-interested_job_stage_iddoes not belong tojob_iderr_interested_stage_not_found-interested_job_stage_idmatches no active stageerr_rejection_reason_not_found-not_interested_rejection_reason_idmatches no active rejection reasonerr_job_not_found-job_idmatches no joberr_job_not_published-job_idnames a job that is not publishederr_schedule_invalid_day- aschedulekey is not a weekday0to6err_schedule_invalid_hours- ascheduleday is not{"start": "HH:MM", "end": "HH:MM"}err_schedule_start_after_end- ascheduleday starts at or after it endserr_time_zone_invalid-time_zoneis not a recognised IANA time zoneerr_collaborator_invalid- acollaboratorsID is not an active user who can collaborate on flowserr_on_behalf_of_not_allowed- a personal access token passed another user's IDerr_user_not_found-on_behalf_ofis not an active user in the accounterr_on_behalf_of_forbidden- that user is not allowed to perform this actionerr_on_behalf_of_required- an account API key did not name a user to act as