Skip to main content

User API

Profile

Get Profile

GET /api/user/profile
Returns user profile and preferences.
curl https://app.thig.ai/api/user/profile \
  -H "Authorization: Bearer YOUR_API_KEY"

Update Profile

PATCH /api/user/profile
Body:
FieldTypeDescription
namestringDisplay name
jobTitlestringJob title
biostringShort bio
avatarstringAvatar URL
preferredStylestringDocument style preference
curl -X PATCH https://app.thig.ai/api/user/profile \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Jane Smith", "jobTitle": "Product Manager", "preferredStyle": "comprehensive"}'

BYOK API Keys

Manage personal AI provider keys (Bring Your Own Key).

List Keys

GET /api/user/api-keys
Returns masked keys for all configured providers.

Add Key

POST /api/user/api-keys
Body:
FieldTypeRequiredDescription
providerstringYesopenai, anthropic, or gemini
keystringYesAPI key (encrypted before storage)
namestringNoDisplay name
curl -X POST https://app.thig.ai/api/user/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider": "openai", "key": "sk-proj-abc123...", "name": "My OpenAI Key"}'
Response:
{
  "id": "key_123",
  "provider": "openai",
  "name": "My OpenAI Key",
  "createdAt": "2026-01-15T10:30:00Z"
}

Remove Key

DELETE /api/user/api-keys/{keyId}

Timezone

Update Timezone

PATCH /api/user/timezone
Body:
{ "timezone": "America/New_York" }
Must be a valid IANA timezone string.
curl -X PATCH https://app.thig.ai/api/user/timezone \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"timezone": "America/New_York"}'

Onboarding

Check Status

GET /api/user/onboarding
Response:
{
  "completed": true,
  "completedAt": "2026-01-15T10:30:00Z",
  "preferences": { ... }
}

Complete Onboarding

POST /api/user/onboarding
Body:
FieldTypeRequiredDescription
fullNamestringYesFull name
jobTitlestringYesJob title
companystringYesCompany name
useCasestringYesPrimary use case
teamSizestringYesTeam size
prdStylestringYesPreferred PRD style
interestsstring[]YesFeatures of interest
createOrgbooleanNoCreate organization
orgNamestringNoOrganization name
inviteEmailsstring[]NoEmails to invite
curl -X POST https://app.thig.ai/api/user/onboarding \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fullName": "Jane Smith",
    "jobTitle": "Product Manager",
    "company": "Acme Corp",
    "useCase": "Product requirements",
    "teamSize": "medium",
    "prdStyle": "comprehensive",
    "interests": ["ai-chat", "templates", "exports"]
  }'

Onboarding Progress

GET /api/user/onboarding-progress
Returns a 5-step checklist with completion status.

Activity

Ping Activity

POST /api/user/activity
Records user activity. Server throttles to max once per 5 minutes.

Account Management

Data Export (GDPR)

GET /api/user/data-export
Downloads a JSON file containing all user data.
curl https://app.thig.ai/api/user/data-export \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o my-data.json

Delete Account

DELETE /api/user/delete-account
Body:
{ "confirmEmail": "jane@example.com" }
Permanently deletes the account and all associated data.