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

# Edit job after AI review

> Accepts AI-suggested edits for an existing job (first-deal auto-approval flow). Only updates fields that are provided. Use deliverableList with source_milestone_id to split one milestone into multiple deliverables; use id (without source_milestone_id) to update an existing milestone in place. Marks the pending AI suggestion as accepted, activates the job, and may trigger AI ranking for public jobs.



## OpenAPI

````yaml /storage/api-docs/api-docs.json post /ai-edit-job
openapi: 3.0.0
info:
  title: MOGL Core API
  description: >-
    MOGL Platform Core API — powering athlete NIL deals, brand partnerships,
    agent management, payments, messaging, and more.
     *
     * ## Authentication
     * - **JWT Bearer Token**: Most endpoints require a Bearer token obtained via `/api/login`.
     * - **Server-to-Server API Key**: Internal/lambda/cron endpoints use an `X-API-KEY` header.
     *
     * ## Rate Limiting
     * - Registration & login endpoints: 4–15 requests per minute
     * - Public/influencer endpoints: 200 requests per minute
     * - Authenticated endpoints: standard Laravel throttle
  version: 1.0.0
servers:
  - url: http://localhost/mogl/mogl-backend/api
    description: Local
  - url: https://dev-api.mogl.online/api
    description: Dev
  - url: https://staging-api.mogl.online/api
    description: Staging
  - url: https://api.mogl.online/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Login, registration, password reset
  - name: User Registration - Common
    description: Common user registration & email check
  - name: User Registration - Athlete
    description: Athlete registration & onboarding steps
  - name: User Registration - Partner
    description: Partner/Brand registration & onboarding steps
  - name: User Registration - Agent
    description: Agent registration & onboarding steps
  - name: User Registration - Fan
    description: Fan registration & onboarding steps
  - name: User Profile
    description: User profile management, settings, social media
  - name: Athlete
    description: 'Athlete-specific endpoints: search, details, availability'
  - name: Athlete - Availability Confirmation
    description: Post-hiring availability confirmation workflow
  - name: Athlete - NIL Feed
    description: Athlete NIL feed and partner search
  - name: Athlete - AI Assistant
    description: AI-powered job assistant for athletes — chat and conversation history
  - name: Partner
    description: Partner/Brand-specific endpoints
  - name: Partner - External Job
    description: External job link & applicant management
  - name: Partner - Deliverable Report
    description: Deliverable detail reports for brands
  - name: Partner - Screening Questions
    description: Screening question reports
  - name: Partner - Contract Management
    description: Brand contract management with athletes
  - name: Partner - Content Library
    description: Brand content library for deliverable assets
  - name: Agent
    description: Agent profile, athlete management, contracts
  - name: Agent - Athletes
    description: Agent-athlete relationship management
  - name: Agent - Stripe
    description: Agent payment methods & billing via Stripe
  - name: Agent - Contracts
    description: Agent athlete contract management
  - name: Agent - Availability Confirmation
    description: Agent managing athlete job availability
  - name: Jobs
    description: Job/deal CRUD, search, invitations, hiring, deliverables
  - name: Deals
    description: Deal listing, my deals, bulk operations
  - name: Deal Folder
    description: >-
      Deal folder file workflow — uploads, replacements, approvals, revisions,
      comments. Accessible by athlete, partner/brand, agent, and iOS clients
      (per-action authorisation enforced server-side).
  - name: Deal Folder iOS API
    description: >-
      iOS-only direct-to-S3 multipart upload endpoints for deal folder files
      (initiate/complete for new uploads and replacements). Web clients should
      use the standard `Deal Folder` upload/replace endpoints instead.
  - name: Chat
    description: Messaging, chat contacts, notifications
  - name: Notifications
    description: Notification preferences, in-app notifications
  - name: Payments
    description: Stripe payments, payment history, cards, bulk pay
  - name: Subscription
    description: Brand subscription plans & management
  - name: Public Pages
    description: Public content endpoints (no auth required)
  - name: Public - Influencer/SEO
    description: Public influencer discovery, sitemaps, directories
  - name: Services
    description: Athlete service marketplace
  - name: iOS Device
    description: iOS device tokens, live activities
  - name: Onboarding Tutorial
    description: Onboarding tutorial progress
  - name: MOGL Rosters
    description: Roster management & display
  - name: Internal / Cron
    description: Server-to-server and cron job endpoints
  - name: Affiliate
    description: Athlete affiliate links & tracking
paths:
  /ai-edit-job:
    post:
      tags:
        - Jobs
      summary: Edit job after AI review
      description: >-
        Accepts AI-suggested edits for an existing job (first-deal auto-approval
        flow). Only updates fields that are provided. Use deliverableList with
        source_milestone_id to split one milestone into multiple deliverables;
        use id (without source_milestone_id) to update an existing milestone in
        place. Marks the pending AI suggestion as accepted, activates the job,
        and may trigger AI ranking for public jobs.
      operationId: editAIReviewJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - id
              properties:
                isEdit:
                  description: >-
                    Optional flag sent by the client (same as add-job); not
                    required for AI edit
                  type: integer
                  example: 1
                  nullable: true
                id:
                  description: >-
                    Job ID to edit (must be created by the authenticated
                    partner)
                  type: integer
                  example: 2726
                addTitleAndDescription:
                  properties:
                    job_name:
                      description: 'Job title (NOTE: job_name not jobName for AI edit)'
                      type: string
                      example: Content Creation Job
                      nullable: true
                    jobDescription:
                      description: HTML job description
                      type: string
                      example: >-
                        <p>My gym is looking for athletes to help with video
                        content and online presence.</p>
                      nullable: true
                    specifics_exclusive_deal:
                      description: If provided, marks job as exclusive
                      type: string
                      example: None
                      nullable: true
                    deliverableList:
                      description: >-
                        Deliverable updates. Split flow: each item has
                        source_milestone_id (replaces that milestone with new
                        rows). Legacy flow: each item has id (updates existing
                        milestone).
                      type: array
                      items:
                        properties:
                          id:
                            description: >-
                              Existing milestone ID to update in place (legacy
                              flow; omit when using source_milestone_id)
                            type: integer
                            example: 6588
                            nullable: true
                          source_milestone_id:
                            description: >-
                              Original milestone ID to replace when splitting
                              into multiple deliverables
                            type: integer
                            example: 6588
                            nullable: true
                          name:
                            description: Deliverable name (required for split children)
                            type: string
                            example: Instagram Reel
                            nullable: true
                          description:
                            description: HTML deliverable description
                            type: string
                            example: <p>Create and publish a Instagram Reel.</p>
                            nullable: true
                          payment_mode:
                            description: Payment mode
                            type: string
                            enum:
                              - Cash
                              - Product
                              - C
                              - P
                            example: Cash
                          price:
                            description: Deliverable price (cash)
                            type: number
                            example: 33
                            nullable: true
                          product_detail:
                            description: Product details (ignored if value is 'none')
                            type: string
                            example: None
                            nullable: true
                          milestone_category_id:
                            description: Deliverable type / milestone category ID
                            type: integer
                            example: 14
                            nullable: true
                          due_date_number:
                            type: integer
                            example: 2
                            nullable: true
                          due_date_type:
                            type: string
                            enum:
                              - Day
                              - Week
                              - Month
                            example: Week
                            nullable: true
                          due_date:
                            description: >-
                              Absolute due date (alternative to due_date_number
                              + due_date_type)
                            type: string
                            format: date-time
                            nullable: true
                        type: object
                      example:
                        - source_milestone_id: 6588
                          name: Instagram Reel
                          description: >-
                            <p>Create and publish a Instagram Reel. See the deal
                            description for full campaign requirements.</p>
                          payment_mode: Cash
                          price: 33
                          product_detail: None
                          milestone_category_id: 14
                          due_date_number: 2
                          due_date_type: Week
                        - source_milestone_id: 6588
                          name: TikTok Video
                          description: >-
                            <p>Create and publish a TikTok Video. See the deal
                            description for full campaign requirements.</p>
                          payment_mode: Cash
                          price: 33
                          product_detail: None
                          milestone_category_id: 15
                          due_date_number: 2
                          due_date_type: Week
                        - source_milestone_id: 6588
                          name: X (Twitter) Post
                          description: >-
                            <p>Create and publish a X (Twitter) Post. See the
                            deal description for full campaign requirements.</p>
                          payment_mode: Cash
                          price: 35
                          product_detail: None
                          milestone_category_id: 16
                          due_date_number: 2
                          due_date_type: Week
                  type: object
                addLocation:
                  description: >-
                    Job targeting criteria. Only fields explicitly posted are
                    applied (no AI backfill merge on accept).
                  properties:
                    university:
                      description: University IDs
                      type: array
                      items:
                        type: integer
                      example:
                        - 1
                      nullable: true
                    sports:
                      description: Sport category IDs
                      type: array
                      items:
                        type: integer
                      example:
                        - 1
                      nullable: true
                    instagram_min:
                      type: integer
                      example: 1000
                      nullable: true
                    instagram_max:
                      type: integer
                      example: 5000
                      nullable: true
                    tiktok_min:
                      type: integer
                      example: 1000
                      nullable: true
                    tiktok_max:
                      type: integer
                      example: 5000
                      nullable: true
                    x_min:
                      type: integer
                      example: 1000
                      nullable: true
                    x_max:
                      type: integer
                      example: 5000
                      nullable: true
                  type: object
              type: object
      responses:
        '200':
          description: Job updated
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Job Updated Successfully
                type: object
        '401':
          description: Unauthenticated
        '403':
          description: Not the job creator
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Use the /api/login endpoint to obtain a
        token.
      scheme: bearer
      bearerFormat: JWT

````