Skip to content

User Profile API

Manage the current authenticated user's profile, preferences, and data.

Endpoints

MethodPathDescription
GET/api/meGet current user
PATCH/api/meUpdate current user
POST/api/me/export-dataRequest GDPR data export
GET/api/me/export-dataGet data export status/download
POST/api/me/onboardingUpdate onboarding status
GET/api/me/onboardingGet onboarding status

Get Current User

http
GET /api/me

Example

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/me

Request Body

FieldTypeDescription
displayNamestringDisplay name
avatarUrlstringAvatar 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-data

Initiates 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-data
json
{
  "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

StatusDescription
processingExport is being prepared
readyExport is ready for download
expiredDownload link has expired (request a new export)

Onboarding

Get Onboarding Status

http
GET /api/me/onboarding

Response

json
{
  "completed": false,
  "steps": {
    "createOrganization": true,
    "createSource": true,
    "createDestination": false,
    "createRoute": false,
    "receiveFirstEvent": false
  }
}

Update Onboarding

http
POST /api/me/onboarding
FieldTypeDescription
stepstringOnboarding step to mark complete
skipbooleanSkip the entire onboarding flow

Released under the MIT License.