Skip to main content

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.

FieldTypeRequiredDescription and constraints
response.userobjectYesUnknown properties are rejected. Required properties: id, email, emailVerified, createdAt.
response.creditsCreditBalanceYes

Nested field: response.user

Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt.

FieldTypeRequiredDescription and constraints
response.user.idintegerYes
response.user.emailstringYesFormat: email.
response.user.firstNamestringNo
response.user.lastNamestringNo
response.user.emailVerifiedbooleanYes
response.user.profileCompletedbooleanNo
response.user.pendingRedirectstring / nullNo
response.user.isAdminbooleanNo
response.user.createdAtstringYesFormat: 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.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type
response.messagestringNoHuman-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.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type

Example response

{
"error": "User not found"
}

HTTP 500​

Internal server error

Content type: application/json.

Required properties: error.

FieldTypeRequiredDescription and constraints
response.errorstringYesError type
response.messagestringNoHuman-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.

FieldTypeRequiredDescription and constraints
UserProfile.userobjectYesUnknown properties are rejected. Required properties: id, email, emailVerified, createdAt.
UserProfile.creditsCreditBalanceYes

Nested field: UserProfile.user

Unknown properties are rejected. Required properties: id, email, emailVerified, createdAt.

FieldTypeRequiredDescription and constraints
UserProfile.user.idintegerYes
UserProfile.user.emailstringYesFormat: email.
UserProfile.user.firstNamestringNo
UserProfile.user.lastNamestringNo
UserProfile.user.emailVerifiedbooleanYes
UserProfile.user.profileCompletedbooleanNo
UserProfile.user.pendingRedirectstring / nullNo
UserProfile.user.isAdminbooleanNo
UserProfile.user.createdAtstringYesFormat: date-time.
CreditBalance

Unknown properties are rejected. Required properties: balance, subscriptionCredits, addonCredits.

FieldTypeRequiredDescription and constraints
CreditBalance.balanceintegerYesTotal available credits from subscription and add-on pools
CreditBalance.subscriptionCreditsintegerYesCredits remaining in the current subscription period
CreditBalance.addonCreditsobjectYesAdd-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.

FieldTypeRequiredDescription and constraints
CreditBalance.addonCredits.balanceintegerYesAvailable add-on credits
CreditBalance.addonCredits.totalEarnedintegerYesTotal add-on credits earned over all time
CreditBalance.addonCredits.totalSpentintegerYesTotal add-on credits spent over all time
AuthenticationError

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
AuthenticationError.errorstringYesError type
AuthenticationError.messagestringNoHuman-readable error message
UserNotFoundError

Unknown properties are rejected. Required properties: error.

FieldTypeRequiredDescription and constraints
UserNotFoundError.errorstringYesError type
Error

Required properties: error.

FieldTypeRequiredDescription and constraints
Error.errorstringYesError type
Error.messagestringNoHuman-readable error message