---
updatedAt: 2026-05-14T19:40:34.000Z
agentTools:
  projectIndex: https://docs-connect-api-v4.eventtia.com/llms.txt
---

# Obtain JWT token

Exchanges email/password credentials for a JWT token.

On success returns a `token` that must be included on every subsequent
request as an HTTP header:

```
Authorization: Bearer <token>
```

**Runtime override (MCP / FastMCP integration):**
Clients built on top of this spec (e.g. an MCP server generated with
FastMCP via `FastMCP.from_openapi`) can override the `Authorization`
header per-request at runtime to rotate tokens or impersonate users
without restarting the MCP server.

**Rate limit:** 100 requests/minute per IP. Auth failures do not leak
which of (email, password) was wrong.


# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Eventtia Connect API V4",
    "version": "4.0.0",
    "description": "Endpoints for managing events, attendee types, and attendees in the Eventtia platform.\n\nAll responses follow the **JSend** standard:\n- `success`: `{ \"status\": \"success\", \"data\": { ... } }`\n- `fail`: `{ \"status\": \"fail\", \"data\": { ... } }` (validation errors, field-keyed)\n- `error`: `{ \"status\": \"error\", \"message\": \"...\" }` (server/auth errors)\n",
    "contact": {
      "name": "Eventtia",
      "url": "https://www.eventtia.com"
    }
  },
  "servers": [
    {
      "url": "https://connect.eventtia.com/api/v4",
      "description": "Production (default)"
    },
    {
      "url": "https://dev.eventtia.com/api/v4",
      "description": "Development"
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "description": "JWT authentication. Call `POST /users/auth` to obtain a token, then send it as `Authorization: Bearer <token>` on subsequent requests."
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT Bearer token obtained from `POST /users/auth`.\n\nSent on every protected request as:\n```\nAuthorization: Bearer <auth_token>\n```\n\n**Runtime override support:** The token is read from the request header on\nevery call, so MCP servers built with FastMCP (`FastMCP.from_openapi`) or any\nOpenAPI-driven client can override it per-call without reloading the spec.\n\nThe same header is also exposed as an explicit reusable parameter\n(`$ref: '#/components/parameters/AuthorizationHeader'`) so that tool\ngenerators that don't auto-wire `securitySchemes` can still surface it as\na first-class tool argument and rotate it at runtime.\n"
      }
    },
    "schemas": {
      "JSendError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "message": {
            "type": "string",
            "example": "Invalid token"
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/users/auth": {
      "post": {
        "summary": "Obtain JWT token",
        "tags": [
          "Authentication"
        ],
        "operationId": "authenticateUser",
        "security": [],
        "description": "Exchanges email/password credentials for a JWT token.\n\nOn success returns a `token` that must be included on every subsequent\nrequest as an HTTP header:\n\n```\nAuthorization: Bearer <token>\n```\n\n**Runtime override (MCP / FastMCP integration):**\nClients built on top of this spec (e.g. an MCP server generated with\nFastMCP via `FastMCP.from_openapi`) can override the `Authorization`\nheader per-request at runtime to rotate tokens or impersonate users\nwithout restarting the MCP server.\n\n**Rate limit:** 100 requests/minute per IP. Auth failures do not leak\nwhich of (email, password) was wrong.\n",
        "parameters": [],
        "responses": {
          "200": {
            "description": "authentication successful — JWT token returned",
            "content": {
              "application/json": {
                "examples": {
                  "success": {
                    "value": {
                      "status": "success",
                      "data": {
                        "token": "eyJhbGciOiJIUzI1NiJ9.eyJjbGFzcyI6IlVzZXIiLCJhdXRoZW50aWNhdGlvbl9rZXkiOiJhZG1pbkBldmVudHRpYS5jb20ifQ.xxx"
                      }
                    },
                    "summary": "Token returned"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string",
                          "example": "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxMjN9.xxx"
                        }
                      },
                      "required": [
                        "token"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "invalid credentials or inactive user",
            "content": {
              "application/json": {
                "examples": {
                  "invalid_credentials": {
                    "value": {
                      "status": "error",
                      "message": "Invalid credentials"
                    },
                    "summary": "Wrong email or password"
                  },
                  "inactive_user": {
                    "value": {
                      "status": "error",
                      "message": "User is not active"
                    },
                    "summary": "User account is inactive"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/JSendError"
                }
              }
            }
          },
          "429": {
            "description": "rate limit exceeded",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the rate limit resets"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JSendError"
                }
              }
            }
          },
          "500": {
            "description": "internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JSendError"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "example": "admin@eventtia.com"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "example": "s3cur3-p4ssw0rd"
                  }
                }
              }
            }
          },
          "required": true,
          "description": "User credentials"
        }
      }
    }
  }
}
````