> ## Documentation Index
> Fetch the complete documentation index at: https://api.jobaffinity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel the latest step change of an application

> Cancels the latest step change of an application, which goes back to its previous step. Only the author of the change can cancel it.



## OpenAPI

````yaml /api-reference/openapi.json post /step/{change_id}/cancel
openapi: 3.0.3
info:
  title: JobAffinity REST API
  version: '1.20'
  description: >
    JobAffinity REST API for managing jobs, candidates, applications, and
    recruitment processes.


    ## Authentication

    All endpoints require HTTP Basic Authentication.


    ## Conventions

    - **Validation errors are answered with HTTP 200** and `{"_status":
    "INVALID", "invalid": {...}}` (see the `InvalidResponse` schema and the
    Responses guide), not with an HTTP error code.

    - **Pagination**: list endpoints return pages of a fixed 100 items. Follow
    `_next`; it is an empty string on the last page.

    - **Unknown query parameters**: list endpoints answer `_status: INVALID`;
    detail endpoints ignore them.

    - **Dates** are `YYYY-MM-DD`. **Timestamps** are `YYYY-MM-DD HH:MM:SS`
    (space separator, no timezone, server local time), unless stated otherwise.

    - `_self`, `_schema`, `_next` and the other resource links are root-relative
    paths (`/restapi/v1/...`).

    - Empty text fields are returned as `""`; empty email fields as `null`.


    ## Versioning

    Current version: 1.20


    See `/restapi/changelog` for version history and changes.
  contact:
    name: JobAffinity API Support
servers:
  - url: https://jobaffinity.fr/restapi/v1
    description: REST API v1
  - url: https://jobaffinity.fr/restapi
    description: REST API root (for changelog)
security:
  - basicAuth: []
tags:
  - name: API Info
    description: API metadata and changelog
  - name: Account
    description: Authenticated user identity and organisation membership
  - name: Jobs
    description: Job listings and details
  - name: Candidates
    description: Candidate information
  - name: Applications
    description: Job applications
  - name: Processes
    description: Recruitment processes and steps
  - name: Notes
    description: Candidate notes
  - name: Templates
    description: Recorded email templates
  - name: Questionnaires
    description: Questionnaire answers
  - name: Webhooks
    description: Webhook tasks
  - name: Job Application Submission
    description: >-
      Submit candidate applications to a job posting via the apply URL provided
      in the job feed. The authentication token is embedded in the URL — no
      additional credentials are required.
paths:
  /step/{change_id}/cancel:
    post:
      tags:
        - Processes
      summary: Cancel the latest step change of an application
      description: >-
        Cancels the latest step change of an application, which goes back to its
        previous step. Only the author of the change can cancel it.
      operationId: cancelStepChange
      parameters:
        - name: change_id
          in: path
          required: true
          schema:
            type: integer
          description: '`change_id` returned by the step change.'
      responses:
        '200':
          description: Step change cancelled
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      _status:
                        type: string
                        enum:
                          - OK
                      application_id:
                        type: integer
                      step_id:
                        type: integer
                      step_name:
                        type: string
                  - $ref: '#/components/schemas/InvalidResponse'
        '400':
          description: The first step of an application cannot be cancelled.
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: The caller is not the author of the step change.
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          description: >-
            `not_last`: a later change exists; `email_sent`: the one-click
            rejection email is sent or being sent.
components:
  schemas:
    InvalidResponse:
      type: object
      description: Answered with HTTP 200 when parameters or body fail validation.
      properties:
        _status:
          type: string
          enum:
            - INVALID
        invalid:
          type: object
          description: >-
            One entry per invalid field; the key `""` holds errors not tied to a
            field (e.g. an unexpected parameter). `message` is an object or an
            array for nested fields.
          additionalProperties:
            type: object
            properties:
              code:
                type: string
                nullable: true
                description: Always null.
              message:
                oneOf:
                  - type: string
                  - type: object
                  - type: array
                    items: {}
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      headers:
        WWW-Authenticate:
          schema:
            type: string
    NotFoundError:
      description: The resource does not exist or is not visible to the caller.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication with API credentials

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.