SalesOS

Smart Email

AI-powered email composition

Compose

POST
/v1/smart-email/compose

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
contactIdstring
opportunityIdstring
dealIdstring
threadIdstring
inReplyToMessageIdstring
purposestring
recipientNamestring
companyNamestring
subjectstring
bodystring
tonestring
stylestring
intentstring
conversationSummarystring
toEmailsarray<string>

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/smart-email/compose" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "string",
    "opportunityId": "string",
    "dealId": "string",
    "threadId": "string",
    "inReplyToMessageId": "string",
    "purpose": "string",
    "recipientName": "string",
    "companyName": "string",
    "subject": "string",
    "body": "string",
    "tone": "string",
    "style": "string",
    "intent": "string",
    "conversationSummary": "string",
    "toEmails": [
      "string"
    ]
  }'

List drafts

GET
/v1/smart-email/drafts

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/smart-email/drafts" \
  -H "Authorization: Bearer <token>"

Get draft

GET
/v1/smart-email/drafts/{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/smart-email/drafts/<string>" \
  -H "Authorization: Bearer <token>"

Update draft

PATCH
/v1/smart-email/drafts/{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
subjectstring
bodyHtmlstring
toEmailsarray<string>
ccEmailsarray<string>

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/smart-email/drafts/<string>" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "string",
    "bodyHtml": "string",
    "toEmails": [
      "string"
    ],
    "ccEmails": [
      "string"
    ]
  }'

Delete draft

DELETE
/v1/smart-email/drafts/{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/smart-email/drafts/<string>" \
  -H "Authorization: Bearer <token>"

Send draft

POST
/v1/smart-email/drafts/{id}/send

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/smart-email/drafts/<string>/send" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

Schedule draft

POST
/v1/smart-email/drafts/{id}/schedule

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
sendAtstring
scheduledAtstring
timezonestring

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/smart-email/drafts/<string>/schedule" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "sendAt": "string",
    "scheduledAt": "string",
    "timezone": "string"
  }'

Get variants

GET
/v1/smart-email/drafts/{id}/variants

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

Query Parameters

refreshunknown
curl -X GET "https://api.salesos.org/v1/smart-email/drafts/<string>/variants?refresh=null" \
  -H "Authorization: Bearer <token>"

[
  {}
]

Regenerate draft

POST
/v1/smart-email/drafts/{id}/regenerate

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/smart-email/drafts/<string>/regenerate" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

{}

Get send time recommendation

GET
/v1/smart-email/send-time/{contactId}

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

contactIdRequiredstring
curl -X GET "https://api.salesos.org/v1/smart-email/send-time/<string>" \
  -H "Authorization: Bearer <token>"

{}

Get history

GET
/v1/smart-email/history/{contactId}

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

contactIdRequiredstring

Query Parameters

limitunknown
curl -X GET "https://api.salesos.org/v1/smart-email/history/<string>?limit=null" \
  -H "Authorization: Bearer <token>"

Get stats

GET
/v1/smart-email/stats

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/smart-email/stats" \
  -H "Authorization: Bearer <token>"