Team Management
List members, invite colleagues, and remove users from your organization.
Team management endpoints are restricted to users with the owner or admin role.
List Members
GET /org/members
Authorization: Bearer <token>Response 200
[
{
"id": "usr_abc",
"email": "admin@acme.com",
"role": "owner",
"joined_at": "2026-05-01T09:00:00Z"
},
{
"id": "usr_def",
"email": "dev@acme.com",
"role": "member",
"joined_at": "2026-05-10T14:30:00Z"
}
]Invite a Member
Generates a single-use invite link valid for 72 hours. Requires owner role.
POST /org/invite
Authorization: Bearer <token>
Content-Type: application/jsonRequest body
{
"email": "dev@company.com",
"role": "member"
}Response 201
{
"invite_url": "https://your-app.com/join?token=abc123...",
"email": "dev@company.com",
"expires_at": "2026-05-27T10:00:00Z"
}Share invite_url with the invitee. The token is single-use and expires after 72 hours.
Remove a Member
Removes a user from the organization. Requires owner role. An owner cannot remove themselves.
DELETE /org/members/{user_id}
Authorization: Bearer <token>Response 204 No Content
Public Invite Endpoints
These endpoints do not require authentication.
Validate Invite Token
Check that a token is valid before showing the password-set form.
GET /invite?token=<invite_token>Response 200
{
"email": "dev@company.com",
"org_name": "Acme Corp",
"expires_at": "2026-05-27T10:00:00Z"
}Accept Invite
Sets the invitee's password and logs them in.
POST /invite/accept
Content-Type: application/jsonRequest body
{
"token": "<invite_token>",
"password": "newpassword"
}Response 200
{
"token": "eyJhbGci...",
"user": {
"id": "usr_xyz",
"email": "dev@company.com",
"role": "member"
}
}The user is now authenticated and added to the organization.
Role Reference
| Role | Invite | Remove members | Manage jobs | Manage API keys |
|---|---|---|---|---|
owner | ✓ | ✓ | ✓ | ✓ |
admin | ✓ | ✗ (owner only) | ✓ | ✓ |
member | ✗ | ✗ | ✓ | ✓ |
Quick Reference
# List members
curl http://localhost:8080/org/members \
-H "Authorization: Bearer YOUR_JWT"
# Invite a member
curl -X POST http://localhost:8080/org/invite \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"email":"dev@company.com","role":"member"}'
# Remove a member
curl -X DELETE http://localhost:8080/org/members/usr_def \
-H "Authorization: Bearer YOUR_JWT"