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

# Create, update, or delete a job

> Perform write operations on jobs. The `action` field in the request body
determines the operation:
- `create` — Create a new job
- `update` — Update an existing job (requires `uuid`)
- `delete` — Permanently delete a job and all associated data (requires `uuid`)
- `send_assignment_notification` — Notify the assigned contractor
- `restore_commit` — Restore job to a previous state
- `restore_archived_file` — Restore an archived file

**Required permission:** `api.jobs.manage.manage`




## OpenAPI

````yaml /openapi.yaml post /api/jobs/manage
openapi: 3.0.3
info:
  title: PropOps Platform API
  description: >
    ## PropOps Platform API


    This is the official REST API documentation for the **PropOps Platform** — a
    comprehensive property

    maintenance and job management solution developed and maintained exclusively
    by **PropOps Technologies Ltd**.


    ### Overview


    The PropOps API enables full CRUD access to all platform resources,
    including job management,

    user administration, contractor assignments, tenant records, financial
    tracking, analytics, and more.


    The backend is built on **PHP 8+** with a custom modular architecture,
    backed by a MySQL/MariaDB

    database accessed via PDO.


    ### Authentication


    All endpoints (unless stated otherwise) require authentication via a
    **Bearer Token** (JWT-compatible).

    Include the token in the `Authorization` header:


    ```

    Authorization: Bearer <your_token>

    ```


    Tokens are issued upon successful login and are session-scoped SHA-256
    hashes (64 characters).

    Mobile and API clients must supply the token on every request. Web session
    cookies are used for

    browser clients.


    ### CSRF Protection


    State-mutating operations (POST, PUT, DELETE) require a valid CSRF token
    passed in the request body

    or header as `csrf_token`. Obtain a fresh token from `GET
    /api/security/csrf-token`.


    ### Permissions


    Access to each endpoint is controlled by a granular permission key
    (dot-notation, e.g.

    `api.jobs.manage.manage`). Your account must be granted the relevant
    permission by an administrator.


    ### Rate Limiting


    Requests are subject to per-IP and per-account rate limits. Exceeding limits
    returns `429 Too Many Requests`.


    ### Pagination


    List endpoints support `limit` (default: 50, max: 200) and `offset` query
    parameters.


    ### Response Format


    All responses are JSON with the following envelope:


    ```json

    {
      "success": true,
      "data": { ... },
      "count": 0,
      "message": "Operation completed successfully"
    }

    ```


    Errors follow:


    ```json

    {
      "success": false,
      "error": "Human-readable error message"
    }

    ```


    ---

    **© 2024 PropOps Technologies Ltd. All rights reserved. Proprietary and
    confidential.**
  version: 2.0.0
  contact:
    name: PropOps Technologies Ltd — API Support
    url: https://propops.co.uk/support
    email: support@propops.co.uk
  license:
    name: Proprietary — No Unauthorized Distribution
    url: https://propops.co.uk/legal/api-license
  x-logo:
    url: https://propops.co.uk/assets/logo.png
  x-owner: PropOps Technologies Ltd
  x-copyright: © 2024 PropOps Technologies Ltd. All rights reserved.
servers:
  - url: https://my.propops.app
    description: API Playground
security:
  - BearerAuth: []
tags:
  - name: Jobs
    description: >-
      Create, retrieve, update, and delete jobs; manage associated documents,
      photos, case notes, and more.
  - name: Dashboard
    description: Aggregated metrics and chiplet data powering the main dashboard view.
  - name: Admin
    description: >-
      Administrative operations — branch management, roles, permissions, API
      discovery, and audit logs.
  - name: Users
    description: >-
      Full lifecycle user management — creation, updates, session control, and
      password security.
  - name: Contractors
    description: Contractor records, trade categories, certification, and coverage lookups.
  - name: Agents
    description: Property agent management and branch-level job assignment data.
  - name: Analytics
    description: Branch performance, job health checks, and activity reporting.
  - name: Email
    description: >-
      Transactional email delivery, template management, and address
      verification.
  - name: Financial
    description: Invoice tracking and payment status management.
  - name: Security
    description: >-
      CSRF tokens, session management, blacklisting, and file-integrity
      monitoring.
  - name: System
    description: >-
      Platform health checks, system status, push notifications, and device
      token registration.
  - name: Tenants
    description: Tenant record management, address assignment, and GDPR reporting.
  - name: Reports
    description: Financial and user activity report generation.
  - name: Services
    description: Service pricing configuration.
  - name: Search
    description: Global cross-module search.
  - name: Calendar
    description: Calendar-view job data.
  - name: Notices
    description: System notices displayed on the dashboard and login page.
  - name: Weather
    description: Weather forecast data via Open-Meteo integration.
  - name: SLA
    description: SLA breach detection and response-time tracking.
  - name: WhatsApp
    description: WhatsApp message sending via template system.
  - name: Webhooks
    description: n8n workflow management and triggering.
  - name: GDPR
    description: GDPR consent logging and data-subject rights.
  - name: Authentication
    description: API authentication and token management. SysOps accounts only.
paths:
  /api/jobs/manage:
    post:
      tags:
        - Jobs
      summary: Create, update, or delete a job
      description: >
        Perform write operations on jobs. The `action` field in the request body

        determines the operation:

        - `create` — Create a new job

        - `update` — Update an existing job (requires `uuid`)

        - `delete` — Permanently delete a job and all associated data (requires
        `uuid`)

        - `send_assignment_notification` — Notify the assigned contractor

        - `restore_commit` — Restore job to a previous state

        - `restore_archived_file` — Restore an archived file


        **Required permission:** `api.jobs.manage.manage`
      operationId: jobs_manage_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/JobCreateRequest'
                - type: object
                  required:
                    - action
                    - uuid
                    - csrf_token
                  properties:
                    action:
                      type: string
                      enum:
                        - update
                        - delete
                        - send_assignment_notification
                        - restore_commit
                    uuid:
                      type: string
                      format: uuid
                      example: 550e8400-e29b-41d4-a716-446655440001
                    csrf_token:
                      type: string
                      example: abc123def456
      responses:
        '200':
          description: Job updated/deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '201':
          description: Job created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    JobCreateRequest:
      type: object
      required:
        - job_title
        - job_description
        - priority_id
        - status_id
        - job_type_id
        - address_id
        - csrf_token
      properties:
        job_title:
          type: string
          example: Boiler Service - Unit 001
        job_description:
          type: string
          example: Annual boiler service required.
        priority_id:
          type: integer
          example: 2
        status_id:
          type: integer
          example: 1
        job_type_id:
          type: integer
          example: 3
        address_id:
          type: integer
          example: 5
        agent_id:
          type: integer
          nullable: true
          example: 10
        contractor_id:
          type: integer
          nullable: true
          example: 20
        tenants_ids:
          type: array
          items:
            type: integer
          example:
            - 100
            - 101
        job_total_budget:
          type: number
          format: float
          nullable: true
          example: 250
        contractor_budget:
          type: number
          format: float
          nullable: true
          example: 180
        vat_percentage:
          type: number
          format: float
          nullable: true
          example: 20
        total_amount:
          type: number
          format: float
          nullable: true
          example: 216
        date_works_start_date:
          type: string
          format: date
          nullable: true
          example: '2024-06-01'
        date_works_end_date:
          type: string
          format: date
          nullable: true
          example: '2024-06-02'
        time_range_id:
          type: integer
          nullable: true
          example: 2
        access_details:
          type: string
          nullable: true
          example: Key safe code 1234.
        works_order_ref:
          type: string
          nullable: true
          example: WO-001
        invoice_no:
          type: string
          nullable: true
          example: INV-001
        quote_no:
          type: string
          nullable: true
          example: QT-001
        private_contact_name:
          type: string
          nullable: true
          example: Contact_001
        private_contact_email:
          type: string
          format: email
          nullable: true
          example: contact001@example.com
        csrf_token:
          type: string
          example: abc123def456
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Operation completed successfully
    JobCreateResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            job_id:
              type: integer
              example: 1001
            job_uuid:
              type: string
              format: uuid
              example: 550e8400-e29b-41d4-a716-446655440001
            job_ref:
              type: string
              example: JOB-001
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: An error occurred. Please try again.
  responses:
    BadRequest:
      description: Invalid or missing request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: 'Missing required parameter: job_title.'
    Unauthorized:
      description: Authentication required or token invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: Unauthorized. Valid Bearer token required.
    Forbidden:
      description: Insufficient permissions to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error: You do not have permission to perform this action.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: SHA-256 session hash
      description: >
        All API requests must include a valid Bearer token in the
        `Authorization` header.

        Tokens are 64-character SHA-256 session hashes issued by the PropOps
        authentication system.


        **Example:**

        ```

        Authorization: Bearer a1b2c3d4e5f6...

        ```

````