{"openapi":"3.1.0","info":{"title":"Ryskra API","version":"1.0.0","description":"Read-only access to your organization's Ryskra data, plus signed webhooks. Available on the Enterprise and Private Cloud plans once Ryskra switches API access on for your organization.\n\nKeys are created by your organization's API managers in Settings → API & webhooks, always expire (30, 60, 90 days), are shown once, carry only the scopes chosen, and can be limited to IP ranges. Send them as `Authorization: Bearer rsk_...`.\n\nEach key may make 300 requests a minute (X-RateLimit-* headers). Errors are {\"error\": string, \"code\": string}."},"servers":[{"url":"https://api.ryskra.com/api/v1/public"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"rsk_<prefix>_<secret>"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}},"schemas":{"Incident":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"type":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"description":{"type":["string","null"]},"occurred_at":{"type":["string","null"],"format":"date-time"},"closed_at":{"type":["string","null"],"format":"date-time"},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"department_id":{"type":["string","null"]},"body_part":{"type":["string","null"]},"shift":{"type":["string","null"]},"task_category":{"type":["string","null"]},"root_cause_category":{"type":["string","null"]},"osha_recordable":{"type":["boolean","null"]},"anonymous":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Hazard":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"anonymous":{"type":"boolean"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"incident_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Inspection":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"template":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"location":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"total_items":{"type":"integer"},"passed_items":{"type":"integer"},"failed_items":{"type":"integer"},"score_pct":{"type":["integer","null"]},"summary":{"type":["string","null"]},"findings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string"},"action_item_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Capa":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"source":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},"status":{"type":"string"},"priority":{"type":"string"},"due_date":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TrainingAssignment":{"type":"object","properties":{"id":{"type":"string"},"course":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":["string","null"]}}},"person":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"status":{"type":"string"},"due_date":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"score":{"type":["integer","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Location":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"parent_id":{"type":["string","null"]},"address":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"role":{"type":"string"},"department":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"job_title":{"type":["string","null"]},"employee_id":{"type":["string","null"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Osha300Row":{"type":"object","properties":{"case_number":{"type":"string"},"employee_name":{"type":"string","description":"\"Privacy case\" for privacy cases."},"privacy_case":{"type":"boolean"},"job_title":{"type":"string"},"date_of_injury":{"type":"string","format":"date"},"where":{"type":"string"},"description":{"type":"string"},"classification":{"type":"string"},"days_away":{"type":"integer"},"days_restricted":{"type":"integer"},"injury_or_illness":{"type":"string"},"incident_id":{"type":"string"}}}}},"x-scopes":{"incidents":"Incidents and near misses (no injured-person details, no medical data).","hazards":"Hazard reports and their review status.","inspections":"Completed and in-progress inspections, their findings and scores.","capa":"CAPA records and their status.","training":"Training assignments, completion and expiry.","osha":"Recordable cases as on the OSHA 300 log. Privacy cases are never named.","locations":"Sites, buildings, floors and zones.","users":"Name, email, role and department of active people. Nothing else."},"paths":{"/incidents":{"get":{"summary":"List incidents and near misses","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"incidents","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/hazards":{"get":{"summary":"List hazards","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"hazards","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Hazard"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/inspections":{"get":{"summary":"List inspections with findings","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"inspections","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Inspection"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/capa":{"get":{"summary":"List corrective actions","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"capa","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Capa"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/training/assignments":{"get":{"summary":"List training assignments","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"training","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TrainingAssignment"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/locations":{"get":{"summary":"List locations","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"locations","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/users":{"get":{"summary":"List people","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the previous page."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time (incremental sync)."}],"x-required-scope":"users","responses":{"200":{"description":"A page of records, oldest change first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/osha/establishments":{"get":{"summary":"Establishments that keep an OSHA 300 log","security":[{"apiKey":[]}],"x-required-scope":"osha","responses":{"200":{"description":"Establishments"}}}},"/osha/300":{"get":{"summary":"OSHA 300 log rows (complete cases)","security":[{"apiKey":[]}],"x-required-scope":"osha","parameters":[{"name":"establishment_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Rows","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Osha300Row"}},"incomplete_cases":{"type":"integer"}}}}}}}}},"/me":{"get":{"summary":"The key making the request (name, scopes, expiry)","security":[{"apiKey":[]}],"responses":{"200":{"description":"Key details"}}}}},"webhooks":{"incident.created":{"post":{"summary":"An incident or near miss is reported","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}},"incident.updated":{"post":{"summary":"An incident's status, details or classification changes","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}},"hazard.created":{"post":{"summary":"A hazard is reported","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}},"capa.status_changed":{"post":{"summary":"A corrective action moves to a new status","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}},"inspection.completed":{"post":{"summary":"An inspection is completed","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}},"training.completed":{"post":{"summary":"Someone passes a training course","description":"POST to your HTTPS endpoint with headers Ryskra-Event, Ryskra-Delivery and Ryskra-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint's signing secret>. Verify the signature and reject timestamps older than 5 minutes. Return 2xx within 10 seconds; failures are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h. Body: {\"id\", \"type\", \"created_at\", \"data\": <the record, same shape as the API>}.","responses":{"200":{"description":"Received"}}}}}}