Get user profile
GET /api/user/profile
Retrieve the authenticated user's profile information and credit balance
Authentication
- Option 1:
x-api-key: YOUR_API_KEY(header). API key for authentication. Create one in your dashboard. - Option 2:
Authorization: Bearer YOUR_ACCESS_TOKEN. Dashboard JWT in Authorization: Bearer <token>, only on operations that explicitly list this scheme. Prefer x-api-key for REST integrations. OAuth for hosted MCP is a separate connection at https://mcp.zvid.io/mcp.
Create API keys at app.zvid.io/api-keys. Keep credentials on your server.
Parameters
This operation has no path, query, or additional header parameters.
Request
The shell examples read credentials from ZVID_API_KEY (or ZVID_ACCESS_TOKEN for Bearer authentication). Set that variable in your environment. Replace sample project, template, job, and asset identifiers with values from your own account.
This operation does not take a request body.
Request example
curl --request GET 'https://api.zvid.io/api/user/profile' \
--header "x-api-key: $ZVID_API_KEY"
Responses
HTTP 200
User profile retrieved successfully
Content type: application/json.
Unknown properties are rejected. Required properties: user, credits.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.user | object | Yes | Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt. |
response.credits | CreditBalance | Yes |
Nested field: response.user
Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.user.id | integer | Yes | |
response.user.email | string | Yes | Format: email. |
response.user.firstName | string | No | |
response.user.lastName | string | No | |
response.user.emailVerified | boolean | Yes | |
response.user.profileCompleted | boolean | No | |
response.user.pendingRedirect | string / null | No | |
response.user.isAdmin | boolean | No | |
response.user.createdAt | string | Yes | Format: date-time. |
Example response
{
"user": {
"id": 123,
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"emailVerified": true,
"profileCompleted": true,
"pendingRedirect": null,
"isAdmin": false,
"createdAt": "2025-01-01T00:00:00.000Z"
},
"credits": {
"balance": 1800,
"subscriptionCredits": 1200,
"addonCredits": {
"balance": 600,
"totalEarned": 1000,
"totalSpent": 400
}
}
}
HTTP 401
Unauthorized - Invalid or missing API key
Content type: application/json.
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.error | string | Yes | Error type |
response.message | string | No | Human-readable error message |
Example response
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
HTTP 404
User not found
Content type: application/json.
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.error | string | Yes | Error type |
Example response
{
"error": "User not found"
}
HTTP 500
Internal server error
Content type: application/json.
Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
response.error | string | Yes | Error type |
response.message | string | No | Human-readable error message |
Example response
{
"error": "Failed to get user profile"
}
Schema definitions
The following definitions describe the fields referenced above. Expand a definition to inspect its complete contract.
UserProfile
Unknown properties are rejected. Required properties: user, credits.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
UserProfile.user | object | Yes | Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt. |
UserProfile.credits | CreditBalance | Yes |
Nested field: UserProfile.user
Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
UserProfile.user.id | integer | Yes | |
UserProfile.user.email | string | Yes | Format: email. |
UserProfile.user.firstName | string | No | |
UserProfile.user.lastName | string | No | |
UserProfile.user.emailVerified | boolean | Yes | |
UserProfile.user.profileCompleted | boolean | No | |
UserProfile.user.pendingRedirect | string / null | No | |
UserProfile.user.isAdmin | boolean | No | |
UserProfile.user.createdAt | string | Yes | Format: date-time. |
CreditBalance
Unknown properties are rejected. Required properties: balance, subscriptionCredits, addonCredits.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
CreditBalance.balance | integer | Yes | Total available credits from subscription and add-on pools |
CreditBalance.subscriptionCredits | integer | Yes | Credits remaining in the current subscription period |
CreditBalance.addonCredits | object | Yes | Add-on credit pool and historical add-on totals Unknown properties are rejected. Required properties: balance, totalEarned, totalSpent. |
Nested field: CreditBalance.addonCredits
Add-on credit pool and historical add-on totals
Unknown properties are rejected. Required properties: balance, totalEarned, totalSpent.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
CreditBalance.addonCredits.balance | integer | Yes | Available add-on credits |
CreditBalance.addonCredits.totalEarned | integer | Yes | Total add-on credits earned over all time |
CreditBalance.addonCredits.totalSpent | integer | Yes | Total add-on credits spent over all time |
AuthenticationError
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
AuthenticationError.error | string | Yes | Error type |
AuthenticationError.message | string | No | Human-readable error message |
UserNotFoundError
Unknown properties are rejected. Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
UserNotFoundError.error | string | Yes | Error type |
Error
Required properties: error.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
Error.error | string | Yes | Error type |
Error.message | string | No | Human-readable error message |