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

# MOGL Platform Admin API: Operations and Configuration

> The MOGL Admin API covers platform operations: user account management, job oversight, payment processing, notifications, and platform configuration.

The MOGL Admin API is the back-office interface for platform operations. It covers user account management, job and deal oversight, payment processing and payouts, notification configuration, and site-wide platform settings. Authentication is session-based, using server-side cookies and CSRF tokens rather than Bearer JWTs.

<Note>
  This API is separate from the Core API (which uses JWT Bearer tokens). It is designed for authorized platform operators and is not used in end-user integrations. Contact your MOGL account representative for access.
</Note>

## Base URL

```
https://back-office.mogl.online
```

All paths in this reference are appended to this base URL. For example, `POST /check-login` resolves to `https://back-office.mogl.online/check-login`.

***

## Authentication

The Admin API uses session-based authentication with CSRF token protection, not Bearer JWT tokens.

<Steps>
  <Step title="Fetch a CSRF token">
    Call `GET /updateCsrfToken` to retrieve a fresh CSRF token before making any state-changing request.
  </Step>

  <Step title="Log in">
    Call `POST /check-login` with your admin credentials and the CSRF token. A successful login sets a session cookie.
  </Step>

  <Step title="Include CSRF on mutations">
    Include the CSRF token in the request body or headers for all `POST`, `PUT`, `PATCH`, and `DELETE` requests.
  </Step>
</Steps>

| Method | Path               | Description                    |
| ------ | ------------------ | ------------------------------ |
| `GET`  | `/updateCsrfToken` | Get a fresh CSRF token         |
| `POST` | `/check-login`     | Log in and establish a session |
| `GET`  | `/logout`          | Invalidate the current session |

***

## Endpoint groups

### Dashboard

```
GET /dashboard
```

Returns the main admin dashboard. Rate-limited to 5 requests per minute.

***

### Athletes

Create and update athlete accounts, manage their verification and social media connections, and export records.

| Method | Path                                | Description                                 |
| ------ | ----------------------------------- | ------------------------------------------- |
| `GET`  | `/athletes/{status}/{id}`           | List athletes, filterable by status         |
| `POST` | `/athletes/save`                    | Create or update an athlete account         |
| `GET`  | `/athletes/view/{id}`               | View full athlete details                   |
| `GET`  | `/athletes/send-email/{id}`         | Send a verification email to an athlete     |
| `GET`  | `/athletes/view-jobs/{id}/{status}` | View an athlete's jobs by status            |
| `GET`  | `/athletes-export`                  | Export athlete records to Excel             |
| `GET`  | `/athletes-export-csv`              | Export athlete records to CSV               |
| `POST` | `/refresh-socialMedia-data-athlete` | Refresh social media metrics for an athlete |

***

### Partners

| Method | Path                                      | Description                             |
| ------ | ----------------------------------------- | --------------------------------------- |
| `GET`  | `/partner/{status}/{id}`                  | List partners, filterable by status     |
| `POST` | `/partner/save`                           | Create or update a partner account      |
| `GET`  | `/partner/view/{id}`                      | View partner details                    |
| `POST` | `/partner/associate-university`           | Associate a partner with a university   |
| `POST` | `/partner/unassociate-university-partner` | Remove a partner–university association |
| `GET`  | `/partner-export`                         | Export partner records to Excel         |

***

### Agents

| Method | Path                               | Description                       |
| ------ | ---------------------------------- | --------------------------------- |
| `GET`  | `/agent/{status}/{id}`             | List agents, filterable by status |
| `POST` | `/agent/save`                      | Create or update an agent account |
| `GET`  | `/agent/view/{id}`                 | View agent details                |
| `GET`  | `/agent/unlink-athlete-agent/{id}` | Unlink an athlete from an agent   |
| `GET`  | `/agent/athlete/{id}`              | List athletes linked to an agent  |
| `GET`  | `/agent/export/agent/list`         | Export agent records to Excel     |

***

### Jobs

Admins can create jobs directly, manage applicant pipelines, override due dates, and handle contract cancellations.

| Method | Path                                    | Description                               |
| ------ | --------------------------------------- | ----------------------------------------- |
| `GET`  | `/job/{status}/{id}`                    | List jobs, filterable by status           |
| `POST` | `/job/save`                             | Create or update a job                    |
| `GET`  | `/job/view/{id}`                        | View full job details                     |
| `POST` | `/job/jobApplicantPagination/{id}`      | Paginate job applicants                   |
| `POST` | `/job/jobApplicantHiredPagination/{id}` | Paginate hired applicants                 |
| `POST` | `/job/remove-athlete`                   | Remove an athlete from a job              |
| `POST` | `/job/cancel-contract`                  | Cancel a job contract                     |
| `POST` | `/job/update-partner-fee/{job_id}`      | Update or waive the partner fee for a job |
| `POST` | `/job/updateJobStatusFromPending`       | Move a job out of pending status          |

***

### Payments

Process payouts, issue refunds, manage Stripe source types, and export payment records.

| Method | Path                                       | Description                                |
| ------ | ------------------------------------------ | ------------------------------------------ |
| `GET`  | `/payment-records/{status}/{id}`           | List payment records, filterable by status |
| `GET`  | `/payment-records/athlete-payout/{status}` | List athlete payouts                       |
| `GET`  | `/payment-records/payout/{id}`             | Trigger a payout for an athlete            |
| `POST` | `/payment-refund`                          | Process a payment refund                   |
| `GET`  | `/payment-retry/payout/{id}`               | Retry a failed payout                      |
| `GET`  | `/payments-export`                         | Export payment records to Excel            |
| `GET`  | `/payments-export-csv`                     | Export payment records to CSV              |
| `GET`  | `/revenue/{status}`                        | List revenue records                       |
| `GET`  | `/wallet-history/{id}`                     | View wallet transaction history for a user |

***

### University admins

| Method | Path                                | Description                                     |
| ------ | ----------------------------------- | ----------------------------------------------- |
| `GET`  | `/university-admin/{status}/{id}`   | List university admin accounts                  |
| `POST` | `/university-admin/save`            | Create or update a university admin             |
| `GET`  | `/university-admin/send-email/{id}` | Send a verification email to a university admin |

***

### Content management

A full file and folder system for managing platform content assets, with support for multipart uploads for large files.

| Method | Path                                   | Description                          |
| ------ | -------------------------------------- | ------------------------------------ |
| `GET`  | `/content-management/{parent_id}`      | Browse files and folders             |
| `POST` | `/content-management/save`             | Save a file or folder                |
| `POST` | `/content/multipart/create`            | Start a multipart upload session     |
| `POST` | `/content/multipart/sign`              | Sign an upload part                  |
| `POST` | `/content/multipart/complete`          | Complete a multipart upload          |
| `POST` | `/content-management/delete`           | Delete a content item                |
| `POST` | `/content-management/move`             | Move a file to a different folder    |
| `GET`  | `/content-management/download/{id}`    | Download a content file              |
| `GET`  | `/content-management/preview-url/{id}` | Get a preview URL for a content item |

***

### Notifications

Configure and manage the platform's notification system, including email, SMS, and in-app notification templates.

| Method | Path                                    | Description                                   |
| ------ | --------------------------------------- | --------------------------------------------- |
| `GET`  | `/notification-overview/{status}`       | View notification overview and trigger status |
| `POST` | `/notification-overview/update/trigger` | Enable or disable a notification trigger      |
| `POST` | `/email-templates/save`                 | Save an email notification template           |
| `GET`  | `/email-templates/{status}/{id}`        | List email templates                          |
| `POST` | `/sms-template/save`                    | Save an SMS notification template             |
| `POST` | `/inapp-template/save`                  | Save an in-app notification template          |
| `GET`  | `/inapp-template/{status}`              | List in-app notification templates            |

***

### Platform configuration

Manage site-wide settings including appearance, email configuration, subscription plans, announcements, and reference data.

<CardGroup cols={2}>
  <Card title="Site config" icon="sliders">
    `POST /site-config/basic-setting` — Update core site settings

    `POST /site-config/upload-favicon` — Upload logo or favicon

    `POST /site-config/update-email` — Update email sender configuration
  </Card>

  <Card title="Categories and reference data" icon="list">
    `POST /sport-category/save` — Create or update a sport category

    `POST /business-category/save` — Create or update a business category

    `POST /jobs-category/save` — Create or update a job category
  </Card>

  <Card title="Subscriptions" icon="credit-card">
    `POST /brand-subscriptions/save` — Create or update a subscription plan

    `POST /brand-subscriptions/status_update` — Activate or deactivate a plan

    `GET /brand-subscriptions/{status}/{id}` — List subscription plans
  </Card>

  <Card title="Announcements" icon="megaphone">
    `POST /announcement/save` — Create or update an announcement

    `POST /announcement-group/save` — Create an announcement group

    `GET /announcement/{id}` — List announcements
  </Card>
</CardGroup>

***

### Rosters

Build and publish custom athlete rosters used for marketing, recruiting, and public-facing pages.

| Method | Path                             | Description                           |
| ------ | -------------------------------- | ------------------------------------- |
| `GET`  | `/rosters/{status}/{id}`         | List rosters                          |
| `POST` | `/rosters/save`                  | Create or update a roster             |
| `POST` | `/rosters/save-athletes`         | Add athletes to a roster              |
| `POST` | `/rosters/delete-athletes`       | Remove athletes from a roster         |
| `POST` | `/rosters/update-publish-status` | Publish or unpublish a roster         |
| `POST` | `/rosters/check-url`             | Verify that a roster URL is available |

***

### CMS

Manage all editorial content on the platform including blog posts, FAQs, testimonials, legal terms, and custom pages.

| Method | Path                         | Description                 |
| ------ | ---------------------------- | --------------------------- |
| `POST` | `/blog/{user_type}/save`     | Save a blog post            |
| `POST` | `/faq/save`                  | Save a FAQ entry            |
| `POST` | `/legal-terms/save`          | Save a legal terms document |
| `POST` | `/athlete-testimonials/save` | Save an athlete testimonial |
| `POST` | `/custom-pages/save`         | Save a custom static page   |

***

### Export reports

Request and download bulk exports across multiple data domains.

| Method | Path                     | Description                           |
| ------ | ------------------------ | ------------------------------------- |
| `POST` | `/export-report-request` | Queue an export report for generation |
| `GET`  | `/export-report-process` | Process a queued export report        |
| `GET`  | `/export-report/{code}`  | Download a completed export by code   |
