{"openapi":"3.1.0","info":{"title":"Support-OS API","version":"1.0.0","description":"Every successful response is `{\"data\": \u2026}`. Lists add\n`{\"meta\": {page, per_page, total, pages}}`.\n\nEvery refusal is `{\"error\": {\"code\", \"message\"}}`. **Branch on `code`, never on\n`message`** \u2014 codes are permanent, messages get reworded. Validation failures add\n`error.errors` keyed by field; some refusals add `error.meta` with machine-readable\ndetail, such as the scope a token was missing.\n\nError codes: `unauthenticated`, `token_invalid`, `token_expired`, `forbidden`, `scope_missing`, `not_found`, `validation_failed`, `method_not_allowed`, `unsupported_media_type`, `invalid_state`, `idempotency_conflict`, `rate_limited`, `quota_exceeded`, `server_error`\n\n**Retries.** Send an `Idempotency-Key` header on any write. Repeating the same key\nreplays the original response with `Idempotency-Replayed: true` instead of acting\ntwice, for 24 hours. Reusing a key with a different body is refused with\n`idempotency_conflict`.\n\n**Paging.** `per_page` defaults to 25 and is capped at 100. `meta.per_page` always\nstates what you actually got."},"servers":[{"url":"https:\/\/colossal-truth-245612.1wp.site\/api\/v1","description":"This installation"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A personal API token. Create one under Settings \u2192 API Tokens."}},"parameters":{"page":{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},"perPage":{"name":"per_page","in":"query","required":false,"description":"Clamped to 100. Never rejected for being too large.","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"idempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string. Repeating it replays the original response rather than acting twice.","schema":{"type":"string","maxLength":255}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthenticated","token_invalid","token_expired","forbidden","scope_missing","not_found","validation_failed","method_not_allowed","unsupported_media_type","invalid_state","idempotency_conflict","rate_limited","quota_exceeded","server_error"],"description":"Stable. Branch on this."},"message":{"type":"string","description":"For humans. May be reworded at any time."},"errors":{"type":"object","description":"Validation only, keyed by field.","additionalProperties":{"type":"array","items":{"type":"string"}}},"meta":{"type":"object","description":"Machine-readable detail, when there is any."}}}}},"PageMeta":{"type":"object","required":["page","per_page","total","pages"],"properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"}}},"Ticket":{"type":"object","properties":{"id":{"type":"integer"},"ticket_number":{"type":"string","examples":["TCK-40118"]},"subject":{"type":"string"},"status":{"type":"string","enum":["RECEIVED","INVESTIGATING","RESOLVED","CLOSED"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]},"created_at":{"type":"string","format":"date-time"}}},"Record":{"type":"object","properties":{"id":{"type":"integer"},"schema":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"string"},"attributes":{"type":"object","description":"Whatever the workspace defined for this record type."}}},"Me":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string"},"tenant_id":{"type":"integer"},"tenant":{"type":"string"}}}},"responses":{"Unauthenticated":{"description":"No valid token.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Forbidden":{"description":"Known, but not permitted. Check `error.code` for `scope_missing`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"NotFound":{"description":"No such resource \u2014 or not yours. Deliberately indistinguishable.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Unprocessable":{"description":"`validation_failed`, `invalid_state`, or `idempotency_conflict`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"RateLimited":{"description":"Slow down. See `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"paths":{"\/commands":{"get":{"summary":"Commands this token may execute.","responses":{"200":{"description":"The available commands."},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"description":"Role: `any` \u00b7 Scope: `none`"}},"\/commands\/execute":{"post":{"summary":"Execute a command. Refusals answer `invalid_state`.","responses":{"200":{"description":"The command result."},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string"},"payload":{"type":"object"}}}}}},"description":"Role: `any` \u00b7 Scope: `tickets:write`"}},"\/entities":{"get":{"summary":"Records of the workspace\u2019s own types.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/perPage"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Record"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"description":"Role: `admin` \u00b7 Scope: `records:read`"},"post":{"summary":"Create a record.","responses":{"201":{"description":"The resource.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Record"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["schema_key","attributes"],"properties":{"schema_key":{"type":"string"},"attributes":{"type":"object"}}}}}},"description":"Role: `admin` \u00b7 Scope: `records:write`"}},"\/me":{"get":{"summary":"The token\u2019s own identity. Unscoped, so a token can always verify itself.","responses":{"200":{"description":"The resource.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Me"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"description":"Role: `any` \u00b7 Scope: `none`"}},"\/tickets":{"get":{"summary":"Tickets. Customers see their own; staff see the workspace.","parameters":[{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/perPage"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Ticket"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"description":"Role: `any` \u00b7 Scope: `tickets:read`"},"post":{"summary":"Raise a ticket.","responses":{"201":{"description":"The resource.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Ticket"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["issue_category","subject","description"],"properties":{"issue_category":{"type":"string"},"subject":{"type":"string"},"description":{"type":"string"},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]}}}}}},"description":"Role: `customer` \u00b7 Scope: `tickets:write`"}},"\/tickets\/{id}":{"get":{"summary":"One ticket, with its timeline.","responses":{"200":{"description":"The resource.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Ticket"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"description":"Role: `any` \u00b7 Scope: `tickets:read`"},"patch":{"summary":"Change status, priority or assignment.","responses":{"200":{"description":"The resource.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Ticket"}}}}}},"401":{"$ref":"#\/components\/responses\/Unauthenticated"},"403":{"$ref":"#\/components\/responses\/Forbidden"},"429":{"$ref":"#\/components\/responses\/RateLimited"}},"parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":[],"properties":{"status":{"type":"string","enum":["RECEIVED","INVESTIGATING","RESOLVED","CLOSED"]},"priority":{"type":"string","enum":["LOW","MEDIUM","HIGH","URGENT"]}}}}}},"description":"Role: `agent,admin` \u00b7 Scope: `tickets:write`"}}}}