Skip to content

User API

User routes manage the authenticated user's profile, usage metadata, and self-service API keys.

API call order

  1. Sign in at the identity provider for an access token, or hold an eve_ API key.
  2. Send either one as Authorization: Bearer <token>.
  3. Call user routes (/users/me, /users/me/token-usage, /users patch, /users/api-keys).

Shared request setup is documented once in API index.

Get current user profile

GET /users/me

Return the authenticated user's profile.

Parameters:

Name Type Description Default
user User

Authenticated user injected by dependency.

Depends(get_current_user)

Returns:

Type Description
UserPublic

The public subset of the current user's profile.

Usage

resp = requests.get(
    f"{BASE_URL}/users/me",
    headers=headers,
    timeout=30,
)
resp.raise_for_status()
print(resp.json())

Explanation

Returns the authenticated user's profile document.

Notes

  • Requires Authorization: Bearer <access_token>.

Get token usage

GET /users/me/token-usage

Current user's token budget for the active rate-limit window (see TokenUsageResponse).

Usage

resp = requests.get(
    f"{BASE_URL}/users/me/token-usage",
    headers=headers,
    timeout=30,
)
resp.raise_for_status()
print(resp.json())

Explanation

Returns token budget and usage information for the current user.

Notes

  • Useful for client-side quota indicators.

Update current user

PATCH /users

Update the authenticated user's profile.

The two names are always written. country and institution are written only when the body carries them, so a client that sends just the names leaves them untouched; an empty string or null clears one. Only these fields are ever written: a $set of the request body, never a full-document replace, so a concurrent token-budget update on the same row is never clobbered.

Parameters:

Name Type Description Default
request UpdateUserRequest

New names and, optionally, country and institution.

required
user User

Authenticated user injected by dependency.

Depends(get_current_user)

Returns:

Type Description
UserPublic

The public subset of the updated user's profile.

Usage

resp = requests.patch(
    f"{BASE_URL}/users",
    json={
        "first_name": "Astro",
        "last_name": "User",
        "country": "Italy",
        "institution": "European Space Agency",
    },
    headers=headers,
    timeout=30,
)
resp.raise_for_status()
print(resp.json())

Explanation

Updates mutable profile fields for the authenticated user.

Notes

  • Route updates only the current authenticated user.
  • first_name and last_name are required.
  • country (max 100 characters) and institution (max 200) are optional free text, stripped before the length check. Left out of the body, the stored value is kept; an empty string or null clears it. GET /users/me returns both, null when unset.

API keys

Create, list and revoke self-service eve_ API keys. Full concepts, error table and a curl walkthrough live in API keys; this page only links the endpoints.

  • POST /users/api-keys: create a key. Body optional, every field optional.
  • GET /users/api-keys[?include_revoked=true]: list this user's keys.
  • DELETE /users/api-keys/{id}: revoke a key, cascading to its children.

Full API reference

For exhaustive schema details, use Swagger API.