{"openapi":"3.1.0","info":{"title":"RetainerProof API","version":"1.0.0","description":"Token-authenticated API for an agency account. Keys are created in Brand settings. A key can only read and write that account. An active subscription is required."},"servers":[{"url":"https://retainerproof.com/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]},"StatusSummary":{"type":"object","properties":{"state":{"type":"string"},"summary":{"type":"string"},"checkedAt":{"type":["string","null"]}}},"WorkLogEntry":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":["string","null"]},"note":{"type":"string"},"category":{"type":"string","enum":["Update","Content","Fix","Meeting","Other"]},"minutes":{"type":["integer","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}}}},"paths":{"/sites":{"get":{"summary":"List sites","responses":{"200":{"description":"Sites on this account, with the latest check summary."},"401":{"description":"Missing, invalid, or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"No active subscription."},"429":{"description":"More than 60 requests in a minute for this key."}}}},"/sites/{id}":{"get":{"summary":"Site status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Uptime, TLS and domain expiry, last check time, and the client digest URL."},"404":{"description":"No site with that id on this account."}}}},"/sites/{id}/work-log":{"get":{"summary":"List work log entries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Entries for this site."},"404":{"description":"Site not on this account."}}},"post":{"summary":"Add a work log entry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":120},"date":{"type":"string","description":"YYYY-MM-DD. Optional."},"note":{"type":"string","maxLength":2000},"category":{"type":"string","enum":["Update","Content","Fix","Meeting","Other"]},"minutes":{"type":"integer","minimum":1,"maximum":10080}}}}}},"responses":{"201":{"description":"Created."},"422":{"description":"Validation failed."}}}},"/sites/{id}/work-log/{entryId}":{"patch":{"summary":"Update a work log entry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated."},"404":{"description":"Entry not on this site."},"422":{"description":"Validation failed."}}},"delete":{"summary":"Delete a work log entry","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted."},"404":{"description":"Entry not on this site."}}}},"/sites/{id}/recipients":{"get":{"summary":"List client digest recipients","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Enabled flag, cadence (each, weekly, or monthly), and up to 5 addresses. Unsubscribed addresses stay listed."},"404":{"description":"Site not on this account."}}},"put":{"summary":"Replace client digest recipients","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","maxItems":5,"items":{"type":"string","format":"email"}},"enabled":{"type":"boolean"},"cadence":{"type":"string","enum":["each","weekly","monthly"]}}}}}},"responses":{"200":{"description":"Saved list. An address that already unsubscribed stays unsubscribed."},"404":{"description":"Site not on this account."},"422":{"description":"Invalid email, more than 5 addresses, or an unknown cadence."}}}},"/sites/{id}/check":{"post":{"summary":"Run check now","description":"Starts the same check as the dashboard button. If a check is already running for this site, that job is returned instead of starting another.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Check queued or already running."},"404":{"description":"Site not on this account."}}}}}}