User Management
User management endpoints allow you to retrieve information about the current user, their organizations, and monitor credit usage. These endpoints help you manage multi-organization access and track your API consumption limits.
The user model
The user model contains information about the current authenticated user.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the user.
- Name
email- Type
- string
- Description
The user's email address.
- Name
name- Type
- string
- Description
The user's display name.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the user account was created.
The organization membership model
The organization membership model contains information about a user's membership in an organization.
Properties
- Name
organization_id- Type
- string
- Description
Unique identifier for the organization.
- Name
organization_name- Type
- string
- Description
The display name of the organization.
- Name
organization_slug- Type
- string
- Description
URL-friendly slug for the organization.
- Name
role- Type
- string
- Description
The user's role in the organization (e.g., "owner", "member").
- Name
joined_at- Type
- timestamp
- Description
Timestamp of when the user joined the organization.
- Name
is_active- Type
- boolean
- Description
Whether this is the user's currently active organization.
The credit status model
The credit status model contains information about the organization's credit usage.
Properties
- Name
monthly_limit- Type
- integer
- Description
The monthly word limit for the organization.
- Name
current_usage- Type
- integer
- Description
Number of words used in the current billing period.
- Name
available- Type
- integer
- Description
Remaining words available.
- Name
reset_date- Type
- timestamp
- Description
Timestamp of when the credits will reset.
- Name
usage_percentage- Type
- number
- Description
Percentage of monthly limit used.
Get current user info
This endpoint allows you to retrieve information about the current authenticated user. For organization membership details, use the /v1/users/me/organizations endpoint instead.
Optional attributes
- Name
X-Org-Id- Type
- string
- Description
Organization identifier (header). If not provided, uses your default organization.
Request
curl https://api.elanlanguages.ai/v1/users/me \
-H "Authorization: Bearer {token}"
Response
{
"id": "usr_123abc",
"email": "user@example.com",
"name": "John Doe",
"created_at": "2025-01-15T10:00:00Z"
}
Get user organizations
This endpoint allows you to retrieve all organizations the current user belongs to. Use this endpoint to discover available organizations, then use the X-Org-Id header to switch between them on subsequent requests.
Optional attributes
- Name
X-Org-Id- Type
- string
- Description
Organization identifier (header). If not provided, uses your default organization.
Request
curl https://api.elanlanguages.ai/v1/users/me/organizations \
-H "Authorization: Bearer {token}"
Response
{
"active_organization_id": "rbr...rMi",
"organizations": [
{
"organization_id": "rbr...rMi",
"organization_name": "Acme Inc",
"organization_slug": "acme-inc",
"role": "owner",
"joined_at": "2025-12-10T14:34:34.617000+00:00",
"is_active": true
},
{
"organization_id": "C5o...9Ra",
"organization_name": "ELAN Languages",
"organization_slug": "elan-languages",
"role": "member",
"joined_at": "2025-12-10T15:30:26.949000+00:00",
"is_active": false
}
]
}
Get credit status
This endpoint allows you to retrieve the current credit status for your organization, including monthly limits and usage.
Optional attributes
- Name
X-Org-Id- Type
- string
- Description
Organization identifier (header). If not provided, uses your default organization.
Request
curl https://api.elanlanguages.ai/v1/credits/status \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}"
Response
{
"monthly_limit": 1000000,
"current_usage": 45230,
"available": 954770,
"reset_date": "2025-01-01T00:00:00Z",
"usage_percentage": 4.523
}