Register
Create a new account.
Request Body
Password (minimum 8 characters)
Name for your organization
Example Request
curl -X POST https://api.agentwarden.io/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securepassword123",
"organization_name": "My Company"
}'
Response
Status: 200 OK
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"user": {
"id": "user_123",
"email": "user@example.com",
"organization_id": "org_456"
}
}
Errors
400 Bad Request - Email already exists
{
"detail": "Email already registered"
}
Login
Authenticate and get access token.
Request Body
Example Request
curl -X POST https://api.agentwarden.io/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securepassword123"
}'
Response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"user": {
"id": "user_123",
"email": "user@example.com",
"organization_id": "org_456"
}
}
Token Expiration: 7 days
Using the Token
Include in Authorization header for all authenticated requests:
curl https://api.agentwarden.io/api/agents \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Errors
401 Unauthorized - Invalid credentials
{
"detail": "Invalid email or password"
}
Get Current User
Get information about the authenticated user.
Authentication
Response
{
"id": "user_123",
"email": "user@example.com",
"organization_id": "org_456",
"created_at": "2024-01-15T10:00:00Z"
}