Skip to content
Skip to Content
Full reference

Users

Get the signed-in user

GET
/v1/me

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Response Body

The signed-in user

application/json
  1. response
id*string

Trova user id (ULID); independent of the auth provider

email?string|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
lang?|

The language the user chose for text the server writes for them: AI summaries, tags and chat answers, and push notifications. A code from GET /v1/meta, or null when not chosen (AI text then follows the content's own language; pushes are English). Set it with PATCH /v1/me. Not the same as an item's lang, which is the language of its content.

archive_pages?boolean

Whether a screenshot and full-page archive are kept of each link the user saves. False until the user turns it on with PATCH /v1/me; links saved while it is off have none. A plan without archives keeps none either way.

deletion?|

The pending deletion the user asked for (POST /v1/me/deletion), or null.

Example Request
curl -X GET 'https://example.com/v1/me'
Example Response
{  "id": "string",  "email": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "lang": "en",  "archive_pages": true,  "deletion": {    "requested_at": "2019-08-24T14:15:22Z",    "purge_after": "2019-08-24T14:15:22Z"  }}
PATCH
/v1/me

Changes only the fields sent. lang is the language the server writes AI text and push notifications in: a code from GET /v1/meta (matched without regard to case and stored in its canonical spelling, so pt-br is stored as pt-BR), or null to clear it. An unknown tag is a 422 with the reason code unsupported_language. Clients keep their own copy for instant switching and write it here when the user changes it; on sign-in on a new device, this value wins. archive_pages (boolean) turns the screenshot and full-page archive of newly saved links on or off; it is off by default.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
lang?string|null
archive_pages?boolean

Response Body

The user, after the change

application/json
  1. response
id*string

Trova user id (ULID); independent of the auth provider

email?string|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
lang?|

The language the user chose for text the server writes for them: AI summaries, tags and chat answers, and push notifications. A code from GET /v1/meta, or null when not chosen (AI text then follows the content's own language; pushes are English). Set it with PATCH /v1/me. Not the same as an item's lang, which is the language of its content.

archive_pages?boolean

Whether a screenshot and full-page archive are kept of each link the user saves. False until the user turns it on with PATCH /v1/me; links saved while it is off have none. A plan without archives keeps none either way.

deletion?|

The pending deletion the user asked for (POST /v1/me/deletion), or null.

Example Request
curl -X PATCH 'https://example.com/v1/me' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "email": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "lang": "en",  "archive_pages": true,  "deletion": {    "requested_at": "2019-08-24T14:15:22Z",    "purge_after": "2019-08-24T14:15:22Z"  }}
GET
/v1/meta

The allow-list of languages for lang on PATCH /v1/me, so clients cannot drift from the server, and the best match for the request's Accept-Language for a first visit. Needs no sign-in; limited to 120 requests a minute per client IP. Responses vary on Accept-Language.

Header Parameters

Accept-Language?string

Response Body

The languages

application/json
  1. response
languages*array<>

The languages lang may be set to, in the server's order.

default_language*string

The best match for the request's Accept-Language, or en.

Example Request
curl -X GET 'https://example.com/v1/meta' \  -H 'Accept-Language: fr-CA,fr;q=0.9,en;q=0.5'
Example Response
{  "languages": [    {      "code": "en",      "name": "English"    }  ],  "default_language": "en"}
POST
/v1/me/deletion

Needs a signed-in session; an API key gets 403. Allowed when the library is read-only over its plan. The account keeps working until purge_after (ACCOUNT_DELETE_GRACE_DAYS from now), and GET /v1/me shows the pending deletion. Then the Supabase sign-in account is deleted and the account locked and erased. Cancel before then with DELETE /v1/me/deletion. Asking again keeps the first request. See docs/ACCOUNT_DELETION.md.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
confirm*"delete my account"

Must be exactly this phrase.

Value in"delete my account"

Response Body

The deletion is scheduled

application/json
  1. response
requested_at*string
Formatdate-time
purge_after*string

When the account is erased unless the deletion is cancelled first.

Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/me/deletion' \  -H 'Content-Type: application/json' \  -d '{  "confirm": "delete my account"}'
Example Response
{  "requested_at": "2019-08-24T14:15:22Z",  "purge_after": "2019-08-24T14:15:22Z"}
DELETE
/v1/me/deletion

Needs a signed-in session. Only before purge_after; after it, 409.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Response Body

The deletion is cancelled; the account stays

Example Request
curl -X DELETE 'https://example.com/v1/me/deletion'
Example Response
Empty