{"openapi":"3.1.0","info":{"title":"UGC Flows API","version":"1.0.0","summary":"The open reads: service health and exchange rates.","description":"UGC Flows (ugcflows.com) runs the editing, posting and finances of a UGC creator's business.\n\nThere is no public API onto a creator's account. These are the open endpoints, which need no authentication.\n\nEvery error under `/api/` is JSON: `{ error, message, hint, docs }`.\n\nHuman-readable docs: https://www.ugcflows.com/developers.","contact":{"name":"UGC Flows","email":"hello@ugcflows.com","url":"https://www.ugcflows.com/developers"},"termsOfService":"https://www.ugcflows.com/terms"},"externalDocs":{"description":"UGC Flows developer docs","url":"https://www.ugcflows.com/developers"},"servers":[{"url":"https://www.ugcflows.com","description":"Production"}],"tags":[{"name":"Status","description":"Open reads, no authentication."}],"paths":{"/api/health":{"get":{"tags":["Status"],"operationId":"getHealth","summary":"Is the service up","description":"Pings the database under a four second budget. 200 when it answered, 503 when it did not.","security":[],"responses":{"200":{"description":"The database answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"405":{"description":"The method is not supported on this path. The `Allow` header lists the ones that are.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"The database did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/api/fx":{"get":{"tags":["Status"],"operationId":"getExchangeView","summary":"The display currency for this caller","description":"The currency the caller's figures are annotated in and today's USD rate for it, resolved from their own session or their request's country. `view` is null when the answer is USD only. Never cached: the answer depends on the caller.","security":[],"responses":{"200":{"description":"The view, or null.","content":{"application/json":{"schema":{"type":"object","required":["view"],"properties":{"view":{"type":["object","null"],"additionalProperties":true}}}}}},"405":{"description":"The method is not supported on this path. The `Allow` header lists the ones that are.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error","message","hint","docs"],"properties":{"error":{"type":"string","description":"A machine code, such as `not_found` or `method_not_allowed`."},"message":{"type":"string","description":"What happened."},"hint":{"type":"string","description":"What to do about it."},"docs":{"type":"string","format":"uri","description":"Where the API is described."}}},"Health":{"type":"object","required":["ok","db","at"],"properties":{"ok":{"type":"boolean"},"db":{"type":"object","properties":{"ok":{"type":"boolean"},"ms":{"type":"integer"}}},"at":{"type":"string","format":"date-time"},"media":{"type":"object","additionalProperties":true}}}}}}