gmail

Start Gmail Import

Start Gmail import flow - returns OAuth URL for frontend to redirect.

This endpoint is called by the frontend to initiate Gmail account linking. It calls the travel_email service to generate an OAuth URL, which the frontend uses to redirect the user to Google for authorization.

Returns: GmailImportStartResponse with auth_url on success, error_message on failure

post/gmail/import/start

Request body

success_pathstring required

Path to redirect to on OAuth success, e.g. /dash?from=gmail&state=success

failure_pathstring required

Path to redirect to on OAuth failure, e.g. /dash?from=gmail&state=failure

Response

Successful Response

successboolean required
auth_urlstring nullable
credential_idstring nullable
failure_redirect_urlstring nullable
error_messagestring nullable

Changes