{"openapi":"3.1.0","info":{"title":"Nech API","version":"v1"},"servers":[{"url":"https://api.nech.ai"}],"security":[{"bearer":[]}],"paths":{"/v1/profile":{"get":{"operationId":"profile.get","summary":"Read the profile","x-nech-scope":"profile.read","parameters":[],"responses":{"200":{"description":"Read the profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":["string","null"]},"fullName":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"]},"dateFormat":{"type":["string","null"]},"numberFormat":{"type":["string","null"]},"onboardedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"baseCurrency":{"type":["string","null"]},"homeCountry":{"type":["string","null"]}},"required":["id","baseCurrency","homeCountry"],"additionalProperties":false}},"required":["id","email","fullName","locale","timezone","dateFormat","numberFormat","onboardedAt","space"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"profile.update","summary":"Update the profile","x-nech-scope":"profile.write","parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"fullName":{"type":"string","minLength":1},"locale":{"type":"string","minLength":1},"timezone":{"type":"string","minLength":1},"dateFormat":{"type":"string","minLength":1},"numberFormat":{"type":"string","minLength":1},"homeCountry":{"type":"string","pattern":"^[A-Z]{2}$"},"baseCurrency":{"type":"string","pattern":"^[A-Z]{3}$"}}}}}},"responses":{"200":{"description":"Update the profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"email":{"type":["string","null"]},"fullName":{"type":["string","null"]},"locale":{"type":["string","null"]},"timezone":{"type":["string","null"]},"dateFormat":{"type":["string","null"]},"numberFormat":{"type":["string","null"]},"onboardedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"baseCurrency":{"type":["string","null"]},"homeCountry":{"type":["string","null"]}},"required":["id","baseCurrency","homeCountry"],"additionalProperties":false}},"required":["id","email","fullName","locale","timezone","dateFormat","numberFormat","onboardedAt","space"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}},"/v1/profile/options":{"get":{"operationId":"profile.options","summary":"List the profile options","x-nech-scope":"profile.read","parameters":[],"responses":{"200":{"description":"List the profile options","content":{"application/json":{"schema":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"currencyDefault":{"type":["string","null"]},"localeDefault":{"type":["string","null"]},"timezoneDefault":{"type":["string","null"]}},"required":["code","currencyDefault","localeDefault","timezoneDefault"],"additionalProperties":false}},"currencies":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"exponent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","exponent"],"additionalProperties":false}}},"required":["countries","currencies"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A Supabase session JWT, an OAuth token (nech_at_) or an API key (nech_pat_)."}},"schemas":{"Error":{"type":"object","required":["error","code","requestId"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"reason":{"type":"string"},"requiredScope":{"type":"string"},"requestId":{"type":"string"}}}},"responses":{"Error":{"description":"The error body of every Door.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"The caller sent more requests than the window admits.","headers":{"Retry-After":{"description":"Seconds until the next window opens.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}