Settings

Settings endpoints provide read access to configured integrations and a message log view.

All endpoints require authentication via the X-API-Key header. See Authentication.


List integrations

GET /settings/integrations

Returns all configured integrations for the org. Only type and createdAt are included — credentials are excluded.

Example request

curl "https://<host>/api/settings/integrations" \
  -H "X-API-Key: your-api-key"

Response

{
  "success": true,
  "data": [
    {
      "type": "salesforce",
      "createdAt": 1716000000000
    },
    {
      "type": "google-analytics",
      "createdAt": 1716100000000
    }
  ]
}

Supported integration types

salesforce, google-analytics, pipedrive, raisers-edge.


Get an integration

GET /settings/integrations/:type

Returns a single integration by type. Credentials (accessToken, refreshToken) are excluded. Returns null data with 200 status if no integration of that type exists.

Path parameters

ParameterTypeDescription
typestringIntegration type (e.g. salesforce).

Example request

curl "https://<host>/api/settings/integrations/salesforce" \
  -H "X-API-Key: your-api-key"

Response

{
  "success": true,
  "data": {
    "type": "salesforce",
    "createdAt": 1716000000000
  }
}

If no integration exists for the type:

{
  "success": true,
  "data": null
}

List message logs

GET /settings/messages/logs

Returns direct messages across all platforms, sorted by timestamp descending. Each log entry includes populated user, author, and contact objects.

Query parameters

ParameterTypeDefaultNotes
pagenumber00-indexed.
perPagenumber50Items per page.

Example request

curl "https://<host>/api/settings/messages/logs?page=0&perPage=25" \
  -H "X-API-Key: your-api-key"

Response

{
  "success": true,
  "data": [
    {
      "_id": "675a...",
      "direction": "out",
      "platform": "stacked-sms",
      "status": "delivered",
      "body": "Hey Jane, thanks for your support!",
      "media": null,
      "from": "+15559876543",
      "to": "+15551234567",
      "timestamp": 1716000000000,
      "user": {
        "_id": "675a...",
        "firstName": "John",
        "lastName": "Doe"
      },
      "author": null,
      "contact": {
        "_id": "675a...",
        "firstName": "Jane",
        "lastName": "Smith"
      }
    }
  ],
  "pagination": {
    "page": 0,
    "perPage": 25,
    "totalItems": 142,
    "totalPages": 6
  }
}

Log entry fields

FieldTypeDescription
directionstringin (received) or out (sent).
platformstringemail, stacked-sms, personal-sms, twitter, or web-chat.
statusstringdelivered, undelivered, or pending.
bodystring | nullMessage text content.
mediastring[] | nullMedia URLs if any.
fromstringSender identifier (phone, email, etc.).
tostringRecipient identifier.
timestampnumberUnix timestamp.
userobjectSending/receiving user (populated).
authorobject | nullOriginal author if different from user.
contactobjectContact (populated).

Response envelope

All endpoints use the standard envelope:

{
  "error": false,
  "success": true,
  "message": "...",
  "code": 200,
  "data": "...",
  "pagination": {}
}

Error responses:

{
  "error": true,
  "success": false,
  "message": "...",
  "code": 400,
  "data": null
}

data is null for a general failure, such as a database error or an upstream timeout. When the request is rejected because of a specific field, data carries the field(s) at fault instead:

{
  "error": true,
  "success": false,
  "message": "phone: Phone parse failed: The string supplied did not seem to be a phone number (input: <masked>)",
  "code": 400,
  "data": {
    "issues": [
      {
        "path": "phone",
        "message": "Phone parse failed: The string supplied did not seem to be a phone number (input: <masked>)"
      }
    ]
  }
}

Each issue carries a path (the dotted path into the request body) and a message. A label is added when the path is not self-describing, which today means custom fields only, for example "path": "fields.68b0a1f39c2e4d0012ab77e5", "label": "Class Year". issues is an array, but treat it as holding at most one entry: validation stops at the first failure.

On this page