User Profile API
Manage the current authenticated user's profile, preferences, and data.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/me | Get current user |
| PATCH | /api/me | Update current user |
| POST | /api/me/export-data | Request GDPR data export |
| GET | /api/me/export-data | Get data export status/download |
| POST | /api/me/onboarding | Update onboarding status |
| GET | /api/me/onboarding | Get onboarding status |
Get Current User
http
GET /api/meExample
bash
curl https://api.hookbase.app/api/me \
-H "Authorization: Bearer whr_your_api_key"Response
json
{
"user": {
"id": "usr_abc123",
"email": "[email protected]",
"displayName": "John Doe",
"avatarUrl": null,
"twoFactorEnabled": false,
"emailVerified": true,
"createdAt": "2024-01-01T00:00:00Z"
},
"organizations": [
{
"id": "org_abc123",
"name": "My Company",
"slug": "my-company",
"plan": "pro",
"role": "owner",
"member_count": 5,
"source_count": 10,
"destination_count": 8,
"route_count": 15
}
]
}Update Current User
http
PATCH /api/meRequest Body
| Field | Type | Description |
|---|---|---|
| displayName | string | Display name |
| avatarUrl | string | Avatar URL |
Example
bash
curl -X PATCH https://api.hookbase.app/api/me \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"displayName": "John D."
}'Response
Returns the updated user object.
GDPR Data Export
Request Export
http
POST /api/me/export-dataInitiates an export of all user data. The export is prepared asynchronously and available for download when ready.
Example
bash
curl -X POST https://api.hookbase.app/api/me/export-data \
-H "Authorization: Bearer whr_your_api_key"Response
json
{
"exportId": "exp_abc123",
"status": "processing",
"requestedAt": "2024-01-15T10:30:00Z",
"message": "Data export initiated. Check status with GET /api/me/export-data"
}Check Export Status
http
GET /api/me/export-datajson
{
"exportId": "exp_abc123",
"status": "ready",
"requestedAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:35:00Z",
"downloadUrl": "https://api.hookbase.app/api/me/export-data/exp_abc123/download",
"expiresAt": "2024-01-22T10:35:00Z"
}Export Statuses
| Status | Description |
|---|---|
processing | Export is being prepared |
ready | Export is ready for download |
expired | Download link has expired (request a new export) |
Onboarding
Get Onboarding Status
http
GET /api/me/onboardingResponse
json
{
"completed": false,
"steps": {
"createOrganization": true,
"createSource": true,
"createDestination": false,
"createRoute": false,
"receiveFirstEvent": false
}
}Update Onboarding
http
POST /api/me/onboarding| Field | Type | Description |
|---|---|---|
| step | string | Onboarding step to mark complete |
| skip | boolean | Skip the entire onboarding flow |
Related
- Authentication — Login, register, 2FA