{"openapi":"3.2.0","info":{"title":"syntaqx API","version":"2026-10-22","description":"Public API for syntaqx.com. Pick a dated version with the Api-Version request header (without it, the oldest supported version is used). Breaking changes never ship in place; deprecations are announced with Deprecation and Sunset headers at least 30 days before removal. See https://www.syntaqx.com/docs/api-design/versioning.","contact":{"name":"Chase Pierce","url":"https://www.syntaqx.com/contact","email":"syntaqx@gmail.com"}},"servers":[{"url":"https://api.syntaqx.com","description":"Production"}],"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Field-level validation errors"}},"required":["message"]},"HealthzResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]},"UuidArray":{"type":"array","items":{"$ref":"#/components/schemas/Uuid"}},"Uuid":{"type":"string","format":"uuid"},"IpResponse":{"type":"object","properties":{"ip":{"type":"string"},"forwarded_for":{"type":["string","null"]},"user_agent":{"type":["string","null"]}},"required":["ip","forwarded_for","user_agent"]},"HashResponse":{"type":"object","properties":{"algorithm":{"type":"string"},"digest":{"type":"string","description":"Hex-encoded hash digest"}},"required":["algorithm","digest"]},"HashRequest":{"type":"object","properties":{"input":{"type":"string","description":"The text to hash","example":"hello world"},"algorithm":{"type":"string","enum":["MD5","SHA-1","SHA-256","SHA-384","SHA-512"],"default":"SHA-256","description":"Hash algorithm"}},"required":["input"]},"Base64Response":{"type":"object","properties":{"output":{"type":"string"}},"required":["output"]},"Base64Request":{"type":"object","properties":{"input":{"type":"string","description":"The string to encode or decode","example":"hello world"},"action":{"type":"string","enum":["encode","decode"],"default":"encode","description":"Whether to encode or decode"},"url_safe":{"type":"boolean","default":false,"description":"Use URL-safe base64 (RFC 4648 §5)"}},"required":["input"]},"JwtDecodeResponse":{"type":"object","properties":{"header":{"type":"object","additionalProperties":{}},"payload":{"type":"object","additionalProperties":{}},"expired":{"type":["boolean","null"],"description":"null if no exp claim is present"}},"required":["header","payload","expired"]},"JwtDecodeRequest":{"type":"object","properties":{"token":{"type":"string","description":"The JWT to decode (no verification)","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["token"]},"TimestampResponse":{"type":"object","properties":{"unix":{"type":"number","description":"Unix timestamp (seconds)"},"unix_ms":{"type":"number","description":"Unix timestamp (milliseconds)"},"rfc3339":{"type":"string","description":"RFC 3339 / ISO 8601 formatted"},"rfc2822":{"type":"string","description":"RFC 2822 formatted"},"day_of_year":{"type":"number"},"week_of_year":{"type":"number"},"leap_year":{"type":"boolean"}},"required":["unix","unix_ms","rfc3339","rfc2822","day_of_year","week_of_year","leap_year"]},"FlakyResponse":{"type":"object","properties":{"attempt_id":{"type":"string","format":"uuid","description":"Unique ID for this attempt (useful for log correlation)"},"latency_ms":{"type":"number","description":"Artificial delay applied (milliseconds)"}},"required":["attempt_id","latency_ms"]},"UseragentResponse":{"type":"object","properties":{"raw":{"type":"string","description":"Original User-Agent string"},"browser":{"type":["string","null"]},"browser_version":{"type":["string","null"]},"os":{"type":["string","null"]},"device":{"type":"string","enum":["desktop","mobile","tablet","bot","unknown"]}},"required":["raw","browser","browser_version","os","device"]},"DocSummary":{"type":"object","properties":{"slug":{"type":"string","example":"requests/idempotency"},"url":{"type":"string","format":"uri","example":"https://www.syntaqx.com/docs/requests/idempotency"},"title":{"type":"string","example":"Idempotency"},"description":{"type":"string"},"section":{"type":"string","example":"money"},"category":{"type":"string","example":"Money"},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"integer","description":"Position in the playbook's reading order, from 1"}},"required":["slug","url","title","description","section","category","tags","position"]},"DocsQuery":{"type":"object","properties":{"section":{"type":"array","items":{"type":"string"},"description":"Any of these sections","example":["money"]},"tag":{"type":"array","items":{"type":"string"},"description":"Docs with any of these tags"},"q":{"type":"string","description":"Free text over title and description"},"sort":{"type":"string","enum":["position","-position","title","-title"]},"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","description":"Opaque cursor from a previous response's Link header"}}},"Doc":{"type":"object","properties":{"slug":{"type":"string","example":"payments/idempotency"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"section":{"type":"string"},"category":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"integer"},"content":{"type":"string","description":"The doc's Markdown body"}},"required":["slug","url","title","description","section","category","tags","position","content"]},"Echo":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"A new UUID v7, different on every non-replayed request"},"created_at":{"type":"string","example":"2026-10-22T14:23:45.123Z"},"payload":{"type":"object","additionalProperties":{},"description":"The JSON object you sent"}},"required":["id","created_at","payload"]},"CreatedSecret":{"type":"object","properties":{"id":{"type":"string","example":"pX3c0Qb7e1u9KkHn4WfTz2aLr8YdVs6M"},"url":{"type":"string","format":"uri","description":"The one-time link. Reading it returns the secret and deletes it.","example":"https://api.syntaqx.com/secrets/pX3c0Qb7e1u9KkHn4WfTz2aLr8YdVs6M"},"expires_at":{"type":"string","example":"2026-10-29T15:23:45.000Z"}},"required":["id","url","expires_at"]},"Secret":{"type":"object","properties":{"secret":{"type":"string","example":"hunter2"}},"required":["secret"]}},"parameters":{"ApiVersion":{"name":"Api-Version","in":"header","required":false,"description":"Dated API version (YYYY-MM-DD). Defaults to the oldest supported version. Unsupported values return 400.","schema":{"type":"string","enum":["2026-10-22"],"default":"2026-10-22"}}}},"paths":{"/healthz":{"get":{"operationId":"getHealth","summary":"Health check","description":"Returns the current health status of the API.","tags":["System"],"responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthzResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/uuid":{"get":{"operationId":"generateUuids","summary":"Generate UUIDs","description":"Generate one or more UUIDs. Returns an array of UUID v7s by default (sortable, per https://www.syntaqx.com/docs/fundamentals/identifier-conventions), or v4 with `?version=4`. Use `?count=N` (max 100) to control how many.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","description":"Number of UUIDs to generate (1–100, default 1)"},"required":false,"description":"Number of UUIDs to generate (1–100, default 1)","name":"count","in":"query"},{"schema":{"type":"string","enum":["4","7"],"description":"UUID version: 7 (default, time-ordered) or 4 (random)"},"required":false,"description":"UUID version: 7 (default, time-ordered) or 4 (random)","name":"version","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"An array of UUID strings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UuidArray"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ip":{"get":{"operationId":"getClientIp","summary":"Client IP address","description":"Returns the caller's IP address, the full X-Forwarded-For chain, and User-Agent.","tags":["Utilities"],"responses":{"200":{"description":"Caller information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/hash":{"post":{"operationId":"hashString","summary":"Hash a string","description":"Compute a cryptographic hash of the provided input. Supported algorithms: MD5, SHA-1, SHA-256, SHA-384, SHA-512. Hashing is a safe, read-only operation, so prefer the QUERY method on this path; POST with `X-HTTP-Method-Override: QUERY` is the fallback for clients that can't send QUERY. See https://www.syntaqx.com/docs/requests/http-query.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","enum":["QUERY"],"description":"Send `QUERY` to have this POST handled as an HTTP QUERY."},"required":false,"description":"Send `QUERY` to have this POST handled as an HTTP QUERY.","name":"X-HTTP-Method-Override","in":"header"},{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashRequest"}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashResponse"}}}},"400":{"description":"Malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"query":{"operationId":"queryHash","summary":"Hash a string with QUERY","description":"The same hash as POST /hash, sent with the HTTP QUERY method (RFC 10008): safe, idempotent and cacheable. A digest never changes for the same input, so successful responses are `immutable`. Query content is limited to 64 KB. See https://www.syntaqx.com/docs/requests/http-query.","tags":["Utilities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashRequest"}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HashResponse"}}}},"400":{"description":"Missing Content-Type, or malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Query content over 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported query format; see the Accept-Query header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/base64":{"post":{"operationId":"convertBase64","summary":"Base64 encode/decode","description":"Encode a string to base64 or decode a base64 string. Supports standard and URL-safe variants.","tags":["Utilities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64Request"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64Response"}}}},"400":{"description":"Malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/jwt/decode":{"post":{"operationId":"decodeJwt","summary":"Decode a JWT","description":"Decode a JSON Web Token without signature verification. Returns the header, payload, and whether the token is expired.","tags":["Utilities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwtDecodeRequest"}}}},"responses":{"200":{"description":"Decoded JWT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwtDecodeResponse"}}}},"400":{"description":"Malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/timestamp":{"get":{"operationId":"getTimestamp","summary":"Current timestamp","description":"Returns the current time in multiple formats. Optionally pass `?t=` with a Unix timestamp (seconds or milliseconds) or ISO 8601 string to convert.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","description":"Unix timestamp (seconds or ms) or ISO 8601 string to convert"},"required":false,"description":"Unix timestamp (seconds or ms) or ISO 8601 string to convert","name":"t","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Timestamp in multiple formats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimestampResponse"}}}},"422":{"description":"Invalid timestamp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/flaky":{"get":{"operationId":"getFlaky","summary":"Simulate an unreliable service","description":"Returns success or failure based on a configurable rate. Use this to test retry logic, circuit breakers, and timeout handling. The response is intentionally random: the same request may succeed or fail.","tags":["Testing"],"parameters":[{"schema":{"type":"string","description":"Success rate as a percentage (0–100, default 50). 0 = always fail, 100 = always succeed."},"required":false,"description":"Success rate as a percentage (0–100, default 50). 0 = always fail, 100 = always succeed.","name":"rate","in":"query"},{"schema":{"type":"string","description":"HTTP status code to return on failure (400–599, default 500)"},"required":false,"description":"HTTP status code to return on failure (400–599, default 500)","name":"status","in":"query"},{"schema":{"type":"string","description":"Maximum random delay in milliseconds before responding (0–10000, default 0)"},"required":false,"description":"Maximum random delay in milliseconds before responding (0–10000, default 0)","name":"delay","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Success: the request \"survived\"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlakyResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Simulated failure (or whatever status code was requested)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/random":{"get":{"operationId":"generateRandom","summary":"Generate random strings","description":"Generate one or more random strings. Defaults to a single 32-character alphanumeric string. Use `?count=N` (max 100) to receive an array.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","description":"String length (1–1024, default 32)"},"required":false,"description":"String length (1–1024, default 32)","name":"length","in":"query"},{"schema":{"type":"string","description":"Character set: alphanumeric (default), alpha, numeric, hex"},"required":false,"description":"Character set: alphanumeric (default), alpha, numeric, hex","name":"charset","in":"query"},{"schema":{"type":"string","description":"Number of strings (1–100)"},"required":false,"description":"Number of strings (1–100)","name":"count","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"An array of random strings","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/useragent":{"get":{"operationId":"parseUserAgent","summary":"Parse a User-Agent string","description":"Parse a User-Agent string into browser, OS, and device type. Defaults to the caller's User-Agent. Pass `?ua=` to parse an arbitrary string.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","description":"User-Agent string to parse (defaults to caller's)"},"required":false,"description":"User-Agent string to parse (defaults to caller's)","name":"ua","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Parsed User-Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseragentResponse"}}}},"400":{"description":"Missing User-Agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/docs":{"get":{"operationId":"listDocs","summary":"List the playbook's docs","description":"The playbook as data, and a working example of its own request docs: filters (`section`, `tag`, comma-separated means any of), free text `q`, `sort` (`position` default or `title`, `-` for descending), cursor pagination through the `Link` header (`limit` 1 to 100, default 25), and ETags. Unknown parameters, an over-the-limit `limit`, or a cursor reused with different filters return 422. See https://www.syntaqx.com/docs/requests/pagination and https://www.syntaqx.com/docs/requests/filtering-and-sorting.","tags":["Playbook"],"parameters":[{"schema":{"type":"string","example":"money,security"},"required":false,"name":"section","in":"query"},{"schema":{"type":"string","example":"idempotency"},"required":false,"name":"tag","in":"query"},{"schema":{"type":"string","example":"retry"},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","example":"-title"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","example":"10"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Matching docs, as a bare array. When there are more, the `Link` header has a `rel=\"next\"` URL; follow it as-is.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocSummary"}}}}},"304":{"description":"Not modified (If-None-Match matched); doesn't count against the rate limit"},"422":{"description":"Unknown parameter, invalid sort or limit, or a cursor from different filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"query":{"operationId":"queryDocs","summary":"Query the playbook's docs with QUERY","description":"The same filters as GET /docs, sent as a JSON body with the HTTP QUERY method (RFC 10008), so long or structured filters stay out of the URL. The `Link` header's next page is the equivalent GET URL. See https://www.syntaqx.com/docs/requests/http-query.","tags":["Playbook"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsQuery"}}}},"responses":{"200":{"description":"Matching docs, as a bare array. When there are more, the `Link` header has a `rel=\"next\"` URL; follow it as-is.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocSummary"}}}}},"400":{"description":"Missing Content-Type, or malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported query format; see the Accept-Query header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Unknown parameter, invalid sort or limit, or a cursor from different filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/docs/{slug}":{"get":{"operationId":"getDoc","summary":"Get one doc","description":"One doc with its Markdown body. The slug is the doc's path under /docs and usually has two parts, like `payments/idempotency`.","tags":["Playbook"],"parameters":[{"schema":{"type":"string","example":"payments/idempotency"},"required":true,"name":"slug","in":"path"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"The doc","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Doc"}}}},"304":{"description":"Not modified (If-None-Match matched)"},"404":{"description":"No doc at that slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/echo":{"post":{"operationId":"createEcho","summary":"Create an echo (idempotency demo)","description":"Creates an echo of a JSON object with a new id and timestamp, so every call is a new side effect. Send an `Idempotency-Key` to make retries safe: the same key and body replay the original response with `Idempotent-Replayed: true`; the same key with a different body is a 400; a retry while the first is still running is a 409. Keys are kept 24 hours, scoped to your IP. See https://www.syntaqx.com/docs/requests/idempotency.","tags":["Playbook"],"parameters":[{"schema":{"type":"string","maxLength":255,"description":"Your key for this logical operation; reuse it on every retry","example":"f47ac10b-58cc-4372-a567-0e02b2c3d479"},"required":false,"description":"Your key for this logical operation; reuse it on every retry","name":"Idempotency-Key","in":"header"},{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{},"example":{"hello":"world"}}}}},"responses":{"201":{"description":"Echo created (or replayed, with Idempotent-Replayed: true)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Echo"}}}},"400":{"description":"Malformed JSON, an invalid Idempotency-Key, or a key already used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A request with this Idempotency-Key is still in progress; retry shortly with the same key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body over 16 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body isn't a JSON object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Idempotency storage unavailable; nothing was created, retry with the same key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/secrets":{"post":{"operationId":"createSecret","summary":"Create a one-time secret","description":"Stores a secret behind a one-time link: the first GET of the link returns it and deletes it, and an unread secret expires after `ttl` seconds. It's stored encrypted under a key derived from the link, so only the link can read it. For end-to-end encryption, encrypt before sending and keep the key out of the request, as https://www.syntaqx.com/tools/secrets does: the API stores whatever string you send. Send `check` with it and a read must present the same value in a `Secret-Check` header, so a wrong key or a link without its key can't burn the secret. Each client can create 100 secrets a day.","tags":["Utilities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","minLength":1,"description":"Up to 96 KB of UTF-8"},"ttl":{"type":"integer","minimum":60,"maximum":604800,"description":"Seconds until an unread secret expires (60 to 604800, default 3600)"},"check":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"Optional base64url SHA-256 (43 characters) a read must send back as `Secret-Check`. /tools/secrets sends SHA-256 of `check:` + its key."}},"required":["secret"],"example":{"secret":"hunter2","ttl":600}}}}},"responses":{"201":{"description":"Secret stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedSecret"}}}},"400":{"description":"Malformed JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Secret over 96 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Missing secret, ttl out of range, or a malformed check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited, or over 100 secrets today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Secret storage unavailable; nothing was stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"$ref":"#/components/parameters/ApiVersion"}]}},"/secrets/{id}":{"get":{"operationId":"getSecret","summary":"Read a one-time secret","description":"Returns the secret and deletes it, so a second read is a 404. Expired secrets are a 404 too. A request that accepts `text/html` (a browser, or a chat app previewing the link) is redirected to https://www.syntaqx.com/tools/secrets instead, which reveals it only on a click.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","example":"pX3c0Qb7e1u9KkHn4WfTz2aLr8YdVs6M"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"The `check` the secret was created with, if it had one"},"required":false,"description":"The `check` the secret was created with, if it had one","name":"Secret-Check","in":"header"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"The secret, now deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"303":{"description":"Sent to the reveal page: the request accepts text/html"},"403":{"description":"Missing or wrong Secret-Check; the secret wasn't read or deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No secret with that id: already read, expired, or never created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Secret storage unavailable; the secret wasn't read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"head":{"operationId":"checkSecret","summary":"Check a one-time secret without reading it","description":"200 with `Secret-Expires-At` while the secret is unread, 404 once it's read or expired. Doesn't consume it, so a page can show whether a link still works before anyone reveals it.","tags":["Utilities"],"parameters":[{"schema":{"type":"string","example":"pX3c0Qb7e1u9KkHn4WfTz2aLr8YdVs6M"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"Unread","headers":{"Secret-Expires-At":{"schema":{"type":"string","description":"RFC 3339 time the secret expires","example":"2026-10-29T15:23:45.000Z"},"required":true,"description":"RFC 3339 time the secret expires"}}},"404":{"description":"Already read, expired, or never created"},"503":{"description":"Secret storage unavailable"}}}}},"webhooks":{}}