{"openapi":"3.1.0","info":{"title":"Diurna API","version":"1.0.0","description":"Diurna API v1 is the stable customer contract for search, statutes, bills, the Code of Federal Regulations, members, follows, the change feed, webhooks, evidence packets, and corpus research jobs.\n\nPaths under /api/v1 are canonical. The same resources remain at the unversioned /api paths, which are deprecated aliases.\n\nAlias responses send Deprecation: @1792540800 (21 Oct 2026), Sunset: Thu, 21 Oct 2027 00:00:00 GMT, and a Link to the v1 successor plus /developers/api#deprecation.\n\nSend X-Api-Key on routes that require an account. Responses include RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, and RateLimit-Policy. A policy named \"key\" is that API key's own window.\n\nA v1 response field added, removed, or retyped is a breaking change and needs a new version."},"servers":[{"url":"https://trydiurna.com","description":"Production"}],"tags":[{"name":"Search"},{"name":"Extraction"},{"name":"Statutes"},{"name":"Bills"},{"name":"Regulations"},{"name":"Members"},{"name":"Follows"},{"name":"Change feed"},{"name":"Webhooks"},{"name":"Evidence"},{"name":"Usage"},{"name":"Research"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{"HighlightsResponse":{"type":"object","properties":{"format":{"type":"string","enum":["highlights"]},"excerpts":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"document_id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr"]},"title":{"type":["string","null"]},"jurisdiction":{"type":"string"},"text":{"type":"string","minLength":1}},"required":["citation","source_url","document_id","doc_type","title","jurisdiction","text"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"},"disclaimer":{"type":"string"},"truncated":{"type":"boolean"}},"required":["format","excerpts","disclaimer","truncated"],"description":"Official excerpts for format=highlights. Omit format, fields, and max_tokens for the full record."},"CitedAnswer":{"type":"object","properties":{"format":{"type":"string","enum":["answer"]},"kind":{"type":"string","enum":["answer","unsupported"]},"answer":{"type":"string"},"citations":{"type":"array","items":{"type":"object","properties":{"number":{"type":"integer","exclusiveMinimum":0},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"document_id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr"]},"title":{"type":["string","null"]},"quote":{"type":"string"}},"required":["number","citation","source_url","document_id","doc_type","title","quote"]}},"disclaimer":{"type":"string"},"truncated":{"type":"boolean"}},"required":["format","kind","answer","citations","disclaimer","truncated"],"description":"Short cited answer for format=answer. Each quote is loaded official text. Omit format for the full record."}},"parameters":{}},"paths":{"/api/v1/search":{"get":{"tags":["Search"],"summary":"Search laws","description":"Full-text search over loaded statutes, bills, ordinances, session laws, executive orders, court opinions, and Code of Federal Regulations sections. Filter by jurisdiction code, government level (state, county, city), document category (code, ordinance, bill, opinion, regulation), document type, bill sponsor, issuing agency, or legislative session. Every hit includes citation and source_url. Set include_text=true to return official body text in each hit without a follow-up read. format=highlights returns official excerpts (HighlightsResponse). format=answer returns a short cited answer (CitedAnswer). fields and max_tokens shorten the body. Omit format, fields, and max_tokens for the full page.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Search text with AND, OR, NOT, quoted phrases, parentheses, and NEAR/n proximity. Saved alerts use the same syntax. The MCP field name is query. The API rejects queries shorter than three characters, except two-letter catalog jurisdiction codes such as WA or RI."},"required":true,"description":"Search text with AND, OR, NOT, quoted phrases, parentheses, and NEAR/n proximity. Saved alerts use the same syntax. The MCP field name is query. The API rejects queries shorter than three characters, except two-letter catalog jurisdiction codes such as WA or RI.","name":"q","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","enum":["state","county","city"]},"required":false,"name":"level","in":"query"},{"schema":{"type":"string","enum":["code","ordinance","bill","opinion","regulation"],"description":"One search category. Mutually exclusive with categories and type parameters."},"required":false,"description":"One search category. Mutually exclusive with categories and type parameters.","name":"category","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Comma-separated search categories (code, ordinance, bill, opinion, regulation)."},"required":false,"description":"Comma-separated search categories (code, ordinance, bill, opinion, regulation).","name":"categories","in":"query"},{"schema":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"],"description":"One document type. Mutually exclusive with types and categories."},"required":false,"description":"One document type. Mutually exclusive with types and categories.","name":"type","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Comma-separated document types. Mutually exclusive with type and categories."},"required":false,"description":"Comma-separated document types. Mutually exclusive with type and categories.","name":"types","in":"query"},{"schema":{"type":"string","enum":["relevance","newest","citation"]},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"},{"schema":{"type":["boolean","null"],"default":false,"description":"When true, each hit includes official body text in body, capped by text_max_chars and plan limits."},"required":false,"description":"When true, each hit includes official body text in body, capped by text_max_chars and plan limits.","name":"include_text","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50000,"description":"Per-result character cap when include_text is true. Defaults to the caller plan cap."},"required":false,"description":"Per-result character cap when include_text is true. Defaults to the caller plan cap.","name":"text_max_chars","in":"query"},{"schema":{"type":"string","enum":["highlights","answer"],"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record."},"required":false,"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record.","name":"format","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them."},"required":false,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them.","name":"fields","in":"query"},{"schema":{"type":"integer","minimum":16,"maximum":8000,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept."},"required":false,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept.","name":"max_tokens","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Bill sponsor name filter."},"required":false,"description":"Bill sponsor name filter.","name":"sponsor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Issuing agency filter for CFR sections."},"required":false,"description":"Issuing agency filter for CFR sections.","name":"agency","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Legislative session filter for bills."},"required":false,"description":"Legislative session filter for bills.","name":"session","in":"query"}],"responses":{"200":{"description":"A page of search hits.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"results":[{"doc_type":"section","document_id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","snippet":"Assault in the first degree.","jurisdiction":"WA","rrf_score":0.82,"status":"enacted","statusLabel":"In force","lifecycle_status":"effective","status_raw":null,"next_event":null,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"}],"next_cursor":null,"has_more":false,"facets":[{"key":"section","label":"Statutes","count":1}],"total":{"exact":true,"value":1},"coverageState":"covered","source_warnings":[]},"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"document_id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"snippet":{"type":["string","null"]},"body":{"type":["string","null"]},"jurisdiction":{"type":"string"},"rrf_score":{"type":"number"},"status":{"type":"string","enum":["enacted","pending","failed-repealed","historical","unknown"]},"statusLabel":{"type":"string"},"lifecycle_status":{"type":"string","enum":["introduced","in_committee","passed_one_chamber","passed_both","enacted","vetoed","failed_or_dead","proposed_rule","comment_period_open","final_rule","effective","decided","other"]},"status_raw":{"type":["string","null"]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"latestAction":{"type":["string","null"]},"relevantDate":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["doc_type","document_id","title","snippet","jurisdiction","rrf_score","lifecycle_status","status_raw","next_event","citation","source_url"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"},"facets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["key","label","count"]},"default":[]},"total":{"anyOf":[{"type":"object","properties":{"exact":{"type":"boolean","enum":[true]},"value":{"type":"integer","minimum":0}},"required":["exact","value"]},{"type":"object","properties":{"exact":{"type":"boolean","enum":[false]},"shown":{"type":"integer","minimum":0}},"required":["exact","shown"]}],"default":{"exact":false,"shown":0}},"coverageState":{"type":"string","enum":["covered","not_covered","error"],"default":"covered"},"source_warnings":{"type":"array","items":{"type":"object","properties":{"supported":{"type":"boolean"},"status":{"type":"string","enum":["working","delayed","partial","unavailable","not monitored"]},"jurisdiction":{"type":"string"},"document_class":{"type":"string"},"issuing_body":{"type":["string","null"]},"source_url":{"type":["string","null"]},"message":{"type":"string"},"source":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"code":{"type":"string","enum":["timeout","unavailable"]},"incomplete":{"type":"boolean"}},"required":["supported","status","jurisdiction","document_class","issuing_body","source_url","message"]},"default":[]}},"required":["results","next_cursor","has_more"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/extract":{"post":{"tags":["Extraction"],"summary":"Extract structured fields","description":"Extract fields from Diurna sections, bills, and ordinances. Send a JSON schema plus document ids or a search query. A search reads the first five matching sections, bills, or ordinances. Each value is an exact span of loaded Diurna text and includes the source section plus character indexes into that text window. String, number, and boolean fields match a line labeled with the property name or title. Enum values match the official wording. When a model is configured, a quote is kept only when it is copied exactly and sits beside its label or equals an enum value. Text that is not in the loaded document is dropped. Requires X-Api-Key.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"example":{"schema":{"type":"object","properties":{"effective_date":{"type":"string","title":"Effective date"},"status":{"type":"string","enum":["enacted","pending"]}},"required":["effective_date"]},"documents":[{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050"}]},"schema":{"type":"object","properties":{"schema":{"description":"JSON Schema object for the fields to extract."},"documents":{"type":"array","items":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","bill","ordinance"]},"id":{"type":"string","format":"uuid"}},"required":["doc_type","id"],"additionalProperties":false},"minItems":1,"maxItems":8,"description":"Diurna section, bill, or ordinance ids."},"query":{"type":"string","minLength":1,"maxLength":500,"description":"Search text. The first five matching sections, bills, or ordinances are read."},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Grounded fields and the documents they were read from.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"documents":[{"doc_type":"section","document_id":"00000000-0000-4000-8000-000000000050","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","section":"Assault in the first degree","jurisdiction":"WA","text_offset":0,"text_truncated":false}],"data":{"effective_date":"2020-06-11","status":"enacted"},"fields":[{"path":"effective_date","value":"2020-06-11","source":{"doc_type":"section","document_id":"00000000-0000-4000-8000-000000000050","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","section":"Assault in the first degree","span":{"start":16,"end":26},"quote":"2020-06-11","text_offset":0}},{"path":"status","value":"enacted","source":{"doc_type":"section","document_id":"00000000-0000-4000-8000-000000000050","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","section":"Assault in the first degree","span":{"start":40,"end":47},"quote":"enacted","text_offset":0}}],"missing":[],"mode":"extractive","dropped_quotes":0,"note":null},"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","bill","ordinance"]},"document_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"section":{"type":"string","minLength":1},"jurisdiction":{"type":"string","minLength":1},"text_offset":{"type":"integer","minimum":0},"text_truncated":{"type":"boolean"}},"required":["doc_type","document_id","citation","source_url","section","jurisdiction","text_offset","text_truncated"],"additionalProperties":false}},"data":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}]}}]}},"fields":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]},"source":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","bill","ordinance"]},"document_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"section":{"type":"string","minLength":1},"span":{"type":"object","properties":{"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0}},"required":["start","end"],"additionalProperties":false},"quote":{"type":"string","minLength":1},"text_offset":{"type":"integer","minimum":0}},"required":["doc_type","document_id","citation","source_url","section","span","quote","text_offset"],"additionalProperties":false}},"required":["path","value","source"],"additionalProperties":false}},"missing":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["extractive","model"]},"dropped_quotes":{"type":"integer","minimum":0},"note":{"type":["string","null"]}},"required":["documents","data","fields","missing","mode","dropped_quotes","note"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sections":{"get":{"tags":["Statutes"],"summary":"Get a statute by citation","description":"Looks up one code section by official citation. format=highlights returns official excerpts (HighlightsResponse). format=answer returns a short cited answer (CitedAnswer). q chooses the excerpts. Omit format, fields, and max_tokens for the full section. Pass diff_from as a version id or YYYY-MM-DD date to include a unified text diff and changes to effective date, status, title, and citations.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"name":"citation","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Terms used to choose excerpts when format is highlights or answer."},"required":false,"description":"Terms used to choose excerpts when format is highlights or answer.","name":"q","in":"query"},{"schema":{"type":"string","enum":["highlights","answer"],"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record."},"required":false,"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record.","name":"format","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them."},"required":false,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them.","name":"fields","in":"query"},{"schema":{"type":"integer","minimum":16,"maximum":8000,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept."},"required":false,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept.","name":"max_tokens","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations."},"required":false,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations.","name":"diff_from","in":"query"}],"responses":{"200":{"description":"The statute record.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","heading":"Assault in the first degree","jurisdiction":"WA","session":null,"status":"enacted","lifecycle_status":"effective","status_raw":null,"next_event":null,"is_active":true,"text":"Assault in the first degree.\n\n(1) A person is guilty of assault in the first degree if he or she, with intent to inflict great bodily harm:\n(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n(b) Transmits HIV to a child or vulnerable adult; or\n(c) Administers, exposes, or transmits to or causes to be taken by another, poison or any other destructive or noxious substance; or\n(d) Assaults another and inflicts great bodily harm.\n(2) Assault in the first degree is a class A felony.\n\n[ 2020 c 76 s 16; 1997 c 196 s 1; 1986 c 257 s 4.]\n\nNotes:\nSeverability—1986 c 257: See note following RCW 9A.56.010.\nEffective date—1986 c 257 ss 3-10: See note following RCW 9A.04.110.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000051","latest_ingested_version_id":"00000000-0000-4000-8000-000000000051","ingested_at":"2026-10-20T18:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"},"schema":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"heading":{"type":["string","null"]},"jurisdiction":{"type":"string"},"session":{"type":["string","null"]},"status":{"type":["string","null"]},"lifecycle_status":{"type":"string","enum":["introduced","in_committee","passed_one_chamber","passed_both","enacted","vetoed","failed_or_dead","proposed_rule","comment_period_open","final_rule","effective","decided","other"]},"status_raw":{"type":["string","null"]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"is_active":{"type":["boolean","null"]},"text":{"type":["string","null"]},"stored_text_utf8_bytes":{"type":["integer","null"],"minimum":0},"text_truncated":{"type":"boolean"},"text_offset":{"type":"integer","minimum":0},"next_text_offset":{"type":["integer","null"]},"current_version_id":{"type":["string","null"],"format":"uuid"},"latest_ingested_version_id":{"type":["string","null"],"format":"uuid"},"ingested_at":{"type":["string","null"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fetched_at":{"type":["string","null"]},"effective_date":{"type":["string","null"]},"effective_end_date":{"type":["string","null"]},"version_code":{"type":["string","null"]},"content_hash":{"type":["string","null"]},"text_preview":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["id","fetched_at","effective_date","effective_end_date","version_code","content_hash","text_preview","citation","source_url"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"},"diff":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false},"issuer":{"type":["string","null"]},"office":{"type":["string","null"],"enum":["president","governor","mayor"]},"instrument":{"type":["string","null"],"enum":["executive_order","proclamation","memorandum"]},"order_number":{"type":["string","null"]},"signed_date":{"type":["string","null"]},"publication_date":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["doc_type","id","title","heading","jurisdiction","session","status","lifecycle_status","status_raw","next_event","is_active","text","text_truncated","text_offset","next_text_offset","current_version_id","latest_ingested_version_id","ingested_at","versions","next_cursor","has_more","citation","source_url"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sections/{id}":{"get":{"tags":["Statutes"],"summary":"Get a statute by id","description":"One code section by id. format=highlights returns official excerpts (HighlightsResponse). format=answer returns a short cited answer (CitedAnswer). q chooses the excerpts. Omit format, fields, and max_tokens for the full section. Pass diff_from as a version id or YYYY-MM-DD date to include a unified text diff and changes to effective date, status, title, and citations.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations."},"required":false,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations.","name":"diff_from","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Terms used to choose excerpts when format is highlights or answer."},"required":false,"description":"Terms used to choose excerpts when format is highlights or answer.","name":"q","in":"query"},{"schema":{"type":"string","enum":["highlights","answer"],"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record."},"required":false,"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record.","name":"format","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them."},"required":false,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them.","name":"fields","in":"query"},{"schema":{"type":"integer","minimum":16,"maximum":8000,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept."},"required":false,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept.","name":"max_tokens","in":"query"}],"responses":{"200":{"description":"The statute record.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","heading":"Assault in the first degree","jurisdiction":"WA","session":null,"status":"enacted","lifecycle_status":"effective","status_raw":null,"next_event":null,"is_active":true,"text":"Assault in the first degree.\n\n(1) A person is guilty of assault in the first degree if he or she, with intent to inflict great bodily harm:\n(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n(b) Transmits HIV to a child or vulnerable adult; or\n(c) Administers, exposes, or transmits to or causes to be taken by another, poison or any other destructive or noxious substance; or\n(d) Assaults another and inflicts great bodily harm.\n(2) Assault in the first degree is a class A felony.\n\n[ 2020 c 76 s 16; 1997 c 196 s 1; 1986 c 257 s 4.]\n\nNotes:\nSeverability—1986 c 257: See note following RCW 9A.56.010.\nEffective date—1986 c 257 ss 3-10: See note following RCW 9A.04.110.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000051","latest_ingested_version_id":"00000000-0000-4000-8000-000000000051","ingested_at":"2026-10-20T18:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"},"schema":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"heading":{"type":["string","null"]},"jurisdiction":{"type":"string"},"session":{"type":["string","null"]},"status":{"type":["string","null"]},"lifecycle_status":{"type":"string","enum":["introduced","in_committee","passed_one_chamber","passed_both","enacted","vetoed","failed_or_dead","proposed_rule","comment_period_open","final_rule","effective","decided","other"]},"status_raw":{"type":["string","null"]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"is_active":{"type":["boolean","null"]},"text":{"type":["string","null"]},"stored_text_utf8_bytes":{"type":["integer","null"],"minimum":0},"text_truncated":{"type":"boolean"},"text_offset":{"type":"integer","minimum":0},"next_text_offset":{"type":["integer","null"]},"current_version_id":{"type":["string","null"],"format":"uuid"},"latest_ingested_version_id":{"type":["string","null"],"format":"uuid"},"ingested_at":{"type":["string","null"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fetched_at":{"type":["string","null"]},"effective_date":{"type":["string","null"]},"effective_end_date":{"type":["string","null"]},"version_code":{"type":["string","null"]},"content_hash":{"type":["string","null"]},"text_preview":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["id","fetched_at","effective_date","effective_end_date","version_code","content_hash","text_preview","citation","source_url"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"},"diff":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false},"issuer":{"type":["string","null"]},"office":{"type":["string","null"],"enum":["president","governor","mayor"]},"instrument":{"type":["string","null"],"enum":["executive_order","proclamation","memorandum"]},"order_number":{"type":["string","null"]},"signed_date":{"type":["string","null"]},"publication_date":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["doc_type","id","title","heading","jurisdiction","session","status","lifecycle_status","status_raw","next_event","is_active","text","text_truncated","text_offset","next_text_offset","current_version_id","latest_ingested_version_id","ingested_at","versions","next_cursor","has_more","citation","source_url"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sections/{id}/timeline":{"get":{"tags":["Statutes"],"summary":"Statute version timeline","description":"Chronological list of stored section versions with links to session law, bill, legislative history, citing opinions, and consecutive compare hrefs when data exists. Requires X-Api-Key and a plan that includes redlines and version compare.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Section timeline.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"section_id":"00000000-0000-4000-8000-000000000050","citation":"RCW 9A.36.011","current_version_id":"00000000-0000-4000-8000-000000000051","entries":[],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"current_version_id":{"type":["string","null"],"format":"uuid"},"entries":{"type":"array","items":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"},"effective_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"fetched_at":{"type":["string","null"],"format":"date-time"},"amendment_type":{"type":["string","null"]},"amending_citation":{"type":["string","null"]},"snapshot_kind":{"type":"string","enum":["version","yearly_snapshot"]},"previous_version_id":{"type":["string","null"],"format":"uuid"},"session_law":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"source_url":{"type":["string","null"],"minLength":8,"maxLength":2000},"reader_href":{"type":"string","minLength":1,"maxLength":500}},"required":["id","citation","source_url","reader_href"],"additionalProperties":false},"bill":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"source_url":{"type":["string","null"],"minLength":8,"maxLength":2000},"reader_href":{"type":"string","minLength":1,"maxLength":500}},"required":["id","citation","source_url","reader_href"],"additionalProperties":false},"legislative_history":{"type":["object","null"],"properties":{"development_id":{"type":"string","format":"uuid"},"event_type":{"type":"string","minLength":1,"maxLength":50},"evidence_href":{"type":"string","minLength":1,"maxLength":500}},"required":["development_id","event_type","evidence_href"],"additionalProperties":false},"citing_opinions":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1,"maxLength":500},"source_url":{"type":"string","minLength":8,"maxLength":2000},"case_name":{"type":["string","null"]},"court":{"type":["string","null"]},"as_of":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["citation","source_url","case_name","court","as_of"],"additionalProperties":false}},"reader_href":{"type":"string","minLength":1,"maxLength":500},"compare_href":{"type":["string","null"],"minLength":1,"maxLength":500},"redline":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"bill_id":{"type":["string","null"],"format":"uuid"},"reader_href":{"type":"string","minLength":1,"maxLength":500}},"required":["id","bill_id","reader_href"],"additionalProperties":false}},"required":["version_id","effective_date","fetched_at","amendment_type","amending_citation","snapshot_kind","previous_version_id","session_law","bill","legislative_history","citing_opinions","reader_href","compare_href","redline"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["section_id","citation","current_version_id","entries","next_cursor","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sections/batch":{"post":{"tags":["Statutes"],"summary":"Batch-fetch code sections","description":"Fetch up to 100 sections by section_id or citation. Returns each record and per-item errors. Omit async for synchronous responses on small lists. Set async to queue a job, then poll GET /api/v1/sections/batch/{id}. Results are kept for 24 hours. Optional webhook_id sends signed started and completed events. Requires X-Api-Key. Metering counts each item. POST /api/v1/usage/preview quotes the published plan price before the batch runs and does not start the job.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"minItems":1,"maxItems":100},"async":{"type":"boolean"},"webhook_id":{"type":"string","format":"uuid"},"max_text_length":{"type":"integer","minimum":1,"maximum":50000,"default":50000}},"required":["items"],"additionalProperties":false}}}},"responses":{"200":{"description":"Synchronous batch result.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"status":"completed","total":1,"completed":1,"items":[{"index":0,"input":{"citation":"RCW 9A.36.011","jurisdiction":"WA"},"section":{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","heading":"Assault in the first degree","jurisdiction":"WA","session":null,"status":"enacted","lifecycle_status":"effective","status_raw":null,"next_event":null,"is_active":true,"text":"Assault in the first degree.\n\n(1) A person is guilty of assault in the first degree if he or she, with intent to inflict great bodily harm:\n(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n(b) Transmits HIV to a child or vulnerable adult; or\n(c) Administers, exposes, or transmits to or causes to be taken by another, poison or any other destructive or noxious substance; or\n(d) Assaults another and inflicts great bodily harm.\n(2) Assault in the first degree is a class A felony.\n\n[ 2020 c 76 s 16; 1997 c 196 s 1; 1986 c 257 s 4.]\n\nNotes:\nSeverability—1986 c 257: See note following RCW 9A.56.010.\nEffective date—1986 c 257 ss 3-10: See note following RCW 9A.04.110.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000051","latest_ingested_version_id":"00000000-0000-4000-8000-000000000051","ingested_at":"2026-10-20T18:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"}}],"errors":[]},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["index","input","code","message"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"section":{"type":"object","additionalProperties":{}}},"required":["index","input","section"],"additionalProperties":false}},"expires_at":{"type":"string","format":"date-time"},"download_url":{"type":"string","format":"uri"}},"required":["status","total","completed","errors","items"],"additionalProperties":false}}}},"202":{"description":"Queued batch job.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"status":"pending","total":1,"completed":1,"items":[],"errors":[],"id":"11111111-1111-4111-8111-111111111111","expires_at":"2026-10-29T00:00:00.000Z"},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["index","input","code","message"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"section":{"type":"object","additionalProperties":{}}},"required":["index","input","section"],"additionalProperties":false}},"expires_at":{"type":"string","format":"date-time"},"download_url":{"type":"string","format":"uri"}},"required":["status","total","completed","errors","items"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sections/batch/{id}":{"get":{"tags":["Statutes"],"summary":"Poll a batch section job","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Batch job status and results.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"status":"completed","total":1,"completed":1,"items":[{"index":0,"input":{"citation":"RCW 9A.36.011","jurisdiction":"WA"},"section":{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","heading":"Assault in the first degree","jurisdiction":"WA","session":null,"status":"enacted","lifecycle_status":"effective","status_raw":null,"next_event":null,"is_active":true,"text":"Assault in the first degree.\n\n(1) A person is guilty of assault in the first degree if he or she, with intent to inflict great bodily harm:\n(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n(b) Transmits HIV to a child or vulnerable adult; or\n(c) Administers, exposes, or transmits to or causes to be taken by another, poison or any other destructive or noxious substance; or\n(d) Assaults another and inflicts great bodily harm.\n(2) Assault in the first degree is a class A felony.\n\n[ 2020 c 76 s 16; 1997 c 196 s 1; 1986 c 257 s 4.]\n\nNotes:\nSeverability—1986 c 257: See note following RCW 9A.56.010.\nEffective date—1986 c 257 ss 3-10: See note following RCW 9A.04.110.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000051","latest_ingested_version_id":"00000000-0000-4000-8000-000000000051","ingested_at":"2026-10-20T18:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"}}],"errors":[]},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["index","input","code","message"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"section":{"type":"object","additionalProperties":{}}},"required":["index","input","section"],"additionalProperties":false}},"expires_at":{"type":"string","format":"date-time"},"download_url":{"type":"string","format":"uri"}},"required":["status","total","completed","errors","items"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Statutes"],"summary":"Cancel a batch section job","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled job snapshot.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"status":"cancelled","total":1,"completed":1,"items":[{"index":0,"input":{"citation":"RCW 9A.36.011","jurisdiction":"WA"},"section":{"doc_type":"section","id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","heading":"Assault in the first degree","jurisdiction":"WA","session":null,"status":"enacted","lifecycle_status":"effective","status_raw":null,"next_event":null,"is_active":true,"text":"Assault in the first degree.\n\n(1) A person is guilty of assault in the first degree if he or she, with intent to inflict great bodily harm:\n(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n(b) Transmits HIV to a child or vulnerable adult; or\n(c) Administers, exposes, or transmits to or causes to be taken by another, poison or any other destructive or noxious substance; or\n(d) Assaults another and inflicts great bodily harm.\n(2) Assault in the first degree is a class A felony.\n\n[ 2020 c 76 s 16; 1997 c 196 s 1; 1986 c 257 s 4.]\n\nNotes:\nSeverability—1986 c 257: See note following RCW 9A.56.010.\nEffective date—1986 c 257 ss 3-10: See note following RCW 9A.04.110.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000051","latest_ingested_version_id":"00000000-0000-4000-8000-000000000051","ingested_at":"2026-10-20T18:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"}}],"errors":[]},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["index","input","code","message"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"input":{"type":"object","properties":{"section_id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":500},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"}},"additionalProperties":false},"section":{"type":"object","additionalProperties":{}}},"required":["index","input","section"],"additionalProperties":false}},"expires_at":{"type":"string","format":"date-time"},"download_url":{"type":"string","format":"uri"}},"required":["status","total","completed","errors","items"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/exports/jurisdiction":{"post":{"tags":["Exports"],"summary":"Export a jurisdiction corpus","description":"Queue a JSONL export of loaded code sections for one jurisdiction. Optional code_name or title_number narrows the export. Poll GET /api/v1/exports/jurisdiction/{id} for a presigned download URL. Optional webhook_id sends signed completion events. Requires X-Api-Key. POST /api/v1/usage/preview quotes the published plan price before the export runs and does not start the job.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"code_name":{"type":"string","minLength":1,"maxLength":120},"title_number":{"type":"string","minLength":1,"maxLength":40},"webhook_id":{"type":"string","format":"uuid"}},"required":["jurisdiction"],"additionalProperties":false}}}},"responses":{"202":{"description":"Queued export job.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","status":"completed","jurisdiction":"WA","code_name":"RCW","title_number":null,"line_count":1200,"byte_count":450000,"download_url":"https://example.com/presigned-export","expires_at":"2026-10-29T00:00:00.000Z","last_error":null},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"jurisdiction":{"type":"string","minLength":1},"code_name":{"type":["string","null"]},"title_number":{"type":["string","null"]},"line_count":{"type":["integer","null"],"minimum":0},"byte_count":{"type":["integer","null"],"minimum":0},"download_url":{"type":["string","null"],"format":"uri"},"expires_at":{"type":"string","format":"date-time"},"last_error":{"type":["string","null"]}},"required":["id","status","jurisdiction","code_name","title_number","line_count","byte_count","download_url","expires_at","last_error"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/exports/jurisdiction/{id}":{"get":{"tags":["Exports"],"summary":"Poll a jurisdiction export job","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Export job status.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","status":"completed","jurisdiction":"WA","code_name":"RCW","title_number":null,"line_count":1200,"byte_count":450000,"download_url":"https://example.com/presigned-export","expires_at":"2026-10-29T00:00:00.000Z","last_error":null},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"jurisdiction":{"type":"string","minLength":1},"code_name":{"type":["string","null"]},"title_number":{"type":["string","null"]},"line_count":{"type":["integer","null"],"minimum":0},"byte_count":{"type":["integer","null"],"minimum":0},"download_url":{"type":["string","null"],"format":"uri"},"expires_at":{"type":"string","format":"date-time"},"last_error":{"type":["string","null"]}},"required":["id","status","jurisdiction","code_name","title_number","line_count","byte_count","download_url","expires_at","last_error"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Exports"],"summary":"Cancel a jurisdiction export job","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Cancelled export job.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","status":"cancelled","jurisdiction":"WA","code_name":"RCW","title_number":null,"line_count":1200,"byte_count":450000,"download_url":"https://example.com/presigned-export","expires_at":"2026-10-29T00:00:00.000Z","last_error":null},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"jurisdiction":{"type":"string","minLength":1},"code_name":{"type":["string","null"]},"title_number":{"type":["string","null"]},"line_count":{"type":["integer","null"],"minimum":0},"byte_count":{"type":["integer","null"],"minimum":0},"download_url":{"type":["string","null"],"format":"uri"},"expires_at":{"type":"string","format":"date-time"},"last_error":{"type":["string","null"]}},"required":["id","status","jurisdiction","code_name","title_number","line_count","byte_count","download_url","expires_at","last_error"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/bills":{"get":{"tags":["Bills"],"summary":"List bills","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of bills.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"bills":[{"id":"00000000-0000-4000-8000-000000000020","title":"Addressing service of notice by mail in cases involving forcible entry and forcible and unlawful detainer","status":"signed","jurisdiction":"WA","session":"2025-26","citation":"HB 1003","source_url":"https://app.leg.wa.gov/billsummary?BillNumber=1003&Year=2025"}],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"bills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"status":{"type":["string","null"]},"jurisdiction":{"type":"string"},"session":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["id","title","status","jurisdiction","session","citation","source_url"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["bills","next_cursor","has_more"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/bills/{id}":{"get":{"tags":["Bills"],"summary":"Get a bill","description":"One bill by id. format=highlights returns official excerpts (HighlightsResponse). format=answer returns a short cited answer (CitedAnswer). q chooses the excerpts. Omit format, fields, and max_tokens for the full bill. Pass diff_from as a version id or YYYY-MM-DD date to include a unified text diff and changes to effective date, status, title, and citations.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations."},"required":false,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations.","name":"diff_from","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Terms used to choose excerpts when format is highlights or answer."},"required":false,"description":"Terms used to choose excerpts when format is highlights or answer.","name":"q","in":"query"},{"schema":{"type":"string","enum":["highlights","answer"],"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record."},"required":false,"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record.","name":"format","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them."},"required":false,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them.","name":"fields","in":"query"},{"schema":{"type":"integer","minimum":16,"maximum":8000,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept."},"required":false,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept.","name":"max_tokens","in":"query"}],"responses":{"200":{"description":"The bill record.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"doc_type":"bill","id":"00000000-0000-4000-8000-000000000020","title":"Addressing service of notice by mail in cases involving forcible entry and forcible and unlawful detainer","heading":null,"jurisdiction":"WA","session":"2025-26","status":"signed","lifecycle_status":"effective","status_raw":"signed","next_event":null,"is_active":null,"text":"Addressing service of notice by mail in cases involving forcible entry and forcible and unlawful detainer. Sponsors: Representatives Abbarno, Barkis, Jacobsen, Connors, Peterson, and Hill.","text_truncated":false,"text_offset":0,"next_text_offset":null,"current_version_id":"00000000-0000-4000-8000-000000000022","latest_ingested_version_id":"00000000-0000-4000-8000-000000000022","ingested_at":"2025-04-14T00:00:00.000Z","versions":[],"next_cursor":null,"has_more":false,"citation":"HB 1003","source_url":"https://app.leg.wa.gov/billsummary?BillNumber=1003&Year=2025"},"schema":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"heading":{"type":["string","null"]},"jurisdiction":{"type":"string"},"session":{"type":["string","null"]},"status":{"type":["string","null"]},"lifecycle_status":{"type":"string","enum":["introduced","in_committee","passed_one_chamber","passed_both","enacted","vetoed","failed_or_dead","proposed_rule","comment_period_open","final_rule","effective","decided","other"]},"status_raw":{"type":["string","null"]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"is_active":{"type":["boolean","null"]},"text":{"type":["string","null"]},"stored_text_utf8_bytes":{"type":["integer","null"],"minimum":0},"text_truncated":{"type":"boolean"},"text_offset":{"type":"integer","minimum":0},"next_text_offset":{"type":["integer","null"]},"current_version_id":{"type":["string","null"],"format":"uuid"},"latest_ingested_version_id":{"type":["string","null"],"format":"uuid"},"ingested_at":{"type":["string","null"]},"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fetched_at":{"type":["string","null"]},"effective_date":{"type":["string","null"]},"effective_end_date":{"type":["string","null"]},"version_code":{"type":["string","null"]},"content_hash":{"type":["string","null"]},"text_preview":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["id","fetched_at","effective_date","effective_end_date","version_code","content_hash","text_preview","citation","source_url"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"},"diff":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false},"issuer":{"type":["string","null"]},"office":{"type":["string","null"],"enum":["president","governor","mayor"]},"instrument":{"type":["string","null"],"enum":["executive_order","proclamation","memorandum"]},"order_number":{"type":["string","null"]},"signed_date":{"type":["string","null"]},"publication_date":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["doc_type","id","title","heading","jurisdiction","session","status","lifecycle_status","status_raw","next_event","is_active","text","text_truncated","text_offset","next_text_offset","current_version_id","latest_ingested_version_id","ingested_at","versions","next_cursor","has_more","citation","source_url"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/cfr":{"get":{"tags":["Regulations"],"summary":"List CFR sections","description":"Loaded Code of Federal Regulations sections. Filter by title, part, citation, or query. Each section includes citation, hierarchy, amendment date, and source_url.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"title","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":40},"required":false,"name":"part","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":80},"required":false,"name":"citation","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"query","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of CFR sections.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"sections":[{"id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","citation":"1 CFR 1.1","heading":"Definitions.","title_number":1,"part_number":"1","part_citation":"1 CFR 1","source_url":"https://www.ecfr.gov/current/title-1/chapter-I/subchapter-A/part-1/section-1.1","hierarchy":"Title 1—General Provisions > Chapter I—Administrative Committee of the Federal Register > Subchapter A—General > Part 1—Definitions","amendment_date":"2015-12-18","removed":false,"jurisdiction":"US"}],"next_cursor":null},"schema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["cfr"]},"citation":{"type":"string","minLength":1},"heading":{"type":"string","minLength":1},"title_number":{"type":"integer"},"part_number":{"type":"string","minLength":1},"part_citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"hierarchy":{"type":"string","minLength":1},"amendment_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}"},"removed":{"type":"boolean"},"jurisdiction":{"type":"string","enum":["US"]}},"required":["id","doc_type","citation","heading","title_number","part_number","part_citation","source_url","hierarchy","amendment_date","removed","jurisdiction"]}},"next_cursor":{"type":["string","null"]}},"required":["sections","next_cursor"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/cfr/parts":{"get":{"tags":["Regulations"],"summary":"List CFR parts","description":"Loaded Code of Federal Regulations parts. Optional title is a title number from 1 to 50. Each part includes citation and source_url.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"title","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"CFR parts.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"parts":[{"id":"00000000-0000-4000-8000-0000000000c3","title_number":1,"part_number":"1","name":"Definitions","citation":"1 CFR 1","source_url":"https://www.ecfr.gov/current/title-1/part-1","hierarchy":"Title 1—General Provisions > Chapter I—Administrative Committee of the Federal Register > Subchapter A—General > Part 1—Definitions"}]},"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title_number":{"type":"integer"},"part_number":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"hierarchy":{"type":"string","minLength":1}},"required":["id","title_number","part_number","name","citation","source_url","hierarchy"]}}},"required":["parts"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/cfr/{id}":{"get":{"tags":["Regulations"],"summary":"Get a CFR section","description":"One Code of Federal Regulations section, including the text stored from the GovInfo granule, hierarchy, amendment date, citation, and the eCFR source_url. format=highlights returns official excerpts (HighlightsResponse). format=answer returns a short cited answer (CitedAnswer). q chooses the excerpts. Omit format, fields, and max_tokens for the full section. Pass diff_from as a version id or YYYY-MM-DD date to include a unified text diff and changes to effective date, status, title, and citations.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations."},"required":false,"description":"Version id or YYYY-MM-DD date. When set, the read includes a unified text diff and changes to effective date, status, title, and citations.","name":"diff_from","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Terms used to choose excerpts when format is highlights or answer."},"required":false,"description":"Terms used to choose excerpts when format is highlights or answer.","name":"q","in":"query"},{"schema":{"type":"string","enum":["highlights","answer"],"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record."},"required":false,"description":"highlights returns the most relevant official excerpts with citation and source_url. answer returns a short cited answer. Omit format for the full record.","name":"format","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them."},"required":false,"description":"Comma-separated properties to keep. citation and source_url remain on every record that has them.","name":"fields","in":"query"},{"schema":{"type":"integer","minimum":16,"maximum":8000,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept."},"required":false,"description":"Upper bound for the JSON body. Counted as 4 characters per token. Citations are kept.","name":"max_tokens","in":"query"}],"responses":{"200":{"description":"The CFR section.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","citation":"1 CFR 1.1","heading":"Definitions.","title_number":1,"part_number":"1","part_citation":"1 CFR 1","source_url":"https://www.ecfr.gov/current/title-1/chapter-I/subchapter-A/part-1/section-1.1","retrieved_url":"https://www.govinfo.gov/content/pkg/CFR-2025-title1-vol1/xml/CFR-2025-title1-vol1-sec1-1.xml","hierarchy":"Title 1—General Provisions > Chapter I—Administrative Committee of the Federal Register > Subchapter A—General > Part 1—Definitions","amendment_date":"2015-12-18","text_edition_date":"2023-01-01","removed":false,"jurisdiction":"US","body":"As used in this chapter, unless the context requires otherwise—\n\nAdministrative Committee means the Administrative Committee of the Federal Register established under section 1506 of title 44, United States Code;\n\nAgency means each authority, whether or not within or subject to review by another agency, of the United States, other than the Congress, the courts, the District of Columbia, the Commonwealth of Puerto Rico, and the territories and possessions of the United States;\n\nDocument includes any Presidential proclamation or Executive order, and any rule, regulation, order, certificate, code of fair competition, license, notice, or similar instrument issued, prescribed, or promulgated by an agency;\n\nDocument having general applicability and legal effect means any document issued under proper authority prescribing a penalty or course of conduct, conferring a right, privilege, authority, or immunity, or imposing an obligation, and relevant or applicable to the general public, members of a class, or persons in a locality, as distinguished from named individuals or organizations; and\n\nFiling means making a document available for public inspection at the Office of the Federal Register during official business hours. A document is filed only after it has been received, processed and assigned a publication date according to the schedule in part 17 of this chapter.\n\nRegulation and rule have the same meaning."},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["cfr"]},"citation":{"type":"string","minLength":1},"heading":{"type":"string","minLength":1},"title_number":{"type":"integer"},"part_number":{"type":"string","minLength":1},"part_citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"retrieved_url":{"type":["string","null"],"format":"uri"},"hierarchy":{"type":"string","minLength":1},"amendment_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}"},"text_edition_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}"},"removed":{"type":"boolean"},"jurisdiction":{"type":"string","enum":["US"]},"body":{"type":["string","null"]},"diff":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false}},"required":["id","doc_type","citation","heading","title_number","part_number","part_citation","source_url","retrieved_url","hierarchy","amendment_date","text_edition_date","removed","jurisdiction","body"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/directory/members":{"get":{"tags":["Members"],"summary":"List members","description":"Current legislators from official legislature sites and Congress.gov. Requires the Team plan.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":20},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","enum":["house","senate","unicameral","council"]},"required":false,"name":"chamber","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of members.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"loaded":true,"reason":null,"members":[{"id":"11111111-1111-4111-8111-111111111111","jurisdiction_code":"US","external_scheme":"bioguide","external_id":"X000000","full_name":"EXAMPLE MEMBER (not a real legislator)","given_name":"EXAMPLE","family_name":"MEMBER","party":"EXAMPLE PARTY","chamber":"house","district":"0","state_code":"XX","official_url":"https://bioguide.congress.gov/search/bio/X000000","is_current":true,"citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000","source_name":"Congress.gov","activity_checked_at":null,"activity_complete":false,"contacts":[{"contact_kind":"phone","label":"Washington office","value":"202-555-0100","citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000"},{"contact_kind":"office_address","label":"Washington office","value":"EXAMPLE OFFICE ADDRESS (not a real office)","citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000"}],"committees":[{"committee_id":"22222222-2222-4222-8222-222222222222","name":"EXAMPLE COMMITTEE (not a real committee)","chamber":"house","role":"Chair","citation":"Congress.gov committee hsfa00","source_url":"https://www.congress.gov/committee/house/hsfa00"}],"sponsorships":[{"jurisdiction_code":"US","bill_external_id":"119/hr/1","bill_citation":"EXAMPLE BILL (not a real bill)","session_label":"119","role":"sponsor","citation":"Congress.gov EXAMPLE BILL (not a real bill)","source_url":"https://api.congress.gov/v3/bill/119/hr/1?format=json"}],"votes":[{"jurisdiction_code":"US","bill_external_id":"119/hr/1","bill_citation":"EXAMPLE BILL (not a real bill)","session_label":"119","roll_call_external_id":"119-1-house-12","vote_position":"yea","vote_date":"2026-02-02","citation":"Congress.gov roll call 119-1-house-12","source_url":"https://api.congress.gov/v3/house-vote/119/1/12?format=json"}]}],"next_cursor":null},"schema":{"type":"object","properties":{"loaded":{"type":"boolean"},"reason":{"type":["string","null"]},"members":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"id":{"type":"string","minLength":1},"jurisdiction_code":{"type":"string","minLength":2},"external_scheme":{"type":"string","enum":["bioguide","legislature_member_id","openstates_person"]},"external_id":{"type":"string","minLength":1},"full_name":{"type":"string","minLength":1},"given_name":{"type":["string","null"]},"family_name":{"type":["string","null"]},"party":{"type":["string","null"]},"chamber":{"type":["string","null"],"enum":["house","senate","unicameral","council"]},"district":{"type":["string","null"]},"state_code":{"type":["string","null"]},"official_url":{"type":["string","null"],"format":"uri"},"is_current":{"type":"boolean"},"source_name":{"type":"string","minLength":1},"activity_checked_at":{"type":["string","null"],"minLength":1,"default":null},"activity_complete":{"type":"boolean","default":false}},"required":["citation","source_url","id","jurisdiction_code","external_scheme","external_id","full_name","given_name","family_name","party","chamber","district","state_code","official_url","is_current","source_name"]}},"next_cursor":{"type":["string","null"]}},"required":["loaded","reason","members","next_cursor"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/directory/members/{id}":{"get":{"tags":["Members"],"summary":"Get a member","description":"One legislator, including official contacts, committees, sponsorships, and roll-call positions.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The member record.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","jurisdiction_code":"US","external_scheme":"bioguide","external_id":"X000000","full_name":"EXAMPLE MEMBER (not a real legislator)","given_name":"EXAMPLE","family_name":"MEMBER","party":"EXAMPLE PARTY","chamber":"house","district":"0","state_code":"XX","official_url":"https://bioguide.congress.gov/search/bio/X000000","is_current":true,"citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000","source_name":"Congress.gov","activity_checked_at":null,"activity_complete":false,"contacts":[{"contact_kind":"phone","label":"Washington office","value":"202-555-0100","citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000"},{"contact_kind":"office_address","label":"Washington office","value":"EXAMPLE OFFICE ADDRESS (not a real office)","citation":"Congress.gov member X000000 (documentation example)","source_url":"https://bioguide.congress.gov/search/bio/X000000"}],"committees":[{"committee_id":"22222222-2222-4222-8222-222222222222","name":"EXAMPLE COMMITTEE (not a real committee)","chamber":"house","role":"Chair","citation":"Congress.gov committee hsfa00","source_url":"https://www.congress.gov/committee/house/hsfa00"}],"sponsorships":[{"jurisdiction_code":"US","bill_external_id":"119/hr/1","bill_citation":"EXAMPLE BILL (not a real bill)","session_label":"119","role":"sponsor","citation":"Congress.gov EXAMPLE BILL (not a real bill)","source_url":"https://api.congress.gov/v3/bill/119/hr/1?format=json"}],"votes":[{"jurisdiction_code":"US","bill_external_id":"119/hr/1","bill_citation":"EXAMPLE BILL (not a real bill)","session_label":"119","roll_call_external_id":"119-1-house-12","vote_position":"yea","vote_date":"2026-02-02","citation":"Congress.gov roll call 119-1-house-12","source_url":"https://api.congress.gov/v3/house-vote/119/1/12?format=json"}]},"schema":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"id":{"type":"string","minLength":1},"jurisdiction_code":{"type":"string","minLength":2},"external_scheme":{"type":"string","enum":["bioguide","legislature_member_id","openstates_person"]},"external_id":{"type":"string","minLength":1},"full_name":{"type":"string","minLength":1},"given_name":{"type":["string","null"]},"family_name":{"type":["string","null"]},"party":{"type":["string","null"]},"chamber":{"type":["string","null"],"enum":["house","senate","unicameral","council"]},"district":{"type":["string","null"]},"state_code":{"type":["string","null"]},"official_url":{"type":["string","null"],"format":"uri"},"is_current":{"type":"boolean"},"source_name":{"type":"string","minLength":1},"activity_checked_at":{"type":["string","null"],"minLength":1,"default":null},"activity_complete":{"type":"boolean","default":false},"contacts":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"contact_kind":{"type":"string","enum":["office_address","phone","email","fax","website"]},"label":{"type":["string","null"]},"value":{"type":"string","minLength":1}},"required":["citation","source_url","contact_kind","label","value"]}},"committees":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"committee_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"chamber":{"type":["string","null"],"enum":["house","senate","unicameral","joint","council"]},"role":{"type":["string","null"]}},"required":["citation","source_url","committee_id","name","chamber","role"]}},"sponsorships":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"jurisdiction_code":{"type":"string","minLength":2},"bill_external_id":{"type":["string","null"]},"bill_citation":{"type":"string","minLength":1},"session_label":{"type":["string","null"]},"role":{"type":"string","enum":["sponsor","cosponsor"]}},"required":["citation","source_url","jurisdiction_code","bill_external_id","bill_citation","session_label","role"]}},"votes":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"jurisdiction_code":{"type":"string","minLength":2},"bill_external_id":{"type":["string","null"]},"bill_citation":{"type":["string","null"]},"session_label":{"type":["string","null"]},"roll_call_external_id":{"type":"string","minLength":1},"vote_position":{"type":"string","enum":["yea","nay","present","not_voting"]},"vote_date":{"type":["string","null"]}},"required":["citation","source_url","jurisdiction_code","bill_external_id","bill_citation","session_label","roll_call_external_id","vote_position","vote_date"]}}},"required":["citation","source_url","id","jurisdiction_code","external_scheme","external_id","full_name","given_name","family_name","party","chamber","district","state_code","official_url","is_current","source_name","contacts","committees","sponsorships","votes"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/directory/committees":{"get":{"tags":["Members"],"summary":"List committees","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":2,"maxLength":20},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","enum":["house","senate","unicameral","joint","council"]},"required":false,"name":"chamber","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of committees.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"loaded":true,"reason":null,"committees":[{"id":"com_wa_housing","jurisdiction_code":"WA","external_scheme":"legislature_committee","external_id":"wa-house-housing","name":"Housing","chamber":"house","is_current":true,"citation":"Washington House committee directory","source_url":"https://leg.wa.gov/committees/","source_name":"Washington State Legislature"}],"next_cursor":null},"schema":{"type":"object","properties":{"loaded":{"type":"boolean"},"reason":{"type":["string","null"]},"committees":{"type":"array","items":{"type":"object","properties":{"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"id":{"type":"string","minLength":1},"jurisdiction_code":{"type":"string","minLength":2},"external_scheme":{"type":"string","enum":["congress_committee","legislature_committee","openstates_committee"]},"external_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"chamber":{"type":["string","null"],"enum":["house","senate","unicameral","joint","council"]},"is_current":{"type":"boolean"},"source_name":{"type":"string","minLength":1}},"required":["citation","source_url","id","jurisdiction_code","external_scheme","external_id","name","chamber","is_current","source_name"]}},"next_cursor":{"type":["string","null"]}},"required":["loaded","reason","committees","next_cursor"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/follows":{"get":{"tags":["Follows"],"summary":"List follows","description":"Follows saved for the API key account. Requires X-Api-Key.","security":[{"apiKey":[]}],"responses":{"200":{"description":"The account follow list.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"follows":[{"id":"33333333-3333-4333-8333-333333333333","target_type":"statute","target_id":"00000000-0000-4000-8000-000000000050","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","label":"Assault in the first degree","created_at":"2026-10-21T00:00:00.000Z"}]},"schema":{"type":"object","properties":{"follows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"target_type":{"type":"string","minLength":1},"target_id":{"type":"string","minLength":1},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"label":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","target_type","target_id","citation","source_url","label","created_at"],"additionalProperties":false}}},"required":["follows"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Follows"],"summary":"Follow or unfollow","description":"Idempotent follow write for a statute, bill, ordinance, or CFR part (targetType cfr_part). kind and id are accepted aliases of targetType and targetId. Requires X-Api-Key.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"type":"string","enum":["statute","bill","ordinance","cfr_part"]},"targetId":{"type":"string","minLength":1,"maxLength":200},"followed":{"type":"boolean"}},"required":["targetType","targetId","followed"],"additionalProperties":false}}}},"responses":{"200":{"description":"The follow write result.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"target_type":"statute","target_id":"00000000-0000-4000-8000-000000000050","followed":true,"created":true,"removed":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"},"schema":{"type":"object","properties":{"target_type":{"type":"string","minLength":1},"target_id":{"type":"string","minLength":1},"followed":{"type":"boolean"},"created":{"type":"boolean"},"removed":{"type":"boolean"},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["target_type","target_id","followed","created","removed","citation","source_url"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/changes":{"get":{"tags":["Change feed"],"summary":"Read the change feed","description":"Cursor page of document and development changes in strictly increasing recording order (seq). Delivery is at-least-once: use change_id (same as id) to dedupe. Pass next_cursor back as since; every page returns next_cursor and has_more. Tombstones (repeal and disappearance) appear as normal items with removed=true. Optional filters jurisdiction, session, kind, citation_prefix, and part apply to every page of a cursor. Rows may be purged after 400 days; a since cursor older than the retained window returns 410 cursor_expired with resync guidance. CFR section amendments use kind cfr. Each item includes citation and source_url. Set include_diff=true to attach structured diffs on up to the first 20 items; otherwise diff is an empty shell. Requires X-Api-Key. This is not the older unversioned /api/changes list.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Opaque cursor from the previous next_cursor. Omit on the first page. Cursors older than the documented retention window return cursor_expired (410)."},"required":false,"description":"Opaque cursor from the previous next_cursor. Omit on the first page. Cursors older than the documented retention window return cursor_expired (410).","name":"since","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$","description":"When set, only changes in this jurisdiction are returned. The filter applies to every page of the cursor."},"required":false,"description":"When set, only changes in this jurisdiction are returned. The filter applies to every page of the cursor.","name":"jurisdiction","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Legislative session id or label (for example 2025-26). Matches bill-shaped rows with that session. The filter applies to every page of the cursor."},"required":false,"description":"Legislative session id or label (for example 2025-26). Matches bill-shaped rows with that session. The filter applies to every page of the cursor.","name":"session","in":"query"},{"schema":{"type":"string","enum":["statute","bill","ordinance","session_law","executive_order","bill_action","bill_sponsor","roll_call","hearing","regulation","cfr"],"description":"Change kind. cfr is a Code of Federal Regulations section change."},"required":false,"description":"Change kind. cfr is a Code of Federal Regulations section change.","name":"kind","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":80},"required":false,"name":"citation_prefix","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":80,"description":"CFR part citation such as 40 CFR 60. Matches that part and its sections, not a longer part number such as 40 CFR 600."},"required":false,"description":"CFR part citation such as 40 CFR 60. Matches that part and its sections, not a longer part number such as 40 CFR 600.","name":"part","in":"query"},{"schema":{"type":["boolean","null"],"default":false,"description":"When true, populate structured diffs on up to the first 20 items in the page. Default false returns empty diff shells."},"required":false,"description":"When true, populate structured diffs on up to the first 20 items in the page. Default false returns empty diff shells.","name":"include_diff","in":"query"}],"responses":{"200":{"description":"A page of changes.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"items":[{"change_id":"44444444-4444-4444-8444-444444444444","id":"44444444-4444-4444-8444-444444444444","record":"document","kind":"statute","event_type":"content_change","removed":false,"title":"Assault in the first degree","summary":"Official text changed.","changed_at":"2026-10-20T18:00:00.000Z","jurisdiction":"WA","session_id":null,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","observed_time":true,"legal_status":"codified","stage_label":"Codified","lifecycle_status":"effective","status_raw":null,"next_event":null,"next_deadline":null,"current_through":"2019-07-01","diff":{"from":{"version_id":"12121212-1212-4121-8121-121212121212","as_of":"2024-01-01"},"to":{"version_id":"00000000-0000-4000-8000-000000000051","as_of":"2026-10-20"},"text":"--- a/RCW 9A.36.011\n+++ b/RCW 9A.36.011\n@@ -3,1 +3,1 @@\n-(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n+(b) Transmits HIV to a child or vulnerable adult;\n","text_truncated":false,"fields":[{"field":"effective_date","before":"2024-01-01","after":"2026-10-20"},{"field":"title","before":"Assault in the first degree","after":"Assault in the first degree"}],"href":"/api/v1/sections/00000000-0000-4000-8000-000000000050?diff_from=12121212-1212-4121-8121-121212121212"}}],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"change_id":{"type":"string","minLength":1,"description":"Stable id for deduplicating at-least-once delivery. Same value as id."},"id":{"type":"string","minLength":1},"record":{"type":"string","enum":["document","development"]},"kind":{"type":"string","minLength":1},"event_type":{"type":"string","minLength":1},"removed":{"type":"boolean","description":"True when the change is a tombstone (repeal or disappearance)."},"title":{"type":"string","minLength":1},"summary":{"type":["string","null"]},"changed_at":{"type":"string","minLength":1},"jurisdiction":{"type":"string","minLength":1},"session_id":{"type":["string","null"],"format":"uuid"},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"observed_time":{"type":"boolean"},"legal_status":{"anyOf":[{"type":"string","enum":["proposed","scheduled","adopted_enacted","effective","codified","withdrawn","corrected_stayed","vetoed","died","failed","tabled","uncertain"]},{"type":"string","enum":["unknown"]}]},"stage_label":{"type":"string","minLength":1},"lifecycle_status":{"type":"string","enum":["introduced","in_committee","passed_one_chamber","passed_both","enacted","vetoed","failed_or_dead","proposed_rule","comment_period_open","final_rule","effective","decided","other"]},"status_raw":{"type":["string","null"]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"next_deadline":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"diff":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false}},"required":["change_id","id","record","kind","event_type","removed","title","summary","changed_at","jurisdiction","session_id","citation","source_url","observed_time","legal_status","stage_label","lifecycle_status","status_raw","next_event","next_deadline","current_through","diff"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["items","next_cursor","has_more"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"The since cursor is older than the change feed retention window. Resync from a snapshot or bulk export.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","description":"Enabled endpoints for the signed-in Team account. Secrets are not included.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Saved webhook endpoints.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"endpoints":[{"id":"55555555-5555-4555-8555-555555555555","url":"https://example.com/hooks/diurna","description":"Statute change alerts (EXAMPLE)","enabled":true,"secret_hint":"diu_wh_ab12","created_at":"2026-10-21T00:00:00.000Z","updated_at":"2026-10-21T00:00:00.000Z"}],"delivery_enabled":true},"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","description","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false}},"delivery_enabled":{"type":"boolean"}},"required":["endpoints","delivery_enabled"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook endpoint","description":"Saves an https endpoint. The signing secret is returned once.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000},"description":{"type":"string","maxLength":200}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"The endpoint and its one-time secret.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"endpoint":{"id":"55555555-5555-4555-8555-555555555555","url":"https://example.com/hooks/diurna","description":"Statute change alerts (EXAMPLE)","enabled":true,"secret_hint":"diu_wh_ab12","created_at":"2026-10-21T00:00:00.000Z","updated_at":"2026-10-21T00:00:00.000Z"},"secret":"diu_wh_secret_shown_once","delivery_enabled":true},"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","description","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false},"secret":{"type":"string","minLength":1},"delivery_enabled":{"type":"boolean"}},"required":["endpoint","secret","delivery_enabled"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/webhooks/{id}":{"delete":{"tags":["Webhooks"],"summary":"Disable a webhook endpoint","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The disabled endpoint.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"endpoint":{"id":"55555555-5555-4555-8555-555555555555","url":"https://example.com/hooks/diurna","description":"Statute change alerts (EXAMPLE)","enabled":true,"secret_hint":"diu_wh_ab12","created_at":"2026-10-21T00:00:00.000Z","updated_at":"2026-10-21T00:00:00.000Z"}},"schema":{"type":"object","properties":{"endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","description","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false}},"required":["endpoint"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/developments/{id}/evidence":{"get":{"tags":["Evidence"],"summary":"Get an evidence packet","description":"Evidence packet schema 1.3.0. Official citation, paste citation, issuing body, source health, source URL, version diff summary, fetch time, content hash, version history, current-through date, stored passages with reader links, legal status, as_of, and explicit gaps. Included with Pro. Requires X-Api-Key.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar day used to read the lifecycle. Defaults to the database current date."},"required":false,"description":"Calendar day used to read the lifecycle. Defaults to the database current date.","name":"as_of","in":"query"}],"responses":{"200":{"description":"The evidence packet.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"schema_version":"1.3.0","development_id":"66666666-6666-4666-8666-666666666666","document_type":"section","document_id":"00000000-0000-4000-8000-000000000050","jurisdiction":"WA","event_type":"content_change","citation":"RCW 9A.36.011","paste_citation":"Wash. Rev. Code § 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","issuing_body":"Washington State Legislature","source_health":"working","as_of":"2026-10-29","passages":[{"passage_id":"new-0","version_id":"00000000-0000-4000-8000-000000000051","role":"new","text":"(b) Transmits HIV to a child or vulnerable adult;","text_offset":0,"text_length":58,"truncated":false,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","reader_href":"/d/section/00000000-0000-4000-8000-000000000050/v/00000000-0000-4000-8000-000000000051"}],"versions":{"old":null,"new":{"id":"00000000-0000-4000-8000-000000000051","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","observed_at":"2026-10-20T18:00:00.000Z","published_on":"2026-10-20","content_sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}},"observed_at":"2026-10-20T18:00:00.000Z","fetched_at":"2026-10-20T18:00:00.000Z","published_on":"2026-10-20","current_through":"2019-07-01","version_history":[{"id":"00000000-0000-4000-8000-000000000051","citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011","observed_at":"2026-10-20T18:00:00.000Z","published_on":"2026-10-20","content_sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],"version_diff":null,"legal_status":"unknown","next_event":null,"gaps":[{"code":"prior_version_absent","field":"versions.old","detail":"No previous version is linked."},{"code":"issuing_body_unavailable","field":"issuing_body","detail":"The source registry has no issuing body for this URL."},{"code":"source_health_unavailable","field":"source_health","detail":"Source health is not loaded for this source URL."}]},"schema":{"type":"object","properties":{"schema_version":{"type":"string","enum":["1.3.0"]},"development_id":{"type":"string","format":"uuid"},"document_type":{"type":"string","enum":["section","bill","ordinance","session_law"]},"document_id":{"type":"string","format":"uuid"},"jurisdiction":{"type":["string","null"],"minLength":1,"maxLength":20},"event_type":{"type":["string","null"],"enum":["insert","unchanged_refetch","content_change","repeal","disappearance"]},"citation":{"type":"string","minLength":1,"maxLength":1000},"paste_citation":{"type":"string","minLength":1,"maxLength":1000},"source_url":{"type":"string","format":"uri"},"issuing_body":{"type":["string","null"],"minLength":1,"maxLength":200},"source_health":{"type":["string","null"],"enum":["working","delayed","partial","unavailable","not monitored"]},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"passages":{"type":"array","items":{"type":"object","properties":{"passage_id":{"type":"string","minLength":1,"maxLength":80},"version_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["old","new"]},"text":{"type":"string","minLength":1},"text_offset":{"type":"integer","minimum":0},"text_length":{"type":"integer","minimum":1},"truncated":{"type":"boolean"},"citation":{"type":"string","minLength":1,"maxLength":1000},"source_url":{"type":"string","format":"uri"},"reader_href":{"type":["string","null"],"minLength":1,"maxLength":500}},"required":["passage_id","version_id","role","text","text_offset","text_length","truncated","citation","source_url","reader_href"],"additionalProperties":false},"maxItems":2},"versions":{"type":"object","properties":{"old":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":1000},"source_url":{"type":"string","format":"uri"},"observed_at":{"type":["string","null"],"format":"date-time"},"published_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"content_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"}},"required":["id","citation","source_url","observed_at","published_on","content_sha256"],"additionalProperties":false},"new":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":1000},"source_url":{"type":"string","format":"uri"},"observed_at":{"type":["string","null"],"format":"date-time"},"published_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"content_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"}},"required":["id","citation","source_url","observed_at","published_on","content_sha256"],"additionalProperties":false}},"required":["old","new"],"additionalProperties":false},"observed_at":{"type":["string","null"],"format":"date-time"},"fetched_at":{"type":["string","null"],"format":"date-time"},"published_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"version_history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"citation":{"type":"string","minLength":1,"maxLength":1000},"source_url":{"type":"string","format":"uri"},"observed_at":{"type":["string","null"],"format":"date-time"},"published_on":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"content_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$"}},"required":["id","citation","source_url","observed_at","published_on","content_sha256"],"additionalProperties":false},"maxItems":2},"version_diff":{"type":["object","null"],"properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false},"legal_status":{"anyOf":[{"type":"string","enum":["proposed","scheduled","adopted_enacted","effective","codified","withdrawn","corrected_stayed","vetoed","died","failed","tabled","uncertain"]},{"type":"string","enum":["unknown"]}]},"next_event":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false},"gaps":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["legal_status_unavailable","next_event_unavailable","published_date_unavailable","observed_date_unavailable","prior_version_absent","prior_version_unlinked","observed_version_unspecified","version_text_missing","version_provenance_missing","version_text_excerpt","version_text_truncated","current_through_unavailable","issuing_body_unavailable","source_health_unavailable","version_diff_unavailable"]},"field":{"type":"string","minLength":1,"maxLength":80},"detail":{"type":"string","minLength":1,"maxLength":500}},"required":["code","field","detail"],"additionalProperties":false},"maxItems":16}},"required":["schema_version","development_id","document_type","document_id","jurisdiction","event_type","citation","paste_citation","source_url","issuing_body","source_health","as_of","passages","versions","observed_at","fetched_at","published_on","current_through","version_history","version_diff","legal_status","next_event","gaps"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/developments/status/{doc_type}/{id}":{"get":{"tags":["Change feed"],"summary":"Read a development's legal status","description":"Lifecycle and the next source-stated deadline for one bill, ordinance, session law, executive order, code section, or regulation. stage_label is the publisher stage when one is stored, such as Introduced, In committee, Passed, Effective, or Comment period. next_decision stays null when no source states a date. No API key.","parameters":[{"schema":{"type":"string","enum":["bill","ordinance","session_law","executive_order","section","regulation"]},"required":true,"name":"doc_type","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar day used to read the lifecycle. Defaults to the database current date."},"required":false,"description":"Calendar day used to read the lifecycle. Defaults to the database current date.","name":"as_of","in":"query"}],"responses":{"200":{"description":"The development lifecycle.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"doc_type":"bill","development_id":"00000000-0000-4000-8000-000000000020","citation":"HB 1003","source_url":"https://app.leg.wa.gov/billsummary?BillNumber=1003&Year=2025","title":"Addressing service of notice by mail in cases involving forcible entry and forcible and unlawful detainer","publisher_status":"effective","legal_status":"effective","legal_status_label":"Effective","stage_label":"Effective","operative":true,"as_of":"2026-10-21","stages":[{"date":"2025-07-27","label":"Effective date","verification":"verified","citation":"HB 1003","source_url":"https://app.leg.wa.gov/billsummary?BillNumber=1003&Year=2025"}],"next_decision":null},"schema":{"type":"object","properties":{"doc_type":{"type":"string","enum":["bill","ordinance","session_law","executive_order","section","regulation"]},"development_id":{"type":"string","minLength":1},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"title":{"type":["string","null"]},"publisher_status":{"type":["string","null"]},"legal_status":{"type":"string","enum":["proposed","scheduled","adopted_enacted","effective","codified","withdrawn","corrected_stayed","vetoed","died","failed","tabled","uncertain"]},"legal_status_label":{"type":"string","minLength":1},"stage_label":{"type":"string","minLength":1},"operative":{"type":"boolean"},"as_of":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"stages":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false}},"next_decision":{"type":["object","null"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"label":{"type":"string","minLength":1},"verification":{"type":"string","enum":["verified","unverified"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"}},"required":["date","label","verification","citation","source_url"],"additionalProperties":false}},"required":["doc_type","development_id","citation","source_url","title","publisher_status","legal_status","legal_status_label","stage_label","operative","as_of","stages","next_decision"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/lookup":{"get":{"tags":["Search"],"summary":"Look up a citation","description":"Every document matching a citation. The route does not pick one match silently.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":500},"required":true,"name":"citation","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100},"required":false,"name":"session","in":"query"}],"responses":{"200":{"description":"Citation matches.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"matches":[{"doc_type":"section","document_id":"00000000-0000-4000-8000-000000000050","title":"Assault in the first degree","jurisdiction":"WA","session":null,"citation":"RCW 9A.36.011","source_url":"https://app.leg.wa.gov/RCW/default.aspx?cite=9A.36.011"}]},"schema":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"document_id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]},"jurisdiction":{"type":"string"},"session":{"type":["string","null"]},"citation":{"type":"string","minLength":1},"source_url":{"type":"string","format":"uri"},"current_through":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"as_of":{"type":"object","properties":{"published":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"retrieved":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"source_checked":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adopted":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"effective":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"codified":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"applicability_reviewed":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["published","retrieved","source_checked","adopted","effective","codified","applicability_reviewed"]}},"required":["doc_type","document_id","title","jurisdiction","session","citation","source_url"]},"minItems":1}},"required":["matches"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/jurisdictions":{"get":{"tags":["Search"],"summary":"List jurisdictions","parameters":[{"schema":{"type":"string","enum":["federal","state","county","city","territory","tribal"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Jurisdictions and document counts.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"jurisdictions":[{"id":"88888888-8888-4888-8888-888888888888","code":"WA","name":"Washington","type":"state","parent_code":"US","document_counts":{"sections":1,"session_laws":0,"ordinances":0,"bills":1,"executive_orders":0}}],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"jurisdictions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"parent_code":{"type":["string","null"]},"document_counts":{"type":"object","properties":{"sections":{"type":"integer"},"session_laws":{"type":"integer"},"ordinances":{"type":"integer"},"bills":{"type":"integer"},"executive_orders":{"type":"integer","default":0}},"required":["sections","session_laws","ordinances","bills"]}},"required":["id","code","name","type","parent_code","document_counts"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["jurisdictions","next_cursor","has_more"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/sessions":{"get":{"tags":["Search"],"summary":"List legislative sessions","description":"Legislative sessions loaded in the catalog, with dates and a current-session flag. Each row links to bill search for that session.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Legislative sessions.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"sessions":[{"id":"00000000-0000-4000-8000-000000000006","jurisdiction":"WA","session_number":"2025-26","session_type":"regular","name":"2025-26","start_date":"2025-01-13","end_date":null,"sine_die_date":null,"is_current":true,"bills_href":"/search?q=bill&kind=bill&j=WA&session=2025-26"}],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"session_number":{"type":["string","null"]},"session_type":{"type":"string","enum":["regular","special","extraordinary","organizational"]},"name":{"type":["string","null"]},"start_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"sine_die_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"is_current":{"type":"boolean"},"bills_href":{"type":"string","minLength":1}},"required":["id","jurisdiction","session_number","session_type","name","start_date","end_date","sine_die_date","is_current","bills_href"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["sessions","next_cursor","has_more"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/coverage":{"get":{"tags":["Search"],"summary":"Read coverage","description":"Returns the full coverage manifest snapshot when jurisdiction is omitted. Pass jurisdiction for the same per-jurisdiction rows as GET /api/coverage.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":false,"name":"data_type","in":"query"}],"responses":{"200":{"description":"Coverage manifest snapshot or per-jurisdiction rows.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"jurisdiction":{"code":"WA","name":"Washington"},"coverage":[{"data_type":"statute","source_name":"Washington State Legislature","coverage_start":"1990-01-01","coverage_end":null,"total_expected":null,"total_collected":1,"completeness_pct":null,"with_full_text":1,"quarantined_count":0,"last_crawl_at":"2026-10-20T18:00:00.000Z"}]},"schema":{"anyOf":[{"type":"object","properties":{"snapshot_at":{"type":["string","null"]},"coverage":{"type":"array","items":{"type":"object","properties":{"jurisdiction":{"type":"string"},"data_type":{"type":"string"},"total_expected":{"type":["number","null"]},"total_collected":{"type":["number","null"]},"completeness_pct":{"type":["number","null"]},"quarantined_count":{"type":["number","null"]},"with_full_text":{"type":["number","null"]},"last_crawl_at":{"type":["string","null"]},"coverage_start":{"type":["string","null"]},"coverage_end":{"type":["string","null"]}},"required":["jurisdiction","data_type","total_expected","total_collected","completeness_pct","quarantined_count","with_full_text","last_crawl_at","coverage_start","coverage_end"]}}},"required":["snapshot_at","coverage"]},{"type":"object","properties":{"jurisdiction":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"coverage":{"type":"array","items":{"type":"object","properties":{"data_type":{"type":"string"},"source_name":{"type":["string","null"]},"coverage_start":{"type":["string","null"]},"coverage_end":{"type":["string","null"]},"total_expected":{"type":["number","null"]},"total_collected":{"type":["number","null"]},"completeness_pct":{"type":["number","null"]},"with_full_text":{"type":["number","null"]},"quarantined_count":{"type":["number","null"]},"last_crawl_at":{"type":["string","null"]}},"required":["data_type","source_name","coverage_start","coverage_end","total_expected","total_collected","completeness_pct","with_full_text","quarantined_count","last_crawl_at"]}}},"required":["jurisdiction","coverage"]}]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/usage":{"get":{"tags":["Usage"],"summary":"Read usage and remaining quota","description":"Monthly counted requests, per-day counts by endpoint, and remaining rate-limit and batch quotas for the API key. Counted requests are not a separate charge. Requires X-Api-Key.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Usage and remaining quota.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"plan":"free","price_label":"Free is $0. Counted API requests are not a separate charge. A missing request count is not treated as zero requests or as one request.","subscription_cents":0,"usage_cents":0,"usage_charge_label":"$0","period_start":"2026-10-01","period_reset":"2026-11-01","request_count":2,"days":[{"day":"2026-10-28","endpoint":"sections/batch","endpoint_label":"Section batch","request_count":2}],"quotas":[{"id":"changes","label":"Change feed","limit":20,"used":2,"remaining":18,"window_seconds":60,"reset_at":"2026-10-28T00:01:00.000Z","used_percent":10,"upgrade":false},{"id":"alerts","label":"Alerts","limit":30,"used":0,"remaining":30,"window_seconds":60,"reset_at":"2026-10-28T00:01:00.000Z","used_percent":0,"upgrade":false},{"id":"follows","label":"Follows","limit":30,"used":0,"remaining":30,"window_seconds":60,"reset_at":"2026-10-28T00:01:00.000Z","used_percent":0,"upgrade":false},{"id":"batch_items","label":"Items in one batch","limit":10,"used":0,"remaining":10,"window_seconds":null,"reset_at":null,"used_percent":0,"upgrade":false}]},"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","trial","plus","pro","team"]},"price_label":{"type":"string","minLength":1},"subscription_cents":{"type":["integer","null"],"minimum":0},"usage_cents":{"type":"number","enum":[0]},"usage_charge_label":{"type":"string","minLength":1},"period_start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"period_reset":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"request_count":{"type":"integer","minimum":0},"days":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endpoint":{"type":"string","enum":["changes","alerts","follows","sections/batch","exports/jurisdiction"]},"endpoint_label":{"type":"string","minLength":1},"request_count":{"type":"integer","minimum":0}},"required":["day","endpoint","endpoint_label","request_count"],"additionalProperties":false}},"quotas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["changes","alerts","follows","batch_items"]},"label":{"type":"string","minLength":1},"limit":{"type":"integer","exclusiveMinimum":0},"used":{"type":"integer","minimum":0},"remaining":{"type":"integer","minimum":0},"window_seconds":{"type":["integer","null"],"exclusiveMinimum":0},"reset_at":{"type":["string","null"],"format":"date-time"},"used_percent":{"type":"integer","minimum":0,"maximum":100},"upgrade":{"type":"boolean"}},"required":["id","label","limit","used","remaining","window_seconds","reset_at","used_percent","upgrade"],"additionalProperties":false},"minItems":1}},"required":["plan","price_label","subscription_cents","usage_cents","usage_charge_label","period_start","period_reset","request_count","days","quotas"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/usage/preview":{"post":{"tags":["Usage"],"summary":"Preview the cost of a bulk request","description":"Quotes the published plan price and a separate charge of zero for a section batch or jurisdiction export. Does not record usage, reserve quota, or start the job. Requires X-Api-Key.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["sections_batch"]},"item_count":{"type":"integer","minimum":1,"maximum":100}},"required":["kind","item_count"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["jurisdiction_export"]},"narrowed":{"type":"boolean"}},"required":["kind","narrowed"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Cost preview for a bulk request.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"kind":"sections_batch","endpoint":"sections/batch","endpoint_label":"Section batch","item_count":2,"item_limit":10,"within_quota":true,"remaining_after":8,"allowed":true,"blocked_reason":null,"usage_cents":0,"incremental_cents":0,"incremental_label":"$0","subscription_cents":0,"currency":"usd","price_label":"Free is $0. Counted API requests are not a separate charge. A missing request count is not treated as zero requests or as one request.","summary":"2 items on Section batch fit this plan. Separate charge: $0.","note":"This preview does not run the request and does not create a charge."},"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["sections_batch","jurisdiction_export"]},"endpoint":{"type":"string","enum":["changes","alerts","follows","sections/batch","exports/jurisdiction"]},"endpoint_label":{"type":"string","minLength":1},"item_count":{"type":"integer","exclusiveMinimum":0},"item_limit":{"type":"integer","exclusiveMinimum":0},"within_quota":{"type":"boolean"},"remaining_after":{"type":"integer","minimum":0},"allowed":{"type":"boolean"},"blocked_reason":{"type":["string","null"],"minLength":1},"usage_cents":{"type":"number","enum":[0]},"incremental_cents":{"type":"number","enum":[0]},"incremental_label":{"type":"string","minLength":1},"subscription_cents":{"type":["integer","null"],"minimum":0},"currency":{"type":"string","enum":["usd"]},"price_label":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"note":{"type":"string","enum":["This preview does not run the request and does not create a charge."]}},"required":["kind","endpoint","endpoint_label","item_count","item_limit","within_quota","remaining_after","allowed","blocked_reason","usage_cents","incremental_cents","incremental_label","subscription_cents","currency","price_label","summary","note"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/versions/compare":{"post":{"tags":["Statutes"],"summary":"Compare two stored version ids","description":"Compare two stored official version ids on the same document. Returns a structured diff with unified text and field changes. Requires X-Api-Key and a plan that includes redlines and version compare.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"example":{"from_version_id":"00000000-0000-4000-8000-000000000041","to_version_id":"00000000-0000-4000-8000-000000000042"},"schema":{"type":"object","properties":{"from_version_id":{"type":"string","format":"uuid"},"to_version_id":{"type":"string","format":"uuid"}},"required":["from_version_id","to_version_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Structured diff between the two stored versions.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"from":{"version_id":"00000000-0000-4000-8000-000000000041","as_of":"2023-01-01"},"to":{"version_id":"00000000-0000-4000-8000-000000000042","as_of":"2024-06-01"},"text":"--- a/RCW 9A.36.011\n+++ b/RCW 9A.36.011\n@@ -3,1 +3,1 @@\n-(a) Assaults another with a firearm or any deadly weapon or by any force or means likely to produce great bodily harm or death; or\n+(b) Transmits HIV to a child or vulnerable adult; or\n","text_truncated":false,"fields":[{"field":"effective_date","before":"2023-01-01","after":"2024-06-01"}],"href":"/api/v1/sections/00000000-0000-4000-8000-000000000050?diff_from=00000000-0000-4000-8000-000000000051"},"schema":{"type":"object","properties":{"from":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"to":{"type":"object","properties":{"version_id":{"type":["string","null"],"format":"uuid"},"as_of":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["version_id","as_of"],"additionalProperties":false},"text":{"type":"string","description":"Unified diff of the official text. Empty when the compared text matches."},"text_truncated":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","enum":["effective_date","status","title","citations"]},"before":{"type":["string","null"]},"after":{"type":["string","null"]}},"required":["field","before","after"],"additionalProperties":false},"description":"Changes to effective date, status, title, and citations. Citations are sorted and joined with newlines."},"href":{"type":["string","null"],"description":"Read path that compares this baseline with the current record."}},"required":["from","to","text","text_truncated","fields","href"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/activity":{"get":{"tags":["Account"],"summary":"List recent requests and jobs","description":"Recent API and MCP calls for this key's account, plus bulk jobs. Each row has the endpoint, status, latency, key prefix, and error. Query strings, request bodies, and secrets are not stored. When zero data retention is enabled, error text is omitted.","security":[{"apiKey":[]}],"responses":{"200":{"description":"Recent requests and jobs.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"zero_data_retention":false,"requests":[{"id":"aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaa1","request_id":"req-activity-1","at":"2026-10-28T04:00:00.000Z","method":"GET","endpoint":"/api/v1/search","status":200,"latency_ms":42,"key":"diu_example (Personal)","error_code":null,"error_message":null}],"jobs":[{"id":"bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbb1","kind":"section_batch","status":"running","active":true,"total":4,"completed":1,"error_count":0,"error":null,"created_at":"2026-10-28T04:00:00.000Z","finished_at":null}]},"schema":{"type":"object","properties":{"zero_data_retention":{"type":"boolean"},"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"request_id":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"},"at":{"type":"string","format":"date-time"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"]},"endpoint":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":100,"maximum":599},"latency_ms":{"type":"integer","minimum":0,"maximum":600000},"key":{"type":"string","minLength":1,"maxLength":120},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]}},"required":["id","request_id","at","method","endpoint","status","latency_ms","key","error_code","error_message"],"additionalProperties":false}},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["section_batch","jurisdiction_export"]},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"active":{"type":"boolean"},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","status","active","total","completed","error_count","error","created_at","finished_at"],"additionalProperties":false}}},"required":["zero_data_retention","requests","jobs"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/activity/jobs/{id}":{"get":{"tags":["Account"],"summary":"Read job errors","description":"Error details for one bulk job owned by this key's account. Item text is omitted when zero data retention is enabled.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The job and its item errors.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"zero_data_retention":false,"job":{"id":"bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbb2","kind":"jurisdiction_export","status":"failed","active":false,"total":1,"completed":0,"error_count":1,"error":"export failed","created_at":"2026-10-28T04:00:00.000Z","finished_at":"2026-10-28T04:01:00.000Z"},"errors":[{"index":0,"code":"not_found","message":"section missing"}]},"schema":{"type":"object","properties":{"zero_data_retention":{"type":"boolean"},"job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["section_batch","jurisdiction_export"]},"status":{"type":"string","enum":["pending","running","completed","failed","cancelled"]},"active":{"type":"boolean"},"total":{"type":"integer","minimum":0},"completed":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","status","active","total","completed","error_count","error","created_at","finished_at"],"additionalProperties":false},"errors":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"code":{"type":"string","minLength":1,"maxLength":80},"message":{"type":["string","null"]}},"required":["index","code","message"],"additionalProperties":false}}},"required":["zero_data_retention","job","errors"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/corpus-map":{"get":{"tags":["Search"],"summary":"Browse the loaded corpus map","description":"Hierarchical map of jurisdictions, document types, statute codes and titles, and CFR titles and parts. Counts and last_updated_at come from stored rows only. Optional path drills down, for example WA, WA/section, WA/section/RCW, or cfr/1. Public. No API key.","parameters":[{"schema":{"type":"string","maxLength":500},"required":false,"name":"path","in":"query"}],"responses":{"200":{"description":"Corpus map nodes for the requested path.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"level":"jurisdiction","path":"WA","jurisdiction":{"code":"WA","name":"Washington"},"doc_type":null,"code_name":null,"title_number":null,"children":[{"kind":"document_type","label":"Statute sections","path":"WA/section","doc_type":"section","count":3,"last_updated_at":"2026-10-19T00:00:00.000Z"},{"kind":"document_type","label":"Bills","path":"WA/bill","doc_type":"bill","count":2,"last_updated_at":"2026-10-19T00:00:00.000Z"}]},"schema":{"type":"object","properties":{"level":{"type":"string","enum":["root","jurisdiction","document_type","code","title","cfr_titles","cfr_parts"]},"path":{"type":["string","null"]},"jurisdiction":{"type":["object","null"],"properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]},"doc_type":{"type":["string","null"],"enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"code_name":{"type":["string","null"]},"title_number":{"type":["string","null"]},"children":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["jurisdiction","document_type","code","title","chapter"]},"label":{"type":"string"},"path":{"type":"string"},"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"code_name":{"type":["string","null"]},"title_number":{"type":["string","null"]},"chapter_number":{"type":["string","null"]},"count":{"type":"integer"},"last_updated_at":{"type":["string","null"]}},"required":["kind","label","path","count","last_updated_at"]}}},"required":["level","path","jurisdiction","doc_type","code_name","title_number","children"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/source-registry":{"get":{"tags":["Search"],"summary":"List monitored sources","description":"Public source health. Payment is not required.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"required":false,"name":"jurisdiction","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":false,"name":"document_class","in":"query"},{"schema":{"type":"string","enum":["working","delayed","partial","unavailable","not monitored"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"boolean"},"required":false,"name":"supported","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Monitored sources.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"sources":[{"id":"99999999-9999-4999-8999-999999999999","jurisdiction":"WA","jurisdiction_name":"Washington","issuing_body":"Washington State Legislature","source_url":"https://leg.wa.gov/","document_class":"statute","historical_start":"1990-01-01","known_exclusions":[],"check_cadence":"daily","last_attempted_check":"2026-10-20T18:00:00.000Z","last_successful_check":"2026-10-20T18:00:00.000Z","publication_date":"2026-10-20","status":"working","supported":true,"failure_count":0,"stale":false}],"next_cursor":null,"has_more":false},"schema":{"type":"object","properties":{"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"jurisdiction":{"type":"string"},"jurisdiction_name":{"type":"string"},"issuing_body":{"type":"string"},"source_url":{"type":"string"},"document_class":{"type":"string"},"historical_start":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"known_exclusions":{"type":"array","items":{"type":"string"}},"check_cadence":{"type":["string","null"]},"last_attempted_check":{"type":["string","null"]},"last_successful_check":{"type":["string","null"]},"publication_date":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["working","delayed","partial","unavailable","not monitored"]},"supported":{"type":"boolean"},"failure_count":{"type":"integer","minimum":0},"stale":{"type":"boolean"}},"required":["id","jurisdiction","jurisdiction_name","issuing_body","source_url","document_class","historical_start","known_exclusions","check_cadence","last_attempted_check","last_successful_check","publication_date","status","supported","failure_count","stale"]}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["sources","next_cursor","has_more"]}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/research":{"post":{"tags":["Research"],"summary":"Start a deep research job","description":"Queue a multi-step research job over the Diurna corpus. The job searches and reads loaded official sources only. Poll GET /api/v1/research/{id} for status and, when complete, an answer with citations. Requires X-Api-Key. Jobs are kept for 24 hours.","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":2000},"jurisdiction":{"type":"string","pattern":"^[A-Za-z]{2}(-[A-Za-z0-9]+)?$"},"types":{"type":"array","items":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"minItems":1,"maxItems":7},"max_steps":{"type":"integer","minimum":2,"maximum":6}},"required":["question"],"additionalProperties":false}}}},"responses":{"202":{"description":"Queued research job.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","status":"completed","question":"How does 1 CFR 1.1 define Administrative Committee?","jurisdiction":"US","corpus":"diurna","mode":"extractive","answer":"1 CFR 1.1 [c1]: Administrative Committee means the Administrative Committee of the Federal Register established under section 1506 of title 44, United States Code.","disclaimer":"Answer drawn from Diurna's loaded official sources. Quotes are excerpts. Not legal advice.","message":"The answer quotes loaded official text directly.","citations":[{"passage_id":"c1","citation":"1 CFR 1.1","title":"Definitions.","source_url":"https://www.ecfr.gov/current/title-1/chapter-I/subchapter-A/part-1/section-1.1","quote":"Administrative Committee means the Administrative Committee of the Federal Register established under section 1506 of title 44, United States Code;","document_id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","jurisdiction":"US"}],"trace":[{"step":1,"action":"search","query":"Administrative Committee Federal Register","hit_count":1,"citation":null,"document_id":null,"doc_type":null,"mode":null},{"step":2,"action":"read","query":null,"hit_count":null,"citation":"1 CFR 1.1","document_id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","mode":null}],"created_at":"2026-10-28T00:00:00.000Z","started_at":"2026-10-28T00:00:01.000Z","finished_at":"2026-10-28T00:00:02.000Z","expires_at":"2026-10-29T00:00:00.000Z","error":null},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed"]},"question":{"type":"string","minLength":1,"maxLength":2000},"jurisdiction":{"type":["string","null"]},"corpus":{"type":"string","enum":["diurna"]},"mode":{"type":["string","null"],"enum":["extractive","model"]},"answer":{"type":["string","null"],"minLength":1,"maxLength":8000},"disclaimer":{"type":"string","minLength":1,"maxLength":500},"message":{"type":"string","minLength":1,"maxLength":500},"citations":{"type":"array","items":{"type":"object","properties":{"passage_id":{"type":"string","minLength":1,"maxLength":40},"citation":{"type":"string","minLength":1,"maxLength":1000},"title":{"type":"string","minLength":1,"maxLength":2000},"source_url":{"type":"string","maxLength":2000,"format":"uri"},"quote":{"type":"string","minLength":1,"maxLength":8000},"document_id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"jurisdiction":{"type":"string","minLength":1,"maxLength":80}},"required":["passage_id","citation","title","source_url","quote","document_id","doc_type","jurisdiction"],"additionalProperties":false},"maxItems":8},"trace":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["plan","search","read","answer"]},"query":{"type":["string","null"],"maxLength":500},"hit_count":{"type":["integer","null"],"minimum":0},"citation":{"type":["string","null"],"maxLength":1000},"document_id":{"type":["string","null"],"format":"uuid"},"doc_type":{"type":["string","null"],"enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"mode":{"type":["string","null"],"enum":["extractive","model"]}},"required":["step","action","query","hit_count","citation","document_id","doc_type","mode"],"additionalProperties":false},"maxItems":24},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"error":{"type":["string","null"],"minLength":1,"maxLength":500}},"required":["id","status","question","jurisdiction","corpus","mode","answer","disclaimer","message","citations","trace","created_at","started_at","finished_at","expires_at","error"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/research/{id}":{"get":{"tags":["Research"],"summary":"Poll a deep research job","description":"Read a research job started by this API key. Completed jobs include an answer and citations to loaded official sources.","security":[{"apiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Research job status.","headers":{"RateLimit-Limit":{"schema":{"type":"string","description":"Requests allowed in the current window."},"required":true,"description":"Requests allowed in the current window."},"RateLimit-Remaining":{"schema":{"type":"string","description":"Requests left in the current window."},"required":true,"description":"Requests left in the current window."},"RateLimit-Reset":{"schema":{"type":"string","description":"Seconds until the window resets."},"required":true,"description":"Seconds until the window resets."},"RateLimit-Policy":{"schema":{"type":"string","description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."},"required":true,"description":"Policy name, quota, and window in seconds. \"key\" means the window belongs to that API key."}},"content":{"application/json":{"example":{"id":"11111111-1111-4111-8111-111111111111","status":"completed","question":"How does 1 CFR 1.1 define Administrative Committee?","jurisdiction":"US","corpus":"diurna","mode":"extractive","answer":"1 CFR 1.1 [c1]: Administrative Committee means the Administrative Committee of the Federal Register established under section 1506 of title 44, United States Code.","disclaimer":"Answer drawn from Diurna's loaded official sources. Quotes are excerpts. Not legal advice.","message":"The answer quotes loaded official text directly.","citations":[{"passage_id":"c1","citation":"1 CFR 1.1","title":"Definitions.","source_url":"https://www.ecfr.gov/current/title-1/chapter-I/subchapter-A/part-1/section-1.1","quote":"Administrative Committee means the Administrative Committee of the Federal Register established under section 1506 of title 44, United States Code;","document_id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","jurisdiction":"US"}],"trace":[{"step":1,"action":"search","query":"Administrative Committee Federal Register","hit_count":1,"citation":null,"document_id":null,"doc_type":null,"mode":null},{"step":2,"action":"read","query":null,"hit_count":null,"citation":"1 CFR 1.1","document_id":"00000000-0000-4000-8000-0000000000c1","doc_type":"cfr","mode":null}],"created_at":"2026-10-28T00:00:00.000Z","started_at":"2026-10-28T00:00:01.000Z","finished_at":"2026-10-28T00:00:02.000Z","expires_at":"2026-10-29T00:00:00.000Z","error":null},"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","running","completed","failed"]},"question":{"type":"string","minLength":1,"maxLength":2000},"jurisdiction":{"type":["string","null"]},"corpus":{"type":"string","enum":["diurna"]},"mode":{"type":["string","null"],"enum":["extractive","model"]},"answer":{"type":["string","null"],"minLength":1,"maxLength":8000},"disclaimer":{"type":"string","minLength":1,"maxLength":500},"message":{"type":"string","minLength":1,"maxLength":500},"citations":{"type":"array","items":{"type":"object","properties":{"passage_id":{"type":"string","minLength":1,"maxLength":40},"citation":{"type":"string","minLength":1,"maxLength":1000},"title":{"type":"string","minLength":1,"maxLength":2000},"source_url":{"type":"string","maxLength":2000,"format":"uri"},"quote":{"type":"string","minLength":1,"maxLength":8000},"document_id":{"type":"string","format":"uuid"},"doc_type":{"type":"string","enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"jurisdiction":{"type":"string","minLength":1,"maxLength":80}},"required":["passage_id","citation","title","source_url","quote","document_id","doc_type","jurisdiction"],"additionalProperties":false},"maxItems":8},"trace":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","exclusiveMinimum":0},"action":{"type":"string","enum":["plan","search","read","answer"]},"query":{"type":["string","null"],"maxLength":500},"hit_count":{"type":["integer","null"],"minimum":0},"citation":{"type":["string","null"],"maxLength":1000},"document_id":{"type":["string","null"],"format":"uuid"},"doc_type":{"type":["string","null"],"enum":["section","session_law","ordinance","bill","executive_order","cfr","opinion"]},"mode":{"type":["string","null"],"enum":["extractive","model"]}},"required":["step","action","query","hit_count","citation","document_id","doc_type","mode"],"additionalProperties":false},"maxItems":24},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"error":{"type":["string","null"],"minLength":1,"maxLength":500}},"required":["id","status","question","jurisdiction","corpus","mode","answer","disclaimer","message","citations","trace","created_at","started_at","finished_at","expires_at","error"],"additionalProperties":false}}}},"400":{"description":"The request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"The rate limit for this key or client is exhausted.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"webhooks":{}}