ChaosDraft API WikiOpenAPI v1

Rules, formats and legality

Wiki home · Practical examples · All endpoints · Exact schemas

Current access: first-party * key, plus source/field policy. A key with ask_ai can ask the assistant a rules or legality question, but it cannot call this family directly.

Comprehensive Rules and rulings

Operation Use
GET /v1/rules Browse rule hierarchy
GET /v1/rules/versions Available Comprehensive Rules versions
GET /v1/rules/search Search text by q, prefix or mode
GET /v1/rules/glossary Browse/search glossary terms
GET /v1/rules/glossary/{term} One glossary term
GET /v1/rules/{rule} Exact numbered rule and its stored text/provenance
GET /v1/cards/{oracle_id}/rulings Published rulings for a card
GET /v1/rulings/search Search card rulings

For a numbered rule, use the exact path identifier, for example /v1/rules/704.5. Rules support as_of and often version; search/list endpoints use limit/offset. Do not quote a rule when the response only establishes its identifier or version. A ruling has its own published date; do not confuse that with the request's as_of date.

curl -sS 'https://api.chaosdraft.com/v1/rules/704.5' \
  -H "Authorization: Bearer $CHAOSDRAFT_FIRST_PARTY_KEY"

Formats and their evidence

Operation Use
GET /v1/formats Known formats
GET /v1/formats/{format} Format definition and coverage
GET /v1/formats/{format}/sets Eligible set windows
GET /v1/formats/{format}/banlist Banned/restricted entries
GET /v1/formats/{format}/events Governing changes/events
GET /v1/formats/{format}/cards/{oracle_id} One card's format status

Use lowercase format identifiers such as standard or commander. Include as_of when you need a date-specific answer. The service retains evidence and coverage; it does not invent an effective date from a later observation. A missing historical coverage window must remain unknown rather than being labeled legal or illegal.

Batch and deck legality

POST /v1/legality/cards takes format and 1–500 card identifiers or exact-name objects. POST /v1/legality/decks takes format and a deck as text or structured sections. Both accept optional as_of. They are deterministic checks with sourced evidence, not model opinions.

curl -sS https://api.chaosdraft.com/v1/legality/cards \
  -H "Authorization: Bearer $CHAOSDRAFT_FIRST_PARTY_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"format":"standard","cards":[{"name":"Llanowar Elves"}]}'

Historical gaps may return 422 history_not_covered. For deck legality, inspect violation and warning details as well as the top-level result; partial card resolution or uncovered dates cannot be collapsed to a definitive pass. The OpenAPI schemas define the accepted structured deck sections and result evidence.