Integrations

Email inbox connections (Gmail/Outlook/IMAP/POP3) and tax-authority credential management.

13 endpoints·Scopes: integrations:read, integrations:write
POST/api/expenses/email-connect/gmail#

Attach email connect/gmail to an expense

scope · integrations:writerole · CONTRIBUTOR+SESSION-only

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

  • organizationIdreq
    string
  • namereq
    string

Response (200/201)

  • authorizeUrlreq
    stringURL the browser opens to start the Gmail OAuth flow.
  • statereq
    stringSigned CSRF state token — round-tripped on the callback.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/expenses/email-connect/outlook#

Attach email connect/outlook to an expense

scope · integrations:writerole · CONTRIBUTOR+SESSION-only

Creates a new email-connect/outlook attached to the given expense.

Scope: integrations:write
Min role: CONTRIBUTOR or higher
Auth sources: SESSION only
Endpoint: POST /api/expenses/email-connect/outlook

Example request

curl -X POST "https://guliel.com/api/expenses/email-connect/outlook" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "name": "Outlook"
}'

Request body

  • organizationIdreq
    string
  • namereq
    string

Response (200/201)

  • authorizeUrlreq
    stringURL the browser opens to start the Outlook OAuth flow.
  • statereq
    stringSigned CSRF state token — round-tripped on the callback.

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
DELETE/api/expenses/email-settings#

Detach email settings from an expense

scope · integrations:writerole · MANAGER+

Removes the association without deleting the underlying record.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: DELETE /api/expenses/email-settings

Example request

curl -X DELETE "https://guliel.com/api/expenses/email-settings?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • organizationIdreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/expenses/email-settings#

List email settings for an expense

scope · integrations:read

Returns every email-settings row associated with the given expense.

Scope: integrations:read
Endpoint: GET /api/expenses/email-settings

Example request

curl "https://guliel.com/api/expenses/email-settings?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • id
    string

Response (200/201)

object | null | object

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/expenses/email-settings#

Attach email settings to an expense

scope · integrations:writerole · MANAGER+

Creates a new email-settings attached to the given expense.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: POST /api/expenses/email-settings

Example request

curl -X POST "https://guliel.com/api/expenses/email-settings" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "name": "Sample",
  "provider": "GMAIL"
}'

Request body

  • organizationIdreq
    string
  • namereq
    string
  • providerreq
    enum<4>
    GMAIL · OUTLOOK · IMAP · POP3
  • enabled
    boolean
  • accessToken
    string | null
  • refreshToken
    string | null
  • tokenExpiresAt
    string | null
  • host
    string | null
  • port
    integer | null
  • useTls
    boolean
  • username
    string | null
  • password
    string | null
  • folderOrLabel
    string | null
  • subjectFilter
    string | null
  • senderWhitelist
    array<string>
  • autoPollEnabled
    boolean
  • pollIntervalDays
    integer

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • providerreq
    string
  • enabledreq
    boolean
  • accessTokenreq
    string | null
  • refreshTokenreq
    string | null
  • tokenExpiresAtreq
    string | null
  • hostreq
    string | null
  • portreq
    integer | null
  • useTlsreq
    boolean
  • usernamereq
    string | null
  • passwordreq
    string | nullEncrypted at rest. Never returned in plaintext.
  • folderOrLabelreq
    string | null
  • subjectFilterreq
    string | null
  • senderWhitelistreq
    array<string>
  • autoPollEnabledreq
    boolean
  • pollIntervalDaysreq
    integer
  • lastPollAtreq
    string | null
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
PUT/api/expenses/email-settings#

Update email settings on an expense

scope · integrations:writerole · MANAGER+

Mutates the email-settings attached to the given expense.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: PUT /api/expenses/email-settings

Example request

curl -X PUT "https://guliel.com/api/expenses/email-settings" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "organizationId": "abc123",
  "name": "Sample",
  "provider": "GMAIL",
  "id": "abc123"
}'

Request body

  • organizationIdreq
    string
  • namereq
    string
  • providerreq
    enum<4>
    GMAIL · OUTLOOK · IMAP · POP3
  • enabled
    boolean
  • accessToken
    string | null
  • refreshToken
    string | null
  • tokenExpiresAt
    string | null
  • host
    string | null
  • port
    integer | null
  • useTls
    boolean
  • username
    string | null
  • password
    string | null
  • folderOrLabel
    string | null
  • subjectFilter
    string | null
  • senderWhitelist
    array<string>
  • autoPollEnabled
    boolean
  • pollIntervalDays
    integer
  • idreq
    string

Response (200/201)

  • idreq
    string
  • organizationIdreq
    string
  • namereq
    string
  • providerreq
    string
  • enabledreq
    boolean
  • accessTokenreq
    string | null
  • refreshTokenreq
    string | null
  • tokenExpiresAtreq
    string | null
  • hostreq
    string | null
  • portreq
    integer | null
  • useTlsreq
    boolean
  • usernamereq
    string | null
  • passwordreq
    string | nullEncrypted at rest. Never returned in plaintext.
  • folderOrLabelreq
    string | null
  • subjectFilterreq
    string | null
  • senderWhitelistreq
    array<string>
  • autoPollEnabledreq
    boolean
  • pollIntervalDaysreq
    integer
  • lastPollAtreq
    string | null
  • createdAtreq
    string
  • updatedAtreq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/expenses/fetch-logs#

List fetch logs for an expense

scope · integrations:read

Returns every fetch-logs row associated with the given expense.

Scope: integrations:read
Endpoint: GET /api/expenses/fetch-logs

Example request

curl "https://guliel.com/api/expenses/fetch-logs?organizationId=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • organizationIdreq
    string
  • connectionId
    string

Response (200/201)

  • logsreq
    array<object>
    • idreq
      string
    • connectionIdreq
      string
    • statusreq
      stringRUNNING | COMPLETED | FAILED | CANCELLED
    • startedAtreq
      string
    • finishedAtreq
      string | null
    • messagesScannedreq
      integer
    • messagesProcessedreq
      integer
    • messagesFailedreq
      integer
    • errorreq
      string | null

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/expenses/fetch-logs/{id}/stop#

Attach fetch logs/stop to an expense

scope · integrations:write

Creates a new fetch-logs/stop attached to the given expense.

Scope: integrations:write
Endpoint: POST /api/expenses/fetch-logs/{id}/stop

Example request

curl -X POST "https://guliel.com/api/expenses/fetch-logs/abc123/stop" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123"
}'

Request body

  • idreq
    string

Response (200/201)

  • successreq
    boolean

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/organizations/{id}/tax-authority#

List tax authority for an organization

scope · integrations:read

Returns every tax-authority row associated with the given organization.

Scope: integrations:read
Endpoint: GET /api/organizations/{id}/tax-authority

Example request

curl "https://guliel.com/api/organizations/abc123/tax-authority?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string

Response (200/201)

  • integrationsreq
    array<object>
    • integrationIdreq
      stringStable identifier of the tax-authority integration (e.g. "israel-shaam").
    • namereq
      string
    • countryreq
      string
    • connectedreq
      boolean
    • lastValidatedAtreq
      string | null

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
DELETE/api/organizations/{id}/tax-authority/{integrationId}#

Detach tax authority from an organization

scope · integrations:writerole · MANAGER+

Removes the association without deleting the underlying record.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: DELETE /api/organizations/{id}/tax-authority/{integrationId}

Example request

curl -X DELETE "https://guliel.com/api/organizations/abc123/tax-authority/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • integrationIdreq
    string

Response (200/201)

  • successreq
    boolean
  • messagereq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
GET/api/organizations/{id}/tax-authority/{integrationId}#

List tax authority for an organization

scope · integrations:readrole · MANAGER+

Returns every tax-authority row associated with the given organization.

Scope: integrations:read
Min role: MANAGER or higher
Endpoint: GET /api/organizations/{id}/tax-authority/{integrationId}

Example request

curl "https://guliel.com/api/organizations/abc123/tax-authority/abc123?id=value" \
  -H "Authorization: Bearer $GULIEL_API_KEY"

Query parameters

  • idreq
    string
  • integrationIdreq
    string

Response (200/201)

  • integrationIdreq
    string
  • namereq
    string
  • descriptionreq
    string
  • requiredFieldsreq
    array<object>
  • environmentreq
    stringsandbox | production
  • statusreq
    object
    • existsreq
      boolean
    • isActivereq
      boolean
    • isValidatedreq
      boolean
    • lastValidatedAtreq
      string | null
    • validationErrorreq
      string | null

Error responses

400Validation
401Unauthenticated
403Forbidden
500Internal
POST/api/organizations/{id}/tax-authority/{integrationId}#

Attach tax authority to an organization

scope · integrations:writerole · MANAGER+

Creates a new tax-authority attached to the given organization.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: POST /api/organizations/{id}/tax-authority/{integrationId}

Example request

curl -X POST "https://guliel.com/api/organizations/abc123/tax-authority/abc123" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "integrationId": "abc123",
  "credentials": {},
  "environment": "sandbox"
}'

Request body

  • idreq
    string
  • integrationIdreq
    string
  • credentialsreq
    object
  • environmentreq
    enum<2>
    sandbox · production

Response (200/201)

  • successreq
    boolean
  • messagereq
    string

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal
POST/api/organizations/{id}/tax-authority/{integrationId}/validate#

Attach tax authority/validate to an organization

scope · integrations:writerole · MANAGER+

Creates a new tax-authority/validate attached to the given organization.

Scope: integrations:write
Min role: MANAGER or higher
Endpoint: POST /api/organizations/{id}/tax-authority/{integrationId}/validate

Example request

curl -X POST "https://guliel.com/api/organizations/abc123/tax-authority/abc123/validate" \
  -H "Authorization: Bearer $GULIEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "id": "abc123",
  "integrationId": "abc123"
}'

Request body

  • idreq
    string
  • integrationIdreq
    string

Response (200/201)

  • validreq
    boolean
  • error
    string | null
  • details
    object | null

Error responses

400Validation
401Unauthenticated
403Forbidden
429RateLimit
500Internal