SalesOS

Email Integrations

Email provider connections

Get available email integrations

GET
/v1/email-integrations/available

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/email-integrations/available" \
  -H "Authorization: Bearer <token>"

Delete oauth app

DELETE
/v1/email-integrations/oauth-app/{provider}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

providerRequiredstring
Value in: "OUTLOOK" | "GMAIL" | "IMAP"
curl -X DELETE "https://api.salesos.org/v1/email-integrations/oauth-app/OUTLOOK" \
  -H "Authorization: Bearer <token>"

Advanced: use the organization's own Google/Microsoft OAuth app instead of the platform one.

PUT
/v1/email-integrations/oauth-app/{provider}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired

Path Parameters

providerRequiredstring
Value in: "OUTLOOK" | "GMAIL" | "IMAP"
curl -X PUT "https://api.salesos.org/v1/email-integrations/oauth-app/OUTLOOK" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{}'

Get user's connected email accounts

GET
/v1/email-integrations/connections

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/email-integrations/connections" \
  -H "Authorization: Bearer <token>"

Get a specific connection

GET
/v1/email-integrations/connections/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/email-integrations/connections/<string>" \
  -H "Authorization: Bearer <token>"

Update connection settings

PATCH
/v1/email-integrations/connections/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
syncEnabledboolean
syncIncomingboolean
syncOutgoingboolean

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X PATCH "https://api.salesos.org/v1/email-integrations/connections/<string>" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "syncEnabled": true,
    "syncIncoming": true,
    "syncOutgoing": true
  }'

Disconnect an email account

DELETE
/v1/email-integrations/connections/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X DELETE "https://api.salesos.org/v1/email-integrations/connections/<string>" \
  -H "Authorization: Bearer <token>"

Initiate OAuth flow for a provider

POST
/v1/email-integrations/connect

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
providerRequiredstring
Value in: "OUTLOOK" | "GMAIL" | "IMAP"
redirectUristring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/email-integrations/connect" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "OUTLOOK",
    "redirectUri": "string"
  }'

OAuth callback for Gmail

GET
/v1/email-integrations/callback/gmail

Query Parameters

codeRequiredstring
stateRequiredstring
errorRequiredstring
error_descriptionRequiredstring
curl -X GET "https://api.salesos.org/v1/email-integrations/callback/gmail?code=%3Cstring%3E&state=%3Cstring%3E&error=%3Cstring%3E&error_description=%3Cstring%3E"

OAuth callback for Outlook

GET
/v1/email-integrations/callback/outlook

Query Parameters

codeRequiredstring
stateRequiredstring
errorRequiredstring
error_descriptionRequiredstring
curl -X GET "https://api.salesos.org/v1/email-integrations/callback/outlook?code=%3Cstring%3E&state=%3Cstring%3E&error=%3Cstring%3E&error_description=%3Cstring%3E"

Trigger manual sync for a connection

POST
/v1/email-integrations/connections/{id}/sync

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/email-integrations/connections/<string>/sync" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

Refresh access token for a connection

POST
/v1/email-integrations/connections/{id}/refresh

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/email-integrations/connections/<string>/refresh" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"