---
title: "Finish job"
url: "https://earlyaccess.developers.bynder.com/apis/workflow-jobs-api-1/versions/fe891cd9-8e8e-454e-83d7-5e79bbd56714/paths/api-workflow-jobs-id--finish/patch"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/workflow-jobs-api-1/versions/fe891cd9-8e8e-454e-83d7-5e79bbd56714.md

# Finish job

`PATCH` `/api/workflow/jobs/{id}/finish`

Requires the JOBAPPROVE security role.

## Path parameters

- `id` (string, required)

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Ok: Job finished successfully
- `403` - Forbidden: The user does not have the required permissions for this operation.
- `409` - Conflict: The job is not open (has been finished), the activeStage.status is Approved. Or the job is not on the last stage.

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Workflow Jobs API
  version: 1.0.0
servers:
  - url: https://{your-bynder-domain}
paths:
  /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
        "403":
          content:
            application/json:
              examples:
                example-1:
                  value: {}
              schema:
                type: object
          description: >
            Forbidden: The user does not have the required permissions for this
            operation.
        "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.
      security:
        - permanentToken:
            - JOBAPPROVE
        - OAuth2:
            - JOBAPPROVE
      summary: Finish job
      tags:
        - Finish
security:
  - permanentToken:
      - JOBAPPROVE
  - OAuth2:
      - JOBAPPROVE
components:
  securitySchemes:
    permanentToken:
      in: header
      name: Authorization
      type: apiKey
    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
```
