{"openapi":"3.1.0","info":{"title":"POST /api/v1/oauth2/token","version":"1.0.0","description":"Get Token"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/oauth2/token":{"post":{"tags":["oauth"],"summary":"Get Token","description":"Issue OAuth access + refresh tokens for a user.\n\nReturns standard ``access_token`` / ``refresh_token`` as Bearer\ncredentials for all subsequent API calls.","operationId":"get_token_api_v1_oauth2_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_get_token_api_v1_oauth2_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_token_api_v1_oauth2_token_post":{"properties":{"user_email":{"type":"string","title":"User Email","description":"User's email address"}},"type":"object","required":["user_email"],"title":"Body_get_token_api_v1_oauth2_token_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OAuthTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"The access token (JWT)"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'Bearer')","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Access token lifetime in seconds"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"Refresh token for obtaining new access tokens"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"Granted scope (may differ from requested)"}},"type":"object","required":["access_token","expires_in"],"title":"OAuthTokenResponse","description":"Token Response.\n\nReturned after successful token or refresh request."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}