> ## 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.

# Content Tab — per-job detail (by-athlete or by-deliverable pivot)

> Per-job detail view for the Partner Content Tab. The job header is reused from the index list — this endpoint returns only a summary plus a paginated data list. The shape of each data row depends on the pivot:

- **By Athlete** (default, pivot = by_athlete) — one row per athlete, with that athlete's milestones and files.
- **By Deliverable, collapsed** (pivot = by_deliverable, no milestone_id) — one row per deliverable, with counts and an athletes preview.
- **By Deliverable, expanded** (pivot = by_deliverable + milestone_id) — one row per athlete inside that one deliverable, with files.

Athlete filter values come from GET /partner/content/deal-folders/{job_id}/athletes. Active folders only.



## OpenAPI

````yaml /storage/api-docs/api-docs.json post /partner/content/deal-folders/{job_id}
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, conversation history, read
      state, and clarification drafts
  - name: Athlete - AI Waitlist
    description: AI Athlete Assistant waitlist status, social proof, and joining
  - 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: Internal - AI Athlete Assistant Tools
    description: >-
      Dual-authenticated, athlete-scoped tool gateway used only by the AI
      service
  - name: Affiliate
    description: Athlete affiliate links & tracking
paths:
  /partner/content/deal-folders/{job_id}:
    post:
      tags:
        - Partner - Content Library
      summary: Content Tab — per-job detail (by-athlete or by-deliverable pivot)
      description: >-
        Per-job detail view for the Partner Content Tab. The job header is
        reused from the index list — this endpoint returns only a summary plus a
        paginated data list. The shape of each data row depends on the pivot:


        - **By Athlete** (default, pivot = by_athlete) — one row per athlete,
        with that athlete's milestones and files.

        - **By Deliverable, collapsed** (pivot = by_deliverable, no
        milestone_id) — one row per deliverable, with counts and an athletes
        preview.

        - **By Deliverable, expanded** (pivot = by_deliverable + milestone_id) —
        one row per athlete inside that one deliverable, with files.


        Athlete filter values come from GET
        /partner/content/deal-folders/{job_id}/athletes. Active folders only.
      operationId: contentDealFolderAggregate
      parameters:
        - name: job_id
          in: path
          description: Partner job ID.
          required: true
          schema:
            type: integer
            example: 2768
        - name: page
          in: query
          description: Page number (1-indexed).
          required: false
          schema:
            type: integer
            example: 1
        - name: limit
          in: query
          description: Items per page (default 20).
          required: false
          schema:
            type: integer
            example: 20
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                pivot:
                  description: Detail page tab. Defaults to `by_athlete`.
                  type: string
                  enum:
                    - by_athlete
                    - by_deliverable
                  example: by_athlete
                milestone_id:
                  description: >-
                    Only valid when `pivot = by_deliverable`. When provided,
                    `data[]` is the expanded list of that deliverable's athletes
                    (with files). When omitted, `data[]` is the collapsed
                    deliverable list.
                  type: integer
                  example: 6716
                is_all_selected:
                  description: >-
                    When `true`, all athletes for the job are selected (use
                    `excluded_athlete_id` to subtract). When `false`, only the
                    IDs in `athlete_id` are included.
                  type: boolean
                  example: true
                athlete_id:
                  description: >-
                    Specific athlete IDs to include (used when `is_all_selected
                    = false`).
                  type: array
                  items:
                    type: integer
                  example:
                    - 16070
                excluded_athlete_id:
                  description: Athlete IDs to exclude (used when `is_all_selected = true`).
                  type: array
                  items:
                    type: integer
                  example: []
              type: object
      responses:
        '200':
          description: Per-job detail aggregate (shape varies by `pivot`)
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Content Deal Folder Detail
                  pivot:
                    type: string
                    enum:
                      - by_athlete
                      - by_deliverable
                    example: by_athlete
                  milestone_id:
                    type: integer
                    example: null
                    nullable: true
                  summary:
                    description: Job-level rollup (always present).
                    properties:
                      active_athlete_count:
                        type: integer
                        example: 2
                      deliverable_count:
                        type: integer
                        example: 3
                      state_counts:
                        properties:
                          awaiting_upload:
                            type: integer
                            example: 1
                          needs_approval:
                            type: integer
                            example: 1
                          revision_requested:
                            type: integer
                            example: 0
                          file_approved:
                            type: integer
                            example: 1
                        type: object
                      file_counts:
                        properties:
                          total:
                            type: integer
                            example: 4
                          uploaded:
                            type: integer
                            example: 3
                          approved:
                            type: integer
                            example: 1
                          needs_revision:
                            type: integer
                            example: 0
                        type: object
                    type: object
                  data:
                    description: >-
                      Shape varies — see endpoint description. May be (a)
                      athletes with milestones+files, (b) collapsed
                      deliverables, or (c) expanded deliverable's athletes with
                      files.
                    type: array
                    items:
                      type: object
                  total_count:
                    type: integer
                    example: 2
                  current_page:
                    type: integer
                    example: 1
                  per_page:
                    type: integer
                    example: 20
                  last_page:
                    type: integer
                    example: 1
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '403':
          description: Partner does not own this job
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: Internal error fetching content deal folder detail
      security:
        - bearerAuth: []
components:
  schemas:
    UnauthorizedResponse:
      properties:
        message:
          type: string
          example: Unauthenticated.
      type: object
    ValidationErrorResponse:
      properties:
        message:
          type: string
          example: The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Use the /api/login endpoint to obtain a
        token.
      scheme: bearer
      bearerFormat: JWT

````