Attach email connect/gmail to an expense
Creates a new email-connect/gmail attached to the given expense.
Scope: integrations:write
Min role: CONTRIBUTOR or higher
Auth sources: SESSION only
Endpoint: POST /api/expenses/email-connect/gmail
Example request
curl -X POST "https://guliel.com/api/expenses/email-connect/gmail" \
-H "Authorization: Bearer $GULIEL_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"organizationId": "abc123",
"name": "Gmail"
}'Request body
organizationIdreqstringnamereqstring
Response (200/201)
authorizeUrlreqstringURL the browser opens to start the Gmail OAuth flow.statereqstringSigned CSRF state token — round-tripped on the callback.
Error responses
400 | Validation |
401 | Unauthenticated |
403 | Forbidden |
429 | RateLimit |
500 | Internal |