# Get submission spec

```http
GET /api/public/v1/competitions/acc/submission-spec
```

**Scope**: `competition.read`. An API key is required.

Returns the live TXT limits and submission window state.

## Response fields

| Field                     | Type and meaning                                                                                                                                                                |
| :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `kind`                    | `"acc-solutions"`.                                                                                                                                                              |
| `contractVersion`         | `string` — ACC API contract identifier for reference. Clients should not depend on a fixed value. |
| `limits.maxBodyBytes`     | Positive `integer` — Maximum UTF-8 bytes of the decoded `payload.text`, including BOM, comments, and line endings; excludes the JSON wrapper, JSON escaping overhead, and note. |
| `limits.maxSolutions`     | Positive `integer` — Maximum challenge lines in the TXT; excludes blank and comment-only lines.                                                                                 |
| `limits.maxNotesChars`    | Non-negative `integer` — Maximum Unicode code points in `meta.description` after trimming leading and trailing whitespace.                                                      |
| `limits.maxPathLength`    | Positive `integer` — Maximum moves per solution; violations become `E_PATH_TOO_LONG` per-solution results after admission.                                                      |
| `limits.dailySubmissions` | Positive `integer` — Accepted submission batches per team per UTC day, shared across the website and Public API. No remaining-count field is returned.                          |
| `problems`                | [ProblemSpec[]](#problemspec) — One entry for each problem, ordered `ac`, then `stable_ac`. |
| `submissionOpen`          | `boolean` — Competition lifecycle permits a submission now, independent of caller eligibility and remaining quota.                                                              |
| `submitBlockedReason`     | Human-readable `string` when closed; `null` when open.                                                                                                                          |

The four operational limits (`maxBodyBytes`, `maxSolutions`, `dailySubmissions`, `maxNotesChars`) can change. Each upload uses the values captured before its body is read. Changes do not reset used daily quota or alter accepted submissions. The path-length limit remains fixed.

Read these values immediately before a submission; do not hardcode the illustrative limits below. For caller eligibility, also read [Get my participation](./get-my-participation.md).

### ProblemSpec

All fields are required.

| Field | Type and meaning |
| :--- | :--- |
| `problem` | `"ac"` or `"stable_ac"` — Problem identifier. |
| `moveSpecHash` | `string` — Hash identifying the problem's move definitions, formatted as `sha256:` followed by 64 lowercase hexadecimal characters. |
| `maxMoveId` | Non-negative `integer` — Largest permitted move ID, inclusive. AC uses `13`; Stable AC uses `256`. Both start at `0`. |
| `maxRank` | Positive `integer` — Maximum group-presentation rank. AC remains at rank `2`; Stable AC permits ranks `0` through `8`. |

## Example request

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

curl "$SAIR_API_BASE/competitions/acc/submission-spec" \
  -H "Authorization: Bearer $SAIR_API_KEY"
```

## Example response

This is an illustrative open-window response, not a schedule announcement.

```json
{
  "ok": true,
  "data": {
    "kind": "acc-solutions",
    "contractVersion": "acc-discovery-v1",
    "limits": {
      "maxBodyBytes": 4194304,
      "maxSolutions": 500,
      "maxNotesChars": 2000,
      "maxPathLength": 100000,
      "dailySubmissions": 100
    },
    "problems": [
      {
        "problem": "ac",
        "moveSpecHash": "sha256:e13f57d82b5db1a79c1bd9d5ee1f6665ac4d96a634a3656ea20c0ada82e07643",
        "maxMoveId": 13,
        "maxRank": 2
      },
      {
        "problem": "stable_ac",
        "moveSpecHash": "sha256:27ecd0ebd4af39871cbfb23ecbd8be73710e85e04d8be788c1d81117d9f4b2b0",
        "maxMoveId": 256,
        "maxRank": 8
      }
    ],
    "submissionOpen": true,
    "submitBlockedReason": null
  }
}
```

## Errors

See [shared errors](../acc.md#shared-errors) for authentication, scope, availability, and configuration errors.
