> ## 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 Core API: Overview and Key Endpoints

> Explore the MOGL Core API: authentication, athlete and partner endpoints, jobs, payments, messaging, and notifications for NIL integrations.

The MOGL Platform Core API is the primary interface for building on top of MOGL. It powers everything athletes, brand partners, and agents do on the platform: registering accounts, posting and applying to NIL deals, processing Stripe payments, exchanging messages, and managing deliverables. All endpoints accept and return JSON.

<Note>
  Most endpoints require a Bearer JWT token. Obtain one by calling `POST /api/login` with valid credentials. See the [authentication](#authentication) section below for details.
</Note>

## Base URL

```
https://api.mogl.online/api
```

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

***

## Authentication

All user-facing endpoints require a **JWT Bearer token**. Pass the token in the `Authorization` header as `Bearer <token>`. Obtain it from `POST /login`.

### Obtaining a token

```bash theme={"dark"}
curl -X POST https://api.mogl.online/api/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'
```

The response includes a `token` field. Include it in all subsequent requests:

```bash theme={"dark"}
Authorization: Bearer <token>
```

### Rate limits

The API applies rate limiting to prevent abuse. If you exceed the limit for an endpoint you will receive a `429 Too Many Requests` response. Use exponential backoff before retrying.

***

## Endpoint groups

### Authentication

Login, logout, password reset, and the authenticated user endpoint.

| Method | Path                       | Description                             |
| ------ | -------------------------- | --------------------------------------- |
| `POST` | `/login`                   | Log in and receive a JWT Bearer token   |
| `POST` | `/logout`                  | Invalidate the current session token    |
| `POST` | `/me`                      | Return the authenticated user's record  |
| `POST` | `/forget-password`         | Request a password reset email          |
| `POST` | `/forget-password-confirm` | Confirm a password reset with the token |

***

### User registration

MOGL supports four account types, each with its own multi-step onboarding flow.

<Tabs>
  <Tab title="Athlete">
    | Method | Path                                 | Description                  |
    | ------ | ------------------------------------ | ---------------------------- |
    | `POST` | `/athlete/register`                  | Create a new athlete account |
    | `POST` | `/athlete/update-registration-step2` | Set email and password       |
    | `POST` | `/athlete/update-registration-step4` | Set sport and university     |
    | `POST` | `/athlete/update-registration-step5` | Set personal information     |
    | `POST` | `/athlete/update-registration-step8` | Complete OTP verification    |
  </Tab>

  <Tab title="Partner">
    | Method | Path                                  | Description                        |
    | ------ | ------------------------------------- | ---------------------------------- |
    | `POST` | `/partner/register`                   | Create a new brand partner account |
    | `POST` | `/partner/update-registration-step2`  | Set email and password             |
    | `POST` | `/partner/update-registration-step3`  | Set company name                   |
    | `POST` | `/partner/update-registration-step4`  | Set business category              |
    | `POST` | `/partner/update-registration-step10` | Complete OTP verification          |
  </Tab>

  <Tab title="Agent">
    | Method | Path                               | Description                |
    | ------ | ---------------------------------- | -------------------------- |
    | `POST` | `/agent/register-new`              | Create a new agent account |
    | `POST` | `/agent/update-registration-step2` | Set email and password     |
    | `POST` | `/agent/update-registration-step3` | Set agency name            |
    | `POST` | `/agent/update-registration-step4` | Set LinkedIn profile       |
    | `POST` | `/agent/update-registration-step7` | Complete OTP verification  |
  </Tab>

  <Tab title="Fan">
    | Method | Path                             | Description                            |
    | ------ | -------------------------------- | -------------------------------------- |
    | `POST` | `/fan/register`                  | Create a new fan account               |
    | `POST` | `/fan/update-registration-step2` | Set email and password                 |
    | `POST` | `/fan/update-registration-step3` | Set name                               |
    | `POST` | `/fan/update-registration-step4` | Set university                         |
    | `POST` | `/fan/me`                        | Return the authenticated fan's profile |
  </Tab>
</Tabs>

Use `POST /check-email-exist` before starting registration to validate that the email address is not already taken.

***

### Athletes

Endpoints athletes use to manage their profile, search for partners, track deliverables, and interact with deal opportunities.

| Method | Path                                      | Description                                   |
| ------ | ----------------------------------------- | --------------------------------------------- |
| `POST` | `/searchAthleteV2`                        | Search and filter the athlete directory       |
| `POST` | `/getAthleteDetail`                       | Retrieve full athlete profile data            |
| `POST` | `/editAthleteWebsite`                     | Update the athlete's profile                  |
| `POST` | `/athleteDeliverablesV3`                  | List outstanding deliverables for a deal      |
| `POST` | `/athleteOverDueDeliverables`             | List overdue deliverables                     |
| `GET`  | `/athlete/jobs/{jobId}/download-contract` | Download a job contract PDF                   |
| `POST` | `/athlete/confirm-the-availability`       | Confirm availability for a hired job          |
| `POST` | `/athlete/not-available-for-deal`         | Decline a hired job                           |
| `POST` | `/athlete/request-new-due-date-for-deal`  | Request a deadline extension on a deliverable |

***

### Partners

Endpoints brand partners use to post jobs, review applicants, manage deliverables, and pay athletes.

| Method | Path                                                       | Description                                       |
| ------ | ---------------------------------------------------------- | ------------------------------------------------- |
| `POST` | `/partnerJobs`                                             | List all jobs posted by the partner               |
| `POST` | `/partnerGetJobApplicants`                                 | List applicants for a given job                   |
| `POST` | `/editPartnerWebsite`                                      | Update the partner's brand profile                |
| `POST` | `/partner/bulk-hiring`                                     | Hire multiple athletes for a job at once          |
| `POST` | `/partner/get-bulk-payment-summary`                        | Preview the total cost before bulk payment        |
| `POST` | `/partner/deny-athlete-deliverable/{milestonesAthleteRel}` | Reject a submitted deliverable                    |
| `POST` | `/partner/request-manual-review`                           | Escalate a job or deal for manual platform review |

#### Content library

Partners can access a library of all approved deliverable assets submitted against their campaigns.

| Method | Path                                        | Description                           |
| ------ | ------------------------------------------- | ------------------------------------- |
| `GET`  | `/partner/content/content-library/overview` | Summary stats for the content library |
| `POST` | `/partner/content/content-library`          | Paginated list of assets              |
| `POST` | `/partner/content/assets/{id}/download`     | Request a single asset download       |

#### Deliverable reports

| Method | Path                               | Description                          |
| ------ | ---------------------------------- | ------------------------------------ |
| `POST` | `/partner/deliverableReport`       | Full deliverable report with filters |
| `POST` | `/partner/deliverableReportExport` | Export report to CSV                 |

***

### Agents

Agents manage a roster of athletes, apply to jobs on their behalf, and handle billing through Stripe.

| Method | Path                                                       | Description                                     |
| ------ | ---------------------------------------------------------- | ----------------------------------------------- |
| `GET`  | `/agent/me`                                                | Return the authenticated agent's profile        |
| `PUT`  | `/agent`                                                   | Update the agent's profile                      |
| `POST` | `/agent/accept-contract`                                   | Accept the MOGL platform terms and contract     |
| `GET`  | `/agent/athletes`                                          | List athletes currently represented             |
| `POST` | `/agent/invite-athlete`                                    | Send an invitation to an athlete                |
| `POST` | `/agent/apply-athletes-to-job`                             | Apply one or more represented athletes to a job |
| `GET`  | `/agent/athlete-contracts`                                 | List all athlete contracts                      |
| `GET`  | `/agent/athlete/{athleteId}/job/{jobId}/download-contract` | Download a contract PDF                         |

#### Agent payment methods

| Method | Path                                                             | Description                    |
| ------ | ---------------------------------------------------------------- | ------------------------------ |
| `GET`  | `/agent/stripe/payment-methods`                                  | List saved payment methods     |
| `POST` | `/agent/stripe/payment-methods`                                  | Add a new payment method       |
| `POST` | `/agent/stripe/payment-methods/{paymentMethodId}/set-as-default` | Set the default payment method |
| `GET`  | `/agent/stripe/invoices`                                         | Retrieve billing invoices      |

***

### Jobs and deals

The Jobs group covers the full lifecycle of a NIL deal: creation, discovery, applications, hiring, deliverables, and contract management.

<Tip>
  Use `POST /add-job` to create a job, then `POST /inviteAthleteJobBulk` to invite athletes at scale. The `POST /athleteHire` endpoint moves an applicant into hired status and triggers contract generation.
</Tip>

| Method | Path                              | Description                          |
| ------ | --------------------------------- | ------------------------------------ |
| `POST` | `/add-job`                        | Create or edit a job                 |
| `POST` | `/searchJobV2`                    | Search and filter available jobs     |
| `POST` | `/getSelectedJob`                 | Retrieve details for a specific job  |
| `POST` | `/applyJob`                       | Apply to a job as an athlete         |
| `POST` | `/inviteAthleteJobBulk`           | Bulk invite athletes to a job        |
| `POST` | `/athleteHire`                    | Hire an athlete for a job            |
| `POST` | `/rejectAthletefromJob`           | Reject an applicant                  |
| `POST` | `/jobStatusChange`                | Update the status of a deliverable   |
| `POST` | `/submitMediaPost`                | Submit a media post as a deliverable |
| `GET`  | `/jobs/{jobId}/download-contract` | Download the job contract PDF        |
| `POST` | `/add-disclosed-job`              | Create or edit a disclosed NIL job   |

For the Deals group, use `POST /myDealsV2` to list all active deals for the authenticated user and `POST /myDealsCount` to retrieve status counts in a single call.

***

### Payments

MOGL uses Stripe for all payment processing. Athletes receive payouts through Stripe Express Connect accounts.

| Method | Path                        | Description                                           |
| ------ | --------------------------- | ----------------------------------------------------- |
| `POST` | `/submitStripePaymentsaved` | Pay an athlete using the partner's default saved card |
| `POST` | `/bulkPaymentRequest`       | Submit a bulk payment for multiple athletes           |
| `POST` | `/create_connect`           | Create a Stripe Connect account for an athlete        |
| `POST` | `/ConnectExpressAccount`    | Create a Stripe Express Connect account               |
| `GET`  | `/StripeAccountRetrieve`    | Check the status of a Connect account                 |
| `POST` | `/paymentHistoryAthlete`    | Retrieve an athlete's payment history                 |
| `POST` | `/paymentHistoryPartner`    | Retrieve a partner's payment history                  |
| `POST` | `/updatePayment`            | Update payout preference for athlete or agent         |

***

### Chat and messaging

| Method | Path                   | Description                               |
| ------ | ---------------------- | ----------------------------------------- |
| `POST` | `/sendMessage`         | Send a direct message                     |
| `POST` | `/sendMessageMass`     | Send a message to multiple recipients     |
| `POST` | `/fetchMessages`       | List chat contacts and conversations      |
| `POST` | `/fetchMessagesById`   | Load messages for a specific conversation |
| `POST` | `/chatMessageInitiate` | Start a new conversation                  |
| `POST` | `/pinUnpinMessage`     | Pin or unpin a message                    |

***

### Notifications

| Method | Path                              | Description                                     |
| ------ | --------------------------------- | ----------------------------------------------- |
| `POST` | `/fetchNotifications`             | Fetch in-app notifications for the current user |
| `POST` | `/updateReadNotification`         | Mark a notification as read                     |
| `POST` | `/updateReadNotificationAll`      | Mark all notifications as read                  |
| `GET`  | `/getMyNotificationPreference`    | Retrieve notification preferences               |
| `POST` | `/saveMyNotificationPreference`   | Save notification preferences                   |
| `POST` | `/updateAllSMSNotificationStatus` | Toggle all SMS notifications on or off          |

***

### Public endpoints

These endpoints do not require authentication and are used for public discovery, SEO, and guest browsing.

| Method | Path                   | Description                         |
| ------ | ---------------------- | ----------------------------------- |
| `POST` | `/searchAthletePublic` | Search athletes without logging in  |
| `POST` | `/athlete-directory`   | Browse the public athlete directory |
| `POST` | `/brand-directory`     | Browse the public brand directory   |
| `GET`  | `/site_config`         | Retrieve site configuration data    |
| `POST` | `/listColleges`        | List all colleges and universities  |

***

## Example: fetching your agent profile

<CodeGroup>
  ```bash curl theme={"dark"}
  curl -X GET https://api.mogl.online/api/agent/me \
    -H "Authorization: Bearer <your-token>" \
    -H "Accept: application/json"
  ```

  ```javascript javascript theme={"dark"}
  const response = await fetch('https://api.mogl.online/api/agent/me', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <your-token>',
      'Accept': 'application/json',
    },
  });
  const agent = await response.json();
  ```
</CodeGroup>

A successful response returns the agent profile object including agency name, contact details, Stripe account status, and represented athlete count.
