# Get my participation

```http
GET /api/public/v1/competitions/lean-kernel-challenge/me
```

**Scope**: `competition.read`.

Returns the caller's enrollment, current effective entrant, formal-submission eligibility, active-candidate limit, and optional per-Problem Contributor Network capacity.

## Query parameters

| Parameter | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `problemId` | string | No | An `available` Problem returned by [List problems](./list-problems.md). When present, Contributor Network counts are scoped to that Problem. It does not change formal-submission eligibility. |

## Example request

```bash
export SAIR_API_BASE="https://api.sair.foundation/api/public/v1"

curl --get "$SAIR_API_BASE/competitions/lean-kernel-challenge/me" \
  --data-urlencode "problemId=fib" \
  -H "Authorization: Bearer $SAIR_API_KEY"
```

## Example response

The team identity, roster, candidate limit, and capacity values below illustrate the response shape. Use the live response.

```json
{
  "ok": true,
  "data": {
    "competitionId": "lean-kernel-challenge",
    "enrolled": true,
    "entrant": {
      "kind": "team",
      "id": "teamv2_19ac4fb862d64502ae7837852e18fb4a"
    },
    "team": {
      "teamId": "teamv2_19ac4fb862d64502ae7837852e18fb4a",
      "teamName": "Kernel Explorers",
      "teamNumber": "LKC01-T00003",
      "role": "member",
      "members": [
        {
          "userSairId": "U-owner",
          "name": "Team Owner",
          "email": "owner@example.com",
          "avatarUrl": null,
          "role": "owner"
        },
        {
          "userSairId": "U-member",
          "name": "API Client Owner",
          "email": "member@example.com",
          "avatarUrl": "https://cdn.example/member.png",
          "role": "member"
        }
      ]
    },
    "canSubmit": true,
    "submitBlockedReason": null,
    "activeCandidateLimit": 1,
    "contributorNetwork": {
      "capScope": "problem",
      "problemId": "fib",
      "activeItemIds": ["cn_example_1", "cn_example_2", "cn_other_kind"],
      "publishCap": 5,
      "activeCount": 2,
      "capRemaining": 3
    }
  }
}
```

## Response fields

### Participation and formal submission

| Field | Type and meaning |
| :--- | :--- |
| `competitionId` | `string` — Always `lean-kernel-challenge`. |
| `enrolled` | `boolean` — Whether the caller has completed enrollment. |
| `entrant` | `object \| null` — Current formal entrant. `kind` is `individual` or `team`; `id` is the caller's SAIR ID for an individual entrant and `team.teamId` for a team entrant. It is `null` when no effective entrant exists. |
| `team` | `object \| null` — Current active competition team and roster for a team entrant. It is `null` for an individual entrant or when the caller has no active team membership. |
| `canSubmit` | `boolean` — Whether the caller currently passes the formal-submission precheck. The write endpoint rechecks the same mutable conditions. |
| `submitBlockedReason` | `string \| null` — First unmet formal-submission requirement in the precedence documented below, or `null` when `canSubmit` is `true`. |
| `activeCandidateLimit` | `integer` — Maximum number of newest active formal candidates retained for the current entrant and each Problem. Read this value instead of assuming one. |

An individual entrant submits for themselves. Any active member of a team entrant may submit for that team; `team.role: "member"` does not block formal submission. The individual or team identified by `entrant` owns the submitted candidate.

### Team

| Field | Type and meaning |
| :--- | :--- |
| `teamId` | `string` — Stable team ID. It equals `entrant.id` when `entrant.kind` is `team`. |
| `teamName` | `string` — Current team name. It may be an empty string before a name is set. |
| `teamNumber` | `string \| null` — Public competition team number, when assigned. |
| `role` | `owner \| member` — Caller role in the current team. |
| `members` | `TeamMember[]` — Current active roster. The owner is first; other members follow in server-confirmed join order. Left or removed memberships are omitted. |

### TeamMember

| Field | Type and meaning |
| :--- | :--- |
| `userSairId` | `string` — Stable SAIR account ID. |
| `name` | `string` — Current member name. |
| `email` | `string` — Current member email address, visible only inside the authenticated team context. |
| `avatarUrl` | `string \| null` — Current custom avatar URL, when present. |
| `role` | `owner \| member` — This roster member's team role. Every active roster contains exactly one owner. |

### Contributor Network capacity

| Field | Type and meaning |
| :--- | :--- |
| `capScope` | `problem` — Capacity is counted independently for each caller, competition, and Problem. |
| `problemId` | `string \| null` — Problem selected by the query. |
| `activeItemIds` | `string[]` — IDs of all the caller's currently active Contributor Network items in this Competition. The array is not filtered by `problemId` or item kind. |
| `publishCap` | `integer` — Server-configured maximum number of active publications for each Problem. Clients must use the returned value. |
| `activeCount` | `integer` — Number of IDs in `activeItemIds` that are Lean Kernel packages for `problemId`; `0` when no Problem was selected. It can be smaller than `activeItemIds.length`. |
| `capRemaining` | `integer` — `max(publishCap - activeCount, 0)`. |

The capacity object is not a publication authorization decision. Publishing also requires current enrollment, an owned saved Solution at the exact revision, a writable Playground lifecycle, a confirmed manifest, no active publication for that Solution, and a valid idempotency key. Contributor Network capacity does not affect `canSubmit`.

## Formal-submission blockers

The service returns the first applicable blocker in this order:

| `submitBlockedReason` | Meaning |
| :--- | :--- |
| `EMAIL_NOT_VERIFIED` | Verify the account email address. |
| `ENROLL_REQUIRED` | Complete competition enrollment. |
| `TEAM_REQUIRED` | No current effective entrant is available. Restore the individual participation or active team required by the competition. |
| `SUBMISSION_WINDOW_NOT_OPEN` | The formal submission window has not opened or is not configured. |
| `SUBMISSION_WINDOW_CLOSED` | The formal submission window or competition is closed. |

`canSubmit` concerns formal submission only. It does not mean that Playground writes or Contributor Network publication are currently allowed.

## Errors

| HTTP | Code | When |
| :---: | :--- | :--- |
| `422` | `RESOURCE_FIELD_INVALID` | `problemId` is blank, unknown, or unavailable. |
| `404` | `NOT_FOUND` | The competition does not exist or is not publicly visible. |
| `502` | `PLATFORM_UNAVAILABLE` | The participant-context authority is temporarily unavailable. |
| `502` | `PLATFORM_RESPONSE_INVALID` | The participant-context authority returned an invalid response. |

See [Errors](../../../errors.md) for shared authentication, scope, and rate-limit errors.
