{"openapi":"3.1.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/versioning.","contact":{"name":"Chase Pierce","url":"https://www.syntaqx.com/contact","email":"syntaqx@gmail.com"}},"servers":[{"url":"https://api.syntaqx.com/v1","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"]},"UuidArray":{"type":"array","items":{"$ref":"#/components/schemas/Uuid"}},"Uuid":{"type":"string","format":"uuid"},"HealthzResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]},"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"]}},"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":{"/uuid":{"get":{"operationId":"generateUuids","summary":"Generate UUIDs","description":"Generate one or more UUIDs. Returns an array of v4 UUIDs. 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"},{"$ref":"#/components/parameters/ApiVersion"}],"responses":{"200":{"description":"An array of UUID strings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UuidArray"}}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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"}]}},"/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 this endpoint also accepts the HTTP QUERY method (RFC 10008) with the same body, or POST with `X-HTTP-Method-Override: QUERY` for clients that can't send QUERY. See https://www.syntaqx.com/docs/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":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/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":"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":"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"}}}},"400":{"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"}}}},"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"}}}}},"400":{"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"}}}}}}}},"webhooks":{}}