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

# API Reference

> The Seamind REST API for managing fleet, crew, training, and analytics

The Seamind API is a REST API built on FastAPI. All endpoints return JSON responses.

## Base URL

```
https://api.seamind.xyz
```

## Authentication

Most endpoints require a Bearer token. Include it in the `Authorization` header:

```
Authorization: Bearer <your-token>
```

Tokens are issued through SSO authentication via WorkOS.

## API structure

The API is organized into product-scoped namespaces:

| Namespace  | Prefix            | What it covers                                           |
| ---------- | ----------------- | -------------------------------------------------------- |
| **Shared** | `/api/v1/shared/` | Cross-product resources — users, ships, webhooks         |
| **Learn**  | `/api/v1/learn/`  | Training, courses, assignments, registrations, analytics |
| **Crew**   | `/api/v1/crew/`   | Crew profiles, documents, certificates, and verification |

Each namespace is gated by the matching product entitlement: an organization without the Crew product gets a `403` from `/api/v1/crew/*`.

### Shared endpoints

| Resource     | Prefix                     | Description                                        |
| ------------ | -------------------------- | -------------------------------------------------- |
| **Users**    | `/api/v1/shared/users/`    | Crew members and their profiles                    |
| **Ships**    | `/api/v1/shared/ships/`    | Manage vessels in your fleet                       |
| **Webhooks** | `/api/v1/shared/webhooks/` | WorkOS webhook handlers for SSO and directory sync |

### Learn endpoints

| Resource          | Prefix                         | Description                                        |
| ----------------- | ------------------------------ | -------------------------------------------------- |
| **Courses**       | `/api/v1/learn/courses/`       | Training modules with slides and quizzes           |
| **Curriculums**   | `/api/v1/learn/curriculums/`   | Programs — groups of courses                       |
| **Assignments**   | `/api/v1/learn/assignments/`   | Crew-ship placements with roles and dates          |
| **Registrations** | `/api/v1/learn/registrations/` | Training progress — one person, one course         |
| **xAPI**          | `/api/v1/learn/xapi/`          | Course launch URLs and learning record integration |
| **Analytics**     | `/api/v1/learn/analytics/`     | Learner performance metrics                        |
| **Admin**         | `/api/v1/learn/admin/`         | Dashboard stats and admin analytics                |

### Crew endpoints

| Resource               | Prefix                             | Description                                        |
| ---------------------- | ---------------------------------- | -------------------------------------------------- |
| **Profile**            | `/api/v1/crew/profile/`            | A crew member's profile and personal details       |
| **Identity documents** | `/api/v1/crew/identity-documents/` | Passports, visas, seaman's books, national IDs     |
| **Certificates**       | `/api/v1/crew/certificates/`       | Professional certificates with expiry tracking     |
| **Experience**         | `/api/v1/crew/experience/`         | Past employment history                            |
| **Next of kin**        | `/api/v1/crew/next-of-kin/`        | Emergency contacts                                 |
| **Verifications**      | `/api/v1/crew/verifications/`      | Verify or reject credentials; profile state rollup |
| **Roster**             | `/api/v1/crew/roster/`             | Office read-model of crew with verification status |

<Note>
  As new products launch (Watch, Guard, Assist), they will each get their own namespaced API under `/api/v1/{product}/`. See the full schema, request/response models, and a live playground in the reference pages.
</Note>

## Conventions

* **Pagination** — List endpoints accept `page` and `page_size` query parameters.
* **Search** — Most list endpoints accept a `search` query parameter for filtering by name or title.
* **IDs** — All resource IDs are UUIDs.
* **Dates** — ISO 8601 format (`2025-06-15T00:00:00Z`).
* **Errors** — Standard HTTP status codes with JSON error bodies.

<Tip>
  The API playground on each endpoint page lets you try requests directly. You'll need a valid Bearer token to authenticate.
</Tip>
