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

# Mutate resume stylesheet state

> Applies one revisioned semantic stylesheet transition after validation and PDF preflight.



## OpenAPI

````yaml /spec.json post /resumes/{id}/stylesheet
openapi: 3.1.1
info:
  title: Reactive Resume
  version: 5.2.5
  description: Reactive Resume API
  license:
    name: MIT
    url: https://github.com/amruthpillai/reactive-resume/blob/main/LICENSE
  contact:
    name: Amruth Pillai
    email: hello@amruthpillai.com
    url: https://amruthpillai.com
servers:
  - url: https://rxresu.me/api/openapi
security:
  - apiKey: []
externalDocs:
  url: https://docs.rxresu.me
  description: Reactive Resume Documentation
paths:
  /resumes/{id}/stylesheet:
    post:
      tags:
        - Resumes
      summary: Mutate resume stylesheet state
      description: >-
        Applies one revisioned semantic stylesheet transition after validation
        and PDF preflight.
      operationId: mutateResumeStylesheet
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the resume.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                expectedRevision:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                expectedRenderDataVersion:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                editGeneration:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                transition:
                  anyOf:
                    - const: edit_source
                    - const: activate
                    - const: deactivate
                    - const: restore_history
                source:
                  type: object
                  properties:
                    languageVersion:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                      exclusiveMinimum: 0
                    text:
                      type: string
                  required:
                    - languageVersion
                    - text
                  additionalProperties: false
                restore:
                  type: object
                  properties:
                    mode:
                      type: string
                      enum:
                        - legacy
                        - semantic
                    source:
                      type: object
                      properties:
                        languageVersion:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          exclusiveMinimum: 0
                        text:
                          type: string
                      required:
                        - languageVersion
                        - text
                      additionalProperties: false
                    applied:
                      type: object
                      properties:
                        languageVersion:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          exclusiveMinimum: 0
                        text:
                          type: string
                      required:
                        - languageVersion
                        - text
                      additionalProperties: false
                  required:
                    - mode
                    - source
                    - applied
                  additionalProperties: false
              required:
                - expectedRevision
                - expectedRenderDataVersion
                - editGeneration
                - transition
      responses:
        '200':
          description: The committed canonical stylesheet state.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stylesheet:
                    type: object
                    properties:
                      mode:
                        type: string
                        enum:
                          - legacy
                          - semantic
                      source:
                        type: object
                        properties:
                          languageVersion:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            exclusiveMinimum: 0
                          text:
                            type: string
                        required:
                          - languageVersion
                          - text
                        additionalProperties: false
                      applied:
                        type: object
                        properties:
                          languageVersion:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            exclusiveMinimum: 0
                          text:
                            type: string
                        required:
                          - languageVersion
                          - text
                        additionalProperties: false
                    required:
                      - mode
                      - source
                      - applied
                    additionalProperties: false
                  revision:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  renderDataVersion:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  editGeneration:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  diagnostics:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        severity:
                          enum:
                            - error
                            - warning
                          type: string
                        message:
                          type: string
                        range:
                          type: object
                          properties:
                            start:
                              type: object
                              properties:
                                line:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                  exclusiveMinimum: 0
                                column:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                  exclusiveMinimum: 0
                                offset:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                              required:
                                - line
                                - column
                                - offset
                              additionalProperties: false
                            end:
                              type: object
                              properties:
                                line:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                  exclusiveMinimum: 0
                                column:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                  exclusiveMinimum: 0
                                offset:
                                  type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                              required:
                                - line
                                - column
                                - offset
                              additionalProperties: false
                          required:
                            - start
                            - end
                          additionalProperties: false
                      required:
                        - code
                        - severity
                        - message
                        - range
                      additionalProperties: false
                required:
                  - stylesheet
                  - revision
                  - renderDataVersion
                  - editGeneration
                  - diagnostics
                additionalProperties: false
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: STYLESHEET_VALIDATION_FAILED
                      status:
                        const: 400
                      message:
                        type: string
                        default: The stylesheet failed validation.
                      data:
                        type: object
                        properties:
                          diagnostics:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                severity:
                                  enum:
                                    - error
                                    - warning
                                  type: string
                                message:
                                  type: string
                                range:
                                  type: object
                                  properties:
                                    start:
                                      type: object
                                      properties:
                                        line:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                          exclusiveMinimum: 0
                                        column:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                          exclusiveMinimum: 0
                                        offset:
                                          type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                      required:
                                        - line
                                        - column
                                        - offset
                                      additionalProperties: false
                                    end:
                                      type: object
                                      properties:
                                        line:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                          exclusiveMinimum: 0
                                        column:
                                          type: integer
                                          minimum: -9007199254740991
                                          maximum: 9007199254740991
                                          exclusiveMinimum: 0
                                        offset:
                                          type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                      required:
                                        - line
                                        - column
                                        - offset
                                      additionalProperties: false
                                  required:
                                    - start
                                    - end
                                  additionalProperties: false
                              required:
                                - code
                                - severity
                                - message
                                - range
                              additionalProperties: false
                        required:
                          - diagnostics
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: STYLESHEET_PARITY_FAILED
                      status:
                        const: 400
                      message:
                        type: string
                        default: >-
                          The converted stylesheet does not preserve legacy PDF
                          presentation.
                      data:
                        type: object
                        properties:
                          mismatches:
                            type: array
                            items:
                              type: string
                        required:
                          - mismatches
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '409':
          description: '409'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: STYLESHEET_REVISION_CONFLICT
                      status:
                        const: 409
                      message:
                        type: string
                        default: >-
                          The resume or stylesheet changed while the candidate
                          was being validated.
                      data:
                        type: object
                        properties:
                          state:
                            type: object
                            properties:
                              stylesheet:
                                type: object
                                properties:
                                  mode:
                                    type: string
                                    enum:
                                      - legacy
                                      - semantic
                                  source:
                                    type: object
                                    properties:
                                      languageVersion:
                                        type: integer
                                        minimum: -9007199254740991
                                        maximum: 9007199254740991
                                        exclusiveMinimum: 0
                                      text:
                                        type: string
                                    required:
                                      - languageVersion
                                      - text
                                    additionalProperties: false
                                  applied:
                                    type: object
                                    properties:
                                      languageVersion:
                                        type: integer
                                        minimum: -9007199254740991
                                        maximum: 9007199254740991
                                        exclusiveMinimum: 0
                                      text:
                                        type: string
                                    required:
                                      - languageVersion
                                      - text
                                    additionalProperties: false
                                required:
                                  - mode
                                  - source
                                  - applied
                                additionalProperties: false
                              revision:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              renderDataVersion:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                            required:
                              - stylesheet
                              - revision
                              - renderDataVersion
                            additionalProperties: false
                        required:
                          - state
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '503':
          description: '503'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: SEMANTIC_STYLESHEET_UNAVAILABLE
                      status:
                        const: 503
                      message:
                        type: string
                        default: Semantic stylesheet PDF preflight is unavailable.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: The API key to authenticate requests.

````