Protocol Documentation

Table of Contents

etu.proto

Top

ApiKey

ApiKey represents API key metadata returned to clients.

FieldTypeLabelDescription
id string

id is the unique identifier of the API key record.

name string

name is a client-defined label for the API key.

key_prefix string

key_prefix is the non-secret prefix used for lookup and display.

created_at google.protobuf.Timestamp

created_at is when the API key was created.

last_used google.protobuf.Timestamp optional

last_used is when the API key was most recently used.

AudioUpload

AudioUpload contains raw audio bytes provided by the client for upload.

FieldTypeLabelDescription
data bytes

data is the raw binary payload of the audio file.

mime_type string

mime_type is the audio media type, for example "audio/mpeg".

AuthenticateRequest

AuthenticateRequest contains login credentials.

FieldTypeLabelDescription
email string

email is the account email used for authentication.

password string

password is the plaintext password supplied for verification.

AuthenticateResponse

AuthenticateResponse reports authentication status and user context.

FieldTypeLabelDescription
success bool

success indicates whether authentication succeeded.

user User optional

user is set when authentication succeeds and user data is returned.

CreateApiKeyRequest

CreateApiKeyRequest creates a named API key for a user.

FieldTypeLabelDescription
user_id string

name string

CreateApiKeyResponse

CreateApiKeyResponse returns key metadata and a one-time raw key value.

FieldTypeLabelDescription
api_key ApiKey

raw_key string

raw_key is only returned at creation time and should be stored securely.

CreateNoteRequest

CreateNoteRequest defines payload required to create a note.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

content string

content is the note body text to store.

tags string repeated

tags are initial tag names to associate with the note.

images ImageUpload repeated

images are image files to attach during note creation.

audios AudioUpload repeated

audios are audio files to attach during note creation.

CreateNoteResponse

CreateNoteResponse returns the created note.

FieldTypeLabelDescription
note Note

DeleteApiKeyRequest

DeleteApiKeyRequest identifies an API key to revoke.

FieldTypeLabelDescription
user_id string

key_id string

DeleteApiKeyResponse

DeleteApiKeyResponse reports whether an API key deletion occurred.

FieldTypeLabelDescription
success bool

DeleteNoteRequest

DeleteNoteRequest identifies a note to delete.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

id string

id is the unique identifier of the note to delete.

DeleteNoteResponse

DeleteNoteResponse reports whether a note deletion occurred.

FieldTypeLabelDescription
success bool

GetNoteRequest

GetNoteRequest identifies a note to fetch by id.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

id string

id is the unique identifier of the note to fetch.

GetNoteResponse

GetNoteResponse returns the requested note when found.

FieldTypeLabelDescription
note Note

GetRandomNotesRequest

GetRandomNotesRequest requests a random sample of notes.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

count int32

count is the number of random notes requested.

GetRandomNotesResponse

GetRandomNotesResponse returns a random sample of notes.

FieldTypeLabelDescription
notes Note repeated

GetStatsRequest

GetStatsRequest requests aggregate statistics.

FieldTypeLabelDescription
user_id string

user_id scopes stats to a single user when provided.

GetStatsResponse

GetStatsResponse contains aggregate note and tag metrics.

FieldTypeLabelDescription
total_blips int64

total_blips is the total number of notes.

unique_tags int64

unique_tags is the number of distinct tags.

words_written int64

words_written is the total word count across matching notes.

GetUserByStripeCustomerIdRequest

GetUserByStripeCustomerIdRequest fetches a user by Stripe customer id.

FieldTypeLabelDescription
stripe_customer_id string

GetUserByStripeCustomerIdResponse

GetUserByStripeCustomerIdResponse returns the matching user when found.

FieldTypeLabelDescription
user User optional

GetUserRequest

GetUserRequest fetches a user by id.

FieldTypeLabelDescription
user_id string

GetUserResponse

GetUserResponse returns a user record.

FieldTypeLabelDescription
user User

GetUserSettingsRequest

GetUserSettingsRequest fetches mutable user settings fields.

FieldTypeLabelDescription
user_id string

GetUserSettingsResponse

GetUserSettingsResponse returns settings on the User message.

FieldTypeLabelDescription
user User

ImageUpload

ImageUpload contains raw image bytes provided by the client for upload.

FieldTypeLabelDescription
data bytes

data is the raw binary payload of the image file.

mime_type string

mime_type is the image media type, for example "image/jpeg".

ListApiKeysRequest

ListApiKeysRequest requests API keys for a user.

FieldTypeLabelDescription
user_id string

ListApiKeysResponse

ListApiKeysResponse returns all API key metadata for a user.

FieldTypeLabelDescription
api_keys ApiKey repeated

ListNotesRequest

ListNotesRequest defines filters and pagination for listing notes.

user_id is currently accepted for compatibility but is expected to match the

authenticated principal from server auth context.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

search string

search is free-text search input and may include tag: filters.

tags string repeated

tags are additional tag names to filter by.

start_date string

start_date is an inclusive lower bound timestamp in ISO 8601 format.

end_date string

end_date is an inclusive upper bound timestamp in ISO 8601 format.

limit int32

limit is the maximum number of results to return.

offset int32

offset is the number of results to skip before returning rows.

ListNotesResponse

ListNotesResponse returns a page of notes and paging metadata.

FieldTypeLabelDescription
notes Note repeated

notes is the requested page of notes.

total int32

total is the total result count across all pages.

limit int32

limit echoes the effective page size.

offset int32

offset echoes the page offset.

ListTagsRequest

ListTagsRequest requests all tags for a user.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

ListTagsResponse

ListTagsResponse returns all tags for a user.

FieldTypeLabelDescription
tags Tag repeated

Note

Note represents a user-authored note and its associated metadata.

FieldTypeLabelDescription
id string

id is the unique identifier of the note.

content string

content is the note body text.

tags string repeated

tags lists normalized tag names associated with the note.

created_at google.protobuf.Timestamp

created_at is when the note was created.

updated_at google.protobuf.Timestamp

updated_at is when the note was last modified.

images NoteImage repeated

images lists image attachments associated with the note.

audios NoteAudio repeated

audios lists audio attachments associated with the note.

NoteAudio

NoteAudio represents an audio attachment associated with a note.

FieldTypeLabelDescription
id string

id is the unique identifier of the note audio attachment.

url string

url is the publicly accessible URL for the stored audio object.

transcribed_text string

transcribed_text contains transcription output when available.

mime_type string

mime_type is the media type of the stored audio.

created_at google.protobuf.Timestamp

created_at is when the audio attachment was created.

NoteImage

NoteImage represents an image attachment associated with a note.

FieldTypeLabelDescription
id string

id is the unique identifier of the note image.

url string

url is the publicly accessible URL for the stored image object.

extracted_text string

extracted_text contains OCR output for the image when available.

mime_type string

mime_type is the media type of the stored image.

created_at google.protobuf.Timestamp

created_at is when the image attachment was created.

RegisterRequest

RegisterRequest contains account registration credentials.

FieldTypeLabelDescription
email string

email is the unique email for the new account.

password string

password is the plaintext password supplied at registration.

RegisterResponse

RegisterResponse returns the created user record.

FieldTypeLabelDescription
user User

Tag

Tag represents a user tag and optional usage count in list responses.

FieldTypeLabelDescription
id string

id is the unique identifier of the tag.

name string

name is the normalized tag name.

count int32

count is the number of notes currently using the tag.

created_at google.protobuf.Timestamp

created_at is when the tag was created.

UpdateNoteRequest

UpdateNoteRequest defines partial note updates and attachment additions.

FieldTypeLabelDescription
user_id string

user_id is the target user identifier.

id string

id is the unique identifier of the note to update.

content string optional

content updates the note body when provided.

tags string repeated

tags is the tag list used when update_tags is true.

update_tags bool

update_tags controls whether existing tags are replaced from tags.

add_images ImageUpload repeated

add_images appends new image attachments to the note.

add_audios AudioUpload repeated

add_audios appends new audio attachments to the note.

UpdateNoteResponse

UpdateNoteResponse returns the updated note.

FieldTypeLabelDescription
note Note

UpdateUserSettingsRequest

UpdateUserSettingsRequest updates profile and integration settings.

FieldTypeLabelDescription
user_id string

notion_key string optional

name string optional

password string optional

notion_database_name string optional

profile_image_upload ImageUpload optional

clear_profile_image bool optional

UpdateUserSettingsResponse

UpdateUserSettingsResponse returns the updated user settings view.

FieldTypeLabelDescription
user User

UpdateUserSubscriptionRequest

UpdateUserSubscriptionRequest updates subscription billing fields.

FieldTypeLabelDescription
user_id string

subscription_status string

stripe_customer_id string optional

subscription_end google.protobuf.Timestamp optional

UpdateUserSubscriptionResponse

UpdateUserSubscriptionResponse returns the updated user record.

FieldTypeLabelDescription
user User

User

User represents account profile and subscription settings.

FieldTypeLabelDescription
id string

id is the unique identifier of the user.

email string

email is the user's primary login email.

name string optional

name is the user's display name when set.

image string optional

image is an optional avatar URL.

subscription_status string

subscription_status is the billing tier, such as "free" or "pro".

subscription_end google.protobuf.Timestamp optional

subscription_end is when the current subscription period ends.

created_at google.protobuf.Timestamp

created_at is when the user account was created.

stripe_customer_id string optional

stripe_customer_id links the user to a Stripe customer record.

notion_key string optional

notion_key is an optional Notion API token for sync features.

updated_at google.protobuf.Timestamp

updated_at is when the user record was last updated.

disabled bool

disabled reports whether account access is currently disabled.

disabled_reason DisabledReason optional

disabled_reason explains why the account is disabled when disabled is true.

notion_database_name string optional

notion_database_name is the Notion database used for sync.

VerifyApiKeyRequest

VerifyApiKeyRequest verifies a raw API key value.

FieldTypeLabelDescription
raw_key string

VerifyApiKeyResponse

VerifyApiKeyResponse reports verification status and associated user.

FieldTypeLabelDescription
valid bool

user_id string optional

DisabledReason

DisabledReason describes why an account was disabled.

NameNumberDescription
UNSPECIFIED 0

UNSPECIFIED indicates no disable reason was provided.

TERMS_VIOLATION 1

TERMS_VIOLATION indicates the account was disabled for policy violations.

SECURITY_CONCERN 2

SECURITY_CONCERN indicates suspicious or unsafe account activity.

USER_REQUEST 3

USER_REQUEST indicates the user requested account disablement.

PAYMENT_ISSUE 4

PAYMENT_ISSUE indicates account disablement due to billing problems.

OTHER 5

OTHER indicates a disable reason not covered by predefined values.

ApiKeysService

ApiKeysService manages API key lifecycle and verification.

Method NameRequest TypeResponse TypeDescription
CreateApiKey CreateApiKeyRequest CreateApiKeyResponse

CreateApiKey creates a new API key.

ListApiKeys ListApiKeysRequest ListApiKeysResponse

ListApiKeys lists API keys for a user.

DeleteApiKey DeleteApiKeyRequest DeleteApiKeyResponse

DeleteApiKey revokes an API key.

VerifyApiKey VerifyApiKeyRequest VerifyApiKeyResponse

VerifyApiKey validates an API key and resolves its user.

AuthService

AuthService manages user auth, identity lookups, and subscription updates.

Method NameRequest TypeResponse TypeDescription
Register RegisterRequest RegisterResponse

Register creates a new user account.

Authenticate AuthenticateRequest AuthenticateResponse

Authenticate validates credentials and returns user context.

GetUser GetUserRequest GetUserResponse

GetUser fetches a user by id.

GetUserByStripeCustomerId GetUserByStripeCustomerIdRequest GetUserByStripeCustomerIdResponse

GetUserByStripeCustomerId fetches a user by Stripe customer id.

UpdateUserSubscription UpdateUserSubscriptionRequest UpdateUserSubscriptionResponse

UpdateUserSubscription updates billing-related subscription state.

NotesService

NotesService manages note CRUD, attachment uploads, and note queries.

Method NameRequest TypeResponse TypeDescription
ListNotes ListNotesRequest ListNotesResponse

ListNotes returns notes matching filters and pagination options.

CreateNote CreateNoteRequest CreateNoteResponse

CreateNote creates a new note with optional tags and attachments.

GetNote GetNoteRequest GetNoteResponse

GetNote returns one note by id.

UpdateNote UpdateNoteRequest UpdateNoteResponse

UpdateNote updates note content, tags, and adds attachments.

DeleteNote DeleteNoteRequest DeleteNoteResponse

DeleteNote deletes one note by id.

GetRandomNotes GetRandomNotesRequest GetRandomNotesResponse

GetRandomNotes returns a random sample of notes.

StatsService

StatsService provides aggregate usage metrics.

Method NameRequest TypeResponse TypeDescription
GetStats GetStatsRequest GetStatsResponse

GetStats returns aggregate note, tag, and word-count statistics.

TagsService

TagsService provides tag listing for notes.

Method NameRequest TypeResponse TypeDescription
ListTags ListTagsRequest ListTagsResponse

ListTags returns all tags for a user.

UserSettingsService

UserSettingsService reads and updates profile and integration settings.

Method NameRequest TypeResponse TypeDescription
GetUserSettings GetUserSettingsRequest GetUserSettingsResponse

GetUserSettings returns settings represented in the User message.

UpdateUserSettings UpdateUserSettingsRequest UpdateUserSettingsResponse

UpdateUserSettings updates mutable user settings fields.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)