GoSmarter Logo
GoSmarter API Gateway

List companies accessible to the caller

POST
https://api.gosmarter.ai
/api/me/companies

Returns all companies accessible to the caller, from gosmarter.CompanyMembers (kept in sync from Clerk organizationMembership webhook events). Each company includes the caller's role ('admin' or 'member').

List companies accessible to the caller › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List companies accessible to the caller › Responses

Companies retrieved successfully

createdAt
​string · date-time
updatedAt
​string · date-time
companyId
​string · uuid
companyName
​string
address
​string

List API keys

GET
https://api.gosmarter.ai
/api/me/keys

Returns the caller's consumer record and all their API keys.

List API keys › Responses

Rate Limiting Response

type
​string · required

A URI reference that identifies the problem.

title
​string · required

A short, human-readable summary of the problem.

status
​number · required

The HTTP status code.

instance
​string

Create API key

POST
https://api.gosmarter.ai
/api/me/keys

Upserts the caller's consumer record (syncing the user ID and roles) then creates a new API key. Company access for API-key requests is authorized per-request against the membership database, not key metadata.

Create API key › Responses

Rate Limiting Response

type
​string · required

A URI reference that identifies the problem.

title
​string · required

A short, human-readable summary of the problem.

status
​number · required

The HTTP status code.

instance
​string

Roll API key

POST
https://api.gosmarter.ai
/api/me/keys/roll

Creates a new API key for the caller's consumer and deletes all previous keys. Returns the new key.

Roll API key › Responses

Rate Limiting Response

type
​string · required

A URI reference that identifies the problem.

title
​string · required

A short, human-readable summary of the problem.

status
​number · required

The HTTP status code.

instance
​string

Delete API key

DELETE
https://api.gosmarter.ai
/api/me/keys/{keyId}

Deletes one of the caller's API keys by key ID.

Delete API key › Responses

Rate Limiting Response

type
​string · required

A URI reference that identifies the problem.

title
​string · required

A short, human-readable summary of the problem.

status
​number · required

The HTTP status code.

instance
​string

Update caller's profile

PUT
https://api.gosmarter.ai
/api/me

Updates the authenticated caller's profile in the local database. Identity is derived from the gateway-injected X-User-Id header.

Update caller's profile › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Update caller's profile › Request Body

userId
​string · uuid
firstName
​string
lastName
​string
tutorialMode
​boolean

Update caller's profile › Responses

Profile update accepted

userId
​string · uuid
firstName
​string
lastName
​string
tutorialMode
​boolean
isSynced
​boolean

Check caller's sync status

POST
https://api.gosmarter.ai
/api/me/sync-check

Compares Clerk user values against the database for the authenticated caller. Returns DB values (or nulls) and isSynced flag.

Check caller's sync status › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Check caller's sync status › Request Body

userId
​string · uuid
firstName
​string
lastName
​string
tutorialMode
​boolean

Check caller's sync status › Responses

Sync status and database values returned

userId
​string · uuid
firstName
​string
lastName
​string
tutorialMode
​boolean
isSynced
​boolean