API V2 - Create Job with a Trigger - Job Completion

The problem I’m having

Would like to create job(s) that will run when previous job succeeds.

The context of why I’m trying to do this

Have jobs that we need to dynamically generate via api that are dependent on other jobs that are dynamically created. These are “one time runs” to build snapshot data, and I’m aware I can call them via this process, but was curious if the api support creating jobs like you are able to do in the ui:

Create job api reference:

Thanks in advance,
Gavin

Hmmm… You could try
job_completion_trigger_condition which is found in the response on that API docs page. Maybe just an error on the Docs page?

job_completion_trigger_condition
Use this to set up job completion triggers which would trigger a run of a job when another run finishes. If you have a child job that you want triggered on the completion of a parent job, then configure the trigger on the child job to be on job completion and select the project, parent job and the statuses of the parent job on which to trigger the child job. The statuses which is an array can be one or more of:
• success (10)
• error (20)
• canceled (30)
Once the parent job completes, a new run will be enqueued for the child job.
Example of a job completion trigger:

"condition": {
"job_id": 1,
"project_id": 1,
"statuses": [10, 20],
}
}```


<sub>Note: `@Mikko Sulonen` originally [posted this reply in Slack](https://getdbt.slack.com/archives/CBSQTAPLG/p1747230911235799?thread_ts=1747162476.825319&cid=CBSQTAPLG). It might not have transferred perfectly.</sub>