Users API

The Users API provides endpoints for managing team members, roles, and invitations programmatically. Admin or owner role is required for most operations. All endpoints require authentication.

Base URL

https://api.workjet.dev/v1

Endpoints

List Users

GET /users

Returns all users in the authenticated user's organization. Requires admin or owner role.

Response

{
  "users": [
    {
      "id": "user_abc123",
      "email": "jane@acme.com",
      "name": "Jane Smith",
      "role": "owner",
      "status": "active",
      "lastLoginAt": "2026-04-14T09:15:00Z",
      "createdAt": "2026-01-15T10:00:00Z"
    }
  ],
  "total": 5
}

Get Current User

GET /users/me

Returns the authenticated user's profile. Available to all roles.

Invite User

POST /users/invite

Sends an invitation email to a new team member. Requires admin or owner role.

Request Body

Field Type Required Description
email string Yes Email address of the person to invite
role string No admin or member. Default: member

Update User Role

PUT /users/:id/role

Changes a user's role. Requires owner role to promote to admin.

Request Body

{
  "role": "admin"
}

Remove User

DELETE /users/:id

Removes a user from the organization. Requires admin or owner role. The owner cannot be removed.

Next Steps