# Authentication API

## POST /sdk/token

> Generates an SDK access token for the provided email.

```json
{"openapi":"3.0.3","info":{"title":"Authentication API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/authentication/v1","description":"UAT environment for SDK token generation"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/sdk/token":{"post":{"description":"Generates an SDK access token for the provided email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address of the user requesting the token."},"expiry_minutes":{"type":"integer","description":"Optional token lifetime in minutes (default 60).","default":60,"minimum":1}},"required":["email"]}}}},"responses":{"200":{"description":"Successfully generated SDK access token.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"data":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT access token for SDK authentication."}},"required":["access_token"]},"identifier":{"type":"string","description":"Identifier for the response, e.g., 'auth_successful'."}},"required":["success","data","identifier"]}}}},"400":{"description":"Bad Request - Invalid input or missing required fields.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'bad_request'."}},"required":["success","error","identifier"]}}}},"401":{"description":"Unauthorized - Invalid or missing API key.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'unauthorised'."}},"required":["success","error","identifier"]}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'internal_server_error'."}},"required":["success","error","identifier"]}}}}}}}}}
```
