{"openapi":"3.1.0","info":{"title":"FairlyKnown customer read API","version":"1.0.0","description":"Read-only access to your own FairlyKnown account: plan, credits, approved public facts, and pages. Every call returns only the signed-in customer's own data. Private facts, email, payment details and other customers' data are never returned. Writes (approving facts, publishing, paying) stay in the app with a person in the loop."},"servers":[{"url":"https://app.personalreputationmanagement.org"}],"security":[{"bearer":[]}],"paths":{"/api/v1/me":{"get":{"operationId":"getMe","summary":"Your plan, credit balance and sites","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"/api/v1/facts":{"get":{"operationId":"listFacts","summary":"Your approved public facts","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}},"/api/v1/pages":{"get":{"operationId":"listPages","summary":"Pages on your site(s)","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["scheduled","held","published","rejected"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your own FairlyKnown session access token (the signed-in browser session also works). Tokens expire; refresh by signing in again."}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"schemas":{"Me":{"type":"object","properties":{"plan":{"type":["object","null"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"renews_at":{"type":"string","format":"date-time"},"cancel_at_period_end":{"type":"boolean"},"sites_billed":{"type":"integer"}}},"credits":{"type":"object","properties":{"balance":{"type":"integer"}}},"sites":{"type":"array","items":{"type":"object","properties":{"slot":{"type":"integer"},"status":{"type":"string"},"template":{"type":"string"}}}}}},"Fact":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"display_text":{"type":"string"},"valid_from":{"type":["string","null"],"format":"date"},"valid_to":{"type":["string","null"],"format":"date"},"approved_at":{"type":"string","format":"date-time"}}},"Page":{"type":"object","properties":{"id":{"type":"string"},"site_slot":{"type":["integer","null"]},"role":{"type":"string"},"hub_slug":{"type":["string","null"]},"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"status":{"type":"string"},"publish_after":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"markdown":{"type":["string","null"],"description":"Only for published pages"}}}}}}