---
title: "Workflow Jobs API"
url: "https://earlyaccess.developers.bynder.com/apis/workflow-jobs-api-1/versions/fe891cd9-8e8e-454e-83d7-5e79bbd56714"
---

# Workflow Jobs API

OpenAPI specification document.

```json
{"components":{"securitySchemes":{"OAuth2":{"flows":{"authorizationCode":{"authorizationUrl":"https://{your-auth-url}","scopes":{"CAMPAIGNOVERVIEW":"","JOBADD":"","JOBAPPROVE":"","JOBEDIT":"","JOBOVERVIEW":"","JOBREMOVE":"","PRESETOVERVIEW":""},"tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token"},"clientCredentials":{"scopes":{"CAMPAIGNOVERVIEW":"","JOBADD":"","JOBAPPROVE":"","JOBEDIT":"","JOBOVERVIEW":"","JOBREMOVE":"","PRESETOVERVIEW":""},"tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token"}},"type":"oauth2"},"permanentToken":{"in":"header","name":"Authorization","type":"apiKey"}}},"info":{"title":"Workflow Jobs API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/workflow-jobs/{id}/upload":{"post":{"description":"To upload a file to a workflow job it needs to be uploaded via the Upload file endpoint for modern stack. After completing the various steps described in the Upload file endpoint, the `fileId` retrieved from those steps is needed in this request to reference the file to the job. This file will be attached to the job only.\n**Warning:** Requires the **JOBEDIT** security role.\n**Warning:** Is only available for Files-Service portals.\n","parameters":[{"description":"The id of a Job.","in":"path","name":"id","required":true,"schema":{"example":"00000000-0000-0000-0000-000000000000","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"assetId":{"description":"Id of the parent asset if this file is a new version of an asset","example":"00000000-0000-0000-0000-000000000002","type":"string"},"fileId":{"description":"Id of the file to be saved to the job (to be retrieved from Upload file endpoint)","example":"00000000-0000-0000-0000-000000000001","type":"string"},"fileSize":{"description":"Size of the file in bytes","example":50000,"type":"number"},"name":{"description":"Value to be used as filename","example":"example-name.jpg","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"mediaId":{"description":"Media ID of the uploaded file","example":"00000000000000000000000000000000","type":"string"}},"type":"object"}}},"description":"Successful response"}},"summary":"Upload a file to a workflow job","tags":["File upload"]}},"/api/workflow/campaigns/{id}/jobs":{"get":{"description":"Requires the CAMPAIGNOVERVIEW security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateCreatedFrom","schema":{"description":"Retrieve jobs created after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateCreatedTo","schema":{"description":"Set a date range together with the \"dateCreated\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateModifiedFrom","schema":{"description":"Retrieve jobs modified after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateModifiedTo","schema":{"description":"Set a date range together with the \"dateModified\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"deadlineFrom","schema":{"description":"Retrieve jobs with a deadline after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"deadlineTo","schema":{"description":"Retrieve jobs with a deadline before this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"00000000000000000000000000000000,00000000000000000000000000000000","in":"query","name":"resonsibleIDs","schema":{"type":"string"}},{"example":"00000000000000000000000000000000,00000000000000000000000000000000","in":"query","name":"accountableIDs","schema":{"type":"string"}},{"example":"Approved,NeedsChanges","in":"query","name":"status","schema":{"type":"string"}},{"example":"dateModified desc","in":"query","name":"orderBy","schema":{"type":"string"}},{"example":100,"in":"query","name":"limit","schema":{"type":"integer"}},{"example":1,"in":"query","name":"page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":[{"accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"campaignID":"00000000-0000-0000-0000-000000000000","createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateFinished":"2021-02-25T16:19:42+00:00","dateModified":"2017-03-30T11:43:19+00:00","deadline":null,"description":"","id":"00000000-0000-0000-0000-000000000000","jobFinishedHistory":[{"date":"2021-02-24T16:23:48+00:00","userId":"00000000-0000-0000-0000-000000000000"},{"date":"2021-02-25T16:19:42+00:00","userId":"00000000-0000-0000-0000-000000000000"}],"jobKey":"0000-0","jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"job_active_stage":{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},"job_next_stage":{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"},"job_previous_stage":{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},"job_stages":[{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"}],"name":"Test API","presetID":null},{"accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"bookedMinutes":10,"campaignID":"00000000-0000-0000-0000-000000000000","createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateFinished":null,"dateModified":"2017-03-30T11:43:19+00:00","deadline":null,"description":"","id":"00000000-0000-0000-0000-000000000000","jobFinishedHistory":null,"jobKey":"0000-0","jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"job_active_stage":{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},"job_next_stage":{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"},"job_previous_stage":{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},"job_stages":[{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},{"bookedMinutes":5,"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"}],"name":"Test API with booked time","presetID":null}]}},"schema":{"items":{"properties":{"accountableID":{"type":"string"},"basedOnPreset":{"type":"string"},"bookedMinutes":{"type":"number"},"campaignID":{"type":"string"},"createdByID":{"type":"string"},"dateCreated":{"type":"string"},"dateFinished":{"type":"string"},"dateModified":{"type":"string"},"deadline":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"jobFinishedHistory":{"items":{"properties":{"date":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"type":"array"},"jobKey":{"type":"string"},"jobMetaproperties":{"additionalProperties":{"type":"string"},"type":"object"},"job_active_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_next_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_previous_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_stages":{"items":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"name":{"type":"string"},"presetID":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"Successful response","headers":{"X-Pagination-Limit":{"example":100,"schema":{"type":"integer"}},"X-Pagination-Page":{"example":2,"schema":{"type":"integer"}},"X-Pagination-TotalPages":{"example":100,"schema":{"type":"integer"}},"X-Pagination-TotalRecords":{"example":10000,"schema":{"type":"integer"}}}}},"security":[{"permanentToken":["CAMPAIGNOVERVIEW"]},{"OAuth2":["CAMPAIGNOVERVIEW"]}],"summary":"Retrieve the jobs of a specific campaign","tags":["Campaign jobs"]}},"/api/workflow/jobs":{"get":{"parameters":[{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateCreatedFrom","schema":{"description":"Retrieve jobs created after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateCreatedTo","schema":{"description":"Set a date range together with the \"dateCreated\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateModifiedFrom","schema":{"description":"Retrieve jobs modified after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"dateModifiedTo","schema":{"description":"Set a date range together with the \"dateModified\" parameter. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"deadlineFrom","schema":{"description":"Retrieve jobs with a deadline after this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"2020-01-01T12:00:00Z","in":"query","name":"deadlineTo","schema":{"description":"Retrieve jobs with a deadline before this date. ISO8601 format yyyy-mm-ddThh:mm:ssZ.","format":"date-time","type":"string"}},{"example":"00000000000000000000000000000000,00000000000000000000000000000000","in":"query","name":"resonsibleIDs","schema":{"type":"string"}},{"example":"00000000000000000000000000000000,00000000000000000000000000000000","in":"query","name":"accountableIDs","schema":{"type":"string"}},{"example":"Approved,NeedsChanges","in":"query","name":"status","schema":{"type":"string"}},{"example":"deadline asc","in":"query","name":"orderBy","schema":{"type":"string"}},{"example":100,"in":"query","name":"limit","schema":{"type":"integer"}},{"example":1,"in":"query","name":"page","schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":[{"accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"campaignID":"00000000-0000-0000-0000-000000000000","createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateFinished":null,"dateModified":"2017-03-30T11:43:19+00:00","deadline":null,"description":"","id":"00000000-0000-0000-0000-000000000000","jobFinishedHistory":null,"jobKey":"0000-0","jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"job_active_stage":{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},"job_next_stage":{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"},"job_previous_stage":{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},"job_stages":[{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"}],"name":"Test API","presetID":null},{"accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"bookedMinutes":10,"campaignID":"00000000-0000-0000-0000-000000000000","createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateFinished":"2021-02-25T16:19:42+00:00","dateModified":"2017-03-30T11:43:19+00:00","deadline":null,"description":"","id":"00000000-0000-0000-0000-000000000000","jobFinishedHistory":[{"date":"2021-02-24T16:23:48+00:00","userId":"00000000-0000-0000-0000-000000000000"},{"date":"2021-02-25T16:19:42+00:00","userId":"00000000-0000-0000-0000-000000000000"}],"jobKey":"0000-0","jobMetaproperties":{"00000000-0000-0000-0000-000000000001":"00000000-0000-0000-0000-000000000000,00000000-0000-0000-0000-000000000000","00000000-0000-0000-0000-000000000002":"Country","00000000-0000-0000-0000-000000000003":"City"},"job_active_stage":{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},"job_next_stage":{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"},"job_previous_stage":{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},"job_stages":[{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},{"bookedMinutes":5,"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"}],"name":"Test API with booked time","presetID":null}]}},"schema":{"items":{"properties":{"accountableID":{"type":"string"},"basedOnPreset":{"type":"string"},"bookedMinutes":{"type":"number"},"campaignID":{"type":"string"},"createdByID":{"type":"string"},"dateCreated":{"type":"string"},"dateFinished":{"type":"string"},"dateModified":{"type":"string"},"deadline":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"jobFinishedHistory":{"items":{"properties":{"date":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"type":"array"},"jobKey":{"type":"string"},"jobMetaproperties":{"properties":{"metapropertyId":{"type":"string"}},"type":"object"},"job_active_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_next_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_previous_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_stages":{"items":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"name":{"type":"string"},"presetID":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"Successful response","headers":{"X-Pagination-Limit":{"example":100,"schema":{"type":"integer"}},"X-Pagination-Page":{"example":2,"schema":{"type":"integer"}},"X-Pagination-TotalPages":{"example":100,"schema":{"type":"integer"}},"X-Pagination-TotalRecords":{"example":10000,"schema":{"type":"integer"}}}}},"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"summary":"Retrieve jobs","tags":["Jobs"]},"post":{"description":"Requires the JOBADD security role.","requestBody":{"content":{"application/json":{"schema":{"properties":{"accountableID":{"description":"Id of the user responsible for the job","example":"00000000-0000-0000-0000-000000000000","type":"string"},"campaignID":{"description":"Id of the campaign the job is part of","example":"00000000-0000-0000-0000-000000000000","type":"string"},"deadline":{"description":"Date of when the job ends","example":"2018-09-29","type":"string"},"description":{"description":"Description of the job","example":"Job Description","type":"string"},"jobMetaproperties":{"additionalProperties":{"type":"string"},"description":"ID and metaproperty values","example":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"},"type":"object"},"name":{"description":"Name of the job","example":"Job Example","type":"string"},"presetID":{"description":"Id of the preset the job should be created from","example":"00000000-0000-0000-0000-000000000000","type":"string"},"stages":{"items":{"properties":{"deadline":{"description":"Deadline date of stage","example":"2018-09-29","type":"string"},"description":{"description":"Description of the stage","example":"Awesome description","type":"string"},"name":{"description":"Name of the stage","example":"Review","type":"string"},"preset_stage_id":{"description":"Id of the preset stage","example":"00000000-0000-0000-0000-000000000000","type":"string"},"responsibleGroupID":{"description":"Id of responsible group for the stage","example":"00000000-0000-0000-0000-000000000000","type":"string"},"responsibleID":{"description":"Id of the stage responsible","example":"00000000-0000-0000-0000-000000000000","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"examples":{"example-1":{"value":{"job_id":"00000000-0000-0000-0000-000000000000","status":"Created"}}},"schema":{"properties":{"job_id":{"example":"00000000-0000-0000-0000-000000000000","type":"string"},"status":{"example":"Created","type":"string"}},"type":"object"}}},"description":"Job created successfully"}},"security":[{"permanentToken":["JOBADD"]},{"OAuth2":["JOBADD"]}],"summary":"Create job","tags":["Jobs"]}},"/api/workflow/jobs/{id}":{"delete":{"description":"Requires the JOBREMOVE security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{"examples":{"example-1":{"value":{}}}}},"description":"No Content"}},"security":[{"permanentToken":["JOBREMOVE"]},{"OAuth2":["JOBREMOVE"]}],"summary":"Delete job","tags":["Jobs"]},"get":{"description":"Requires the JOBOVERVIEW security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"accountableID":"00000000-0000-0000-0000-000000000000","basedOnPreset":false,"bookedMinutes":10,"campaignID":"00000000-0000-0000-0000-000000000000","createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2017-03-30T11:42:30+00:00","dateFinished":"2021-02-25T16:19:42+00:00","dateModified":"2017-03-30T11:43:19+00:00","deadline":null,"description":"","id":"00000000-0000-0000-0000-000000000000","jobFinishedHistory":[{"date":"2021-02-24T16:23:48+00:00","userId":"00000000-0000-0000-0000-000000000000"},{"date":"2021-02-25T16:19:42+00:00","userId":"00000000-0000-0000-0000-000000000000"}],"jobKey":"0000-0","jobMetaproperties":{},"job_active_stage":{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},"job_next_stage":{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"},"job_previous_stage":{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},"job_stages":[{"id":"00000000-0000-0000-0000-000000000000","position":1,"status":"Approved"},{"id":"00000000-0000-0000-0000-000000000000","position":2,"status":"Active"},{"id":"00000000-0000-0000-0000-000000000000","position":3,"status":"Idle"}],"name":"Test API","presetID":null}}},"schema":{"properties":{"accountableID":{"type":"string"},"basedOnPreset":{"type":"string"},"bookedMinutes":{"type":"number"},"campaignID":{"type":"string"},"createdByID":{"type":"string"},"dateCreated":{"type":"string"},"dateFinished":{"type":"string"},"dateModified":{"type":"string"},"deadline":{"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"jobFinishedHistory":{"items":{"properties":{"date":{"type":"string"},"userId":{"type":"string"}},"type":"object"},"type":"array"},"jobKey":{"type":"string"},"jobMetaproperties":{"additionalProperties":{"type":"string"},"type":"object"},"job_active_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_next_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_previous_stage":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"job_stages":{"items":{"properties":{"id":{"type":"string"},"position":{"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"},"name":{"type":"string"},"presetID":{"type":"string"}},"type":"object"}}},"description":"Successful response"}},"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"summary":"Retrieve specific job","tags":["Jobs"]},"put":{"description":"Requires the JOBEDIT security role. Note: `responsibleID` and `responsibleGroupID` cannot be set on `previousStage`, `activeStage`, or `nextStage` through this endpoint. To update a stage's responsible user or group, use `PUT /api/workflow/stages/{id}`.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"example-1":{"value":{"accountableID":"00000000-0000-0000-0000-000000000000","activeStage":{"id":"00000000-0000-0000-0000-000000000002","status":"Active"},"campaignID":"00000000-0000-0000-0000-000000000000","deadline":"2018-09-29","description":"Job Description","jobMetaproperties":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"},"name":"Job Example","nextStage":{"deadline":"2024-08-31T00:00:00+00:00","id":"00000000-0000-0000-0000-000000000003","status":"Idle"},"previousStage":{"deadline":null,"id":"00000000-0000-0000-0000-000000000001","status":"Approved"}}}},"schema":{"properties":{"accountableID":{"description":"Id of the user accountable for the job (displayed as Reporter in the UI). This does not update a stage's responsible user or group; use PUT /api/workflow/stages/{id} for that.","example":"00000000-0000-0000-0000-000000000000","type":"string"},"activeStage":{"description":"The new active stage of the job","properties":{"deadline":{"description":"Date of when the active stage ends","example":"2024-08-31T00:00:00+00:00","type":"string"},"id":{"description":"ID of the new active stage","example":"00000000-0000-0000-0000-000000000002","type":"string"},"status":{"description":"Status of the new active stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Active","type":"string"}},"type":"object"},"campaignID":{"description":"Id of the campaign the job is part of","example":"00000000-0000-0000-0000-000000000000","type":"string"},"deadline":{"description":"Date of when the job ends","example":"2018-09-29","type":"string"},"description":{"description":"Description of the job","example":"Job Description","type":"string"},"jobMetaproperties":{"additionalProperties":{"type":"string"},"description":"ID and metaproperty values","example":{"00000000-0000-0000-0000-000000000000":"00000000-0000-0000-0000-000000000000"},"type":"object"},"name":{"description":"Name of the job","example":"Job Example","type":"string"},"nextStage":{"description":"The new next stage of the job","properties":{"deadline":{"description":"Date of when the next stage ends","example":"2024-08-31T00:00:00+00:00","type":"string"},"id":{"description":"ID of the new next stage","example":"00000000-0000-0000-0000-000000000003","type":"string"},"status":{"description":"Status of the new next stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Idle","type":"string"}},"type":"object"},"previousStage":{"description":"The new previous stage of the job","properties":{"deadline":{"description":"Date of when the previous stage ends","example":null,"type":"string"},"id":{"description":"ID of the new previous stage","example":"00000000-0000-0000-0000-000000000001","type":"string"},"status":{"description":"Status of the new previous stage","enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"example":"Approved","type":"string"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"job_id":"00000000-0000-0000-0000-000000000000","status":"Updated"}}},"schema":{"properties":{"job_id":{"example":"00000000-0000-0000-0000-000000000000","type":"string"},"status":{"example":"Updated","type":"string"}},"type":"object"}}},"description":"Successful response"}},"security":[{"permanentToken":["JOBEDIT"]},{"OAuth2":["JOBEDIT"]}],"summary":"Modify job","tags":["Jobs"]}},"/api/workflow/jobs/{id}/finish":{"patch":{"description":"Requires the JOBAPPROVE security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"job_id":{"example":"00000000-0000-0000-0000-000000000000","type":"string"},"status":{"example":"Finished","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"job_id":"00000000-0000-0000-0000-000000000000","status":"Finished"}}},"schema":{"properties":{"job_id":{"example":"00000000-0000-0000-0000-000000000000","type":"string"},"status":{"example":"Finished","type":"string"}},"type":"object"}}},"description":"Ok: Job finished successfully\n"},"403":{"content":{"application/json":{"examples":{"example-1":{"value":{}}},"schema":{"type":"object"}}},"description":"Forbidden: The user does not have the required permissions for this operation.\n"},"409":{"content":{"application/json":{"examples":{"example-1":{"value":{"message":"Re-open the job to finish again.","status":"Job already finished."}},"example-2":{"value":{"message":"Advance the job 00000000-0000-0000-0000-000000000000 to the last stage to finish.","status":"Job not on last stage."}}},"schema":{"properties":{"message":{"example":"Re-open the job to finish again.","type":"string"},"status":{"example":"Job already finished.","type":"string"}},"type":"object"}}},"description":"Conflict: The job is not open (has been finished), the activeStage.status is Approved. Or the job is not on the last stage.\n"}},"security":[{"permanentToken":["JOBAPPROVE"]},{"OAuth2":["JOBAPPROVE"]}],"summary":"Finish job","tags":["Finish"]}},"/api/workflow/jobs/{id}/media":{"get":{"description":"Requires the JOBOVERVIEW security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":[{"dateCreated":"2021-05-12T08:48:01+00:00","dateModified":"2021-05-12T08:51:22+00:00","filename":"filename.png","id":"00000000-0000-0000-0000-000000000000","orientation":"square","original_url":"https://url.to.file/original.png","previews":[{"type":"thumbnail","url":"https://url.to.file/preview.png"},{"type":"preview","url":"https://url.to.file/preview.png"},{"type":"activity","url":"https://url.to.file/preview.png"}],"responsible_name":"John Doe","status":"AwaitingApproval","sub_versions":[{"dateCreated":"2021-05-13T08:48:01+00:00","dateModified":"2021-05-13T08:51:22+00:00","filename":"filename.png","id":"00000000-0000-0000-0000-000000000000","orientation":"square","original_url":"https://url.to.file/original.png","previews":[{"type":"thumbnail","url":"https://url.to.file/preview.png"},{"type":"preview","url":"https://url.to.file/preview.png"},{"type":"activity","url":"https://url.to.file/preview.png"}],"responsible_name":"John Doe","status":"AwaitingApproval","sub_versions":[],"uploader_name":"John Doe","version":2,"versionParentID":"00000000-0000-0000-0000-000000000000"}],"uploader_name":"John Doe","version":1,"versionParentID":null}]}},"schema":{"items":{"properties":{"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"filename":{"type":"string"},"id":{"type":"string"},"orientation":{"type":"string"},"original_url":{"type":"string"},"previews":{"items":{"properties":{"type":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"responsible_name":{"type":"string"},"status":{"type":"string"},"sub_versions":{"items":{"properties":{"dateCreated":{"type":"string"},"dateModified":{"type":"string"},"filename":{"type":"string"},"id":{"type":"string"},"orientation":{"type":"string"},"original_url":{"type":"string"},"previews":{"items":{"properties":{"type":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"responsible_name":{"type":"string"},"status":{"type":"string"},"sub_versions":{"items":{},"type":"array"},"uploader_name":{"type":"string"},"version":{"type":"number"},"versionParentID":{"type":"string"}},"type":"object"},"type":"array"},"uploader_name":{"type":"string"},"version":{"type":"number"},"versionParentID":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"Successful response"}},"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"summary":"Retrieve media of specific job","tags":["Job media"]}},"/api/workflow/jobs/{id}/stages":{"get":{"description":"Requires the JOBOVERVIEW security role.","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":[{"createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2021-02-08T16:38:03+00:00","deadline":null,"description":"This is the first stage","id":"00000000-0000-0000-0000-000000000000","name":"Start stage","position":1,"responsible":{"id":"00000000-0000-0000-0000-000000000000","type":"user"},"status":"Active"},{"createdByID":"00000000-0000-0000-0000-000000000000","dateCreated":"2021-02-08T16:38:03+00:00","deadline":"2021-02-18T18:00:00+00:00","description":"","id":"00000000-0000-0000-0000-000000000000","name":"Second stage","position":2,"responsible":{"id":"00000000-0000-0000-0000-000000000000","type":"group"},"status":"Idle"}]}},"schema":{"items":{"properties":{"createdByID":{"type":"string"},"dateCreated":{"type":"string"},"deadline":{"nullable":true,"type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"number"},"responsible":{"properties":{"id":{"type":"string"},"type":{"enum":["user","group"],"type":"string"}},"type":"object"},"status":{"enum":["Idle","Active","Cancelled","Approved","NeedsChanges"],"type":"string"}},"type":"object"},"type":"array"}}},"description":"Successful response"}},"security":[{"permanentToken":["JOBOVERVIEW"]},{"OAuth2":["JOBOVERVIEW"]}],"summary":"Retrieve stages of specific job","tags":["Job stages"]}},"/api/workflow/presets/job/{id}":{"get":{"parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"ID":"00000000-0000-0000-0000-000000000000","ftp_settings":{},"name":"API name","presetstages":{"ID":"00000000-0000-0000-0000-000000000000","description":"","editableBy":"all","name":"Revision Stage","position":"1.0","responsibleGroupID":null,"responsibleID":null,"restrictToGroupID":null,"type":"download"},"wf_uuid":"00000000-0000-0000-0000-000000000000"}}},"schema":{"properties":{"ID":{"type":"string"},"ftp_settings":{"type":"string"},"name":{"type":"string"},"presetstages":{"properties":{"ID":{"type":"string"},"description":{"type":"string"},"editableBy":{"type":"string"},"name":{"type":"string"},"position":{"type":"string"},"responsibleGroupID":{"type":"string"},"responsibleID":{"type":"string"},"restrictToGroupID":{"type":"string"},"type":{"type":"string"}},"type":"object"},"wf_uuid":{"type":"string"}},"type":"object"}}},"description":"Successful response"}},"security":[{"permanentToken":["PRESETOVERVIEW"]},{"OAuth2":["PRESETOVERVIEW"]}],"summary":"Retrieve specific job preset","tags":["Presets"]}},"/api/workflow/stages/{id}":{"put":{"description":"Requires the JOBEDIT security role. Updates a workflow stage, including the user or group responsible for it (displayed as Responsible in the UI).","parameters":[{"example":"00000000-0000-0000-0000-000000000000","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"example-body":{"value":{"deadline":"2018-09-29","description":"Stage Description","name":"Stage Example","responsible":{"id":"00000000-0000-0000-0000-000000000000","type":"user"}}}},"schema":{"properties":{"deadline":{"description":"Date of when the stage ends. Send null to clear it.","example":"2018-09-29","type":"string"},"description":{"description":"Description of the stage","example":"Stage Description","type":"string"},"name":{"description":"Name of the stage","example":"Stage Example","type":"string"},"responsible":{"description":"The user or group responsible for the stage (displayed as Responsible in the UI).","properties":{"id":{"description":"Id of the responsible user or group","example":"00000000-0000-0000-0000-000000000000","type":"string"},"type":{"description":"Whether the id refers to a user or a group","enum":["user","group"],"example":"user","type":"string"}},"type":"object"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"example-1":{"value":{"stage_id":"00000000-0000-0000-0000-000000000000","status":"Updated"}}},"schema":{"properties":{"stage_id":{"example":"00000000-0000-0000-0000-000000000000","type":"string"},"status":{"example":"Updated","type":"string"}},"type":"object"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"properties":{"error":{"example":"Invalid responsible user","type":"string"}},"type":"object"}}},"description":"Bad request"}},"security":[{"permanentToken":["JOBEDIT"]},{"OAuth2":["JOBEDIT"]}],"summary":"Update stage","tags":["Stages"]}}},"servers":[{"url":"https://{your-bynder-domain}"}],"tags":[{"description":"","name":"Presets"},{"description":"","name":"Jobs"},{"description":"","name":"Campaign jobs"},{"description":"","name":"Job media"},{"description":"","name":"File upload"},{"description":"","name":"Stages"},{"description":"","name":"Finish"}]}
```
