openapi: 3.0.3 info: version: '1.0' title: Togai Apis Accounts Authentication API contact: email: engg@togai.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html description: APIs for Togai App servers: - description: Api endpoint url: https://api.togai.com/ - description: Sandbox api endpoint url: https://sandbox-api.togai.com/ security: - bearerAuth: [] tags: - name: Authentication description: Authentication API paths: /authenticate: post: tags: - Authentication summary: Generate Short Lived Bearer Token description: "Generates and returns a bearer token. Behavior of this API differs on the basis of the auth mechanism used to make the request.\n - For API key auth, this API generates a JWT token whcih is valid for 24 hours and returns it.\n - For JWT bearer auth, returns the same JWT token in response\nFor information on how to generate API token, refer [Generating New API Keys](https://docs.togai.com/api-reference/authentication#generating-new-api-keys) section of docs.\n" operationId: authenticate responses: '200': $ref: '#/components/responses/TokenResponse' '401': $ref: '#/components/responses/ErrorResponse' '403': $ref: '#/components/responses/ErrorResponse' '404': $ref: '#/components/responses/ErrorResponse' '429': $ref: '#/components/responses/ErrorResponse' default: $ref: '#/components/responses/ErrorResponse' security: - bearerAuth: [] components: responses: TokenResponse: description: OK content: application/json: schema: $ref: '#/components/schemas/TokenResponse' ErrorResponse: description: Error response content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ErrorResponse: summary: Error Message value: message: schemas: TokenResponse: type: object additionalProperties: false required: - token properties: token: type: string ErrorResponse: type: object additionalProperties: false required: - message properties: message: type: string description: error description maxLength: 500 securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: Bearer apiKeyAuth: type: apiKey in: header name: X-API-Key externalDocs: description: Find out more about Togai url: https://docs.togai.com/docs