Users

GET/user

Retrieve user records. Customer roles must pass at least one filter (id or groupId) — an unfiltered read-all is restricted to internal use. Note: the 'developer' role is restricted to service-user queries only; it must supply both groupId and userType=service. Any other combination (no groupId, userType=user, or groupId without userType=service) returns 403 for the developer role. Each user includes a read-only lastLoginAt: the time of the user's most recent portal login, or null if they have not logged in since it began being recorded. It cannot be set through PUT /user/:id. The groupIds, subgroupIds and status query parameters belong to the internal unfiltered list; sending any of them with id, email or groupId returns 400.

The following roles are required to use this endpoint: admin, developer, api, self

Request Body

FieldTypeRequiredDescription
idQuery ParamOptionalSpecific User ObjectId.
groupIdQuery ParamOptionalFilter by Group ID.
userTypeQuery ParamOptionalFilter by type: 'user' or 'service'. The 'developer' role requires userType=service.

Example Response 200

Response
[
  {
    "_id": "60f7b2a1c9e77c001a2b3c61",
    "role": "admin",
    "status": "active",
    "mfaEnabled": false,
    "viewGroupIds": [
      "G1234567"
    ],
    "activeGroupId": "G1234567",
    "email": "user@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "companyName": "Acme Corp",
    "phone": "5551234567",
    "timezone": "America/Chicago",
    "lastLoginAt": "2024-01-15T13:30:00.000Z",
    "createdAt": "2024-01-15T12:00:00.000Z",
    "updatedAt": "2024-01-15T12:00:00.000Z"
  }
]

SDK Example

POST/user

Create a new dashboard user.

The following roles are required to use this endpoint: admin, api

Request Body

FieldTypeRequiredDescription
groupIdStringRequiredGroup ID.
roleStringRequiredThe role to assign. Accepted values: admin, developer, billing, user.
emailStringRequiredUser email.
passwordStringRequiredPassword.
firstNameStringOptionalUser's first name.
lastNameStringOptionalUser's last name.
companyNameStringOptionalUser's company name.
phoneStringOptionalUser's phone number.
profileImageLinkStringOptionalURL to the user's profile image.
addressLine1StringOptionalPrimary street address.
addressLine2StringOptionalSecondary street address (suite, apt, etc.).
cityStringOptionalCity.
stateStringOptionalState or province.
countryStringOptionalCountry.
postalCodeStringOptionalPostal or ZIP code.
signupSourceStringOptionalWhere the user signed up from (e.g., web, api, referral).
timezoneStringOptionalUser's timezone.
acceptedTermsOfServiceBooleanOptionalWhether the user has accepted the Terms of Service.

Example Request

Request
{
  "groupId": "G1234567",
  "role": "admin",
  "email": "user@example.com",
  "password": "securepassword123"
}

Example Response 201

Response
{
  "user": {
    "_id": "60f7b2a1c9e77c001a2b3c61",
    "role": "admin",
    "status": "active",
    "activeGroupId": "G1234567",
    "email": "user@example.com",
    "createdAt": "2024-01-15T12:00:00.000Z",
    "updatedAt": "2024-01-15T12:00:00.000Z"
  }
}

SDK Example

PUT/user/accept-terms

Accept the Terms of Service for the authenticated caller. Sets acceptedTermsOfService=true on the caller's own user account. Self-service — any authenticated user can accept their own terms.

The following roles are required to use this endpoint: admin, developer, billing, user, api

Request Body

FieldTypeRequiredDescription
acceptedTermsOfServiceBooleanRequiredMust be true.

Example Request

Request
{
  "acceptedTermsOfService": true
}

Example Response 200

Response
{
  "acceptedTermsOfService": true
}

SDK Example

POST/user/serviceuser

Create a non-login Service User (API Key) and instantly returns a JWT.

The following roles are required to use this endpoint: admin, developer

Request Body

FieldTypeRequiredDescription
groupIdStringOptionalGroup ID the service user belongs to (starts with G, exactly 8 chars). Required when role is 'api'; omit for 'signalhouse_api'.
nameStringRequiredFriendly name for the service key.
roleStringRequiredMust be 'api' (or 'signalhouse_api' for internal accounts).
allowedIpsArray<String>OptionalOnly accept this key from these IPv4/IPv6 addresses or CIDR ranges, e.g. ["203.0.113.10", "198.51.100.0/24"]. Max 100. Omit or [] for no IP restriction. 'api' keys only.
allowedCountriesArray<String>OptionalOnly accept this key from these countries (ISO 3166-1 alpha-2, e.g. ["US", "CA"]). Must be an assigned code: "UK" is rejected (use "GB"), as is "ZZ". Max 250. Omit or [] for no country restriction. When both lists are set, a request must match both. 'api' keys only.
allowedDestinationCountriesArray<String>OptionalOnly let this key send messages to these countries (ISO 3166-1 alpha-2, e.g. ["US", "CA"]). A send with any recipient elsewhere is rejected with 403 DESTINATION_COUNTRY_NOT_ALLOWED and nothing goes out. US toll-free numbers count as US; Guernsey (GG), Jersey (JE) and the Isle of Man (IM) are separate from GB. Max 250. Omit or [] for any country. 'api' keys only.

Example Request

Request
{
  "groupId": "G1234567",
  "name": "Backend Integration",
  "role": "api"
}

Example Response 201

Response
{
  "user": {
    "user": {
      "_id": "60f7b2a1c9e77c001a2b3c62",
      "role": "api",
      "status": "active",
      "activeGroupId": "G1234567",
      "viewGroupIds": [
        "G1234567"
      ],
      "firstName": "Backend Integration",
      "mfaEnabled": false,
      "createdAt": "2024-01-15T12:00:00.000Z",
      "updatedAt": "2024-01-15T12:00:00.000Z"
    },
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MGY3YjJhMWM5ZTc3YzAwMWEyYjNjNjIiLCJncm91cElkIjoiRzEyMzQ1NjciLCJyb2xlIjoiYXBpIiwiaWF0IjoxNjkwMDAwMDAwLCJleHAiOjE3MjE1MzYwMDB9.placeholder_signature"
  }
}

SDK Example

PUT/user/:id

Update an existing user's details.

The following roles are required to use this endpoint: admin, api

Request Body

FieldTypeRequiredDescription
idURL ParamRequiredUser ObjectId.
roleStringOptionalThe role to assign. Accepted values: admin, developer, billing, user.
statusStringOptionalUser status. Accepted values: active, inactive.
emailStringOptionalUser email.
firstNameStringOptionalFirst name.
lastNameStringOptionalLast name.
companyNameStringOptionalCompany name.
phoneStringOptionalPhone number.
profileImageLinkStringOptionalURL to the user profile image.
addressLine1StringOptionalStreet address line 1.
addressLine2StringOptionalStreet address line 2.
cityStringOptionalCity.
stateStringOptionalState or province.
countryStringOptionalCountry.
postalCodeStringOptionalPostal or ZIP code.
timezoneStringOptionalTimezone.
allowedIpsArray<String>OptionalAPI keys only: replaces the key's allowed IPv4/IPv6 addresses or CIDR ranges ([] removes the restriction). Requires a portal login with the admin or developer role; an API key cannot change its own restrictions. Service users accept only status, allowedIps, allowedCountries and allowedDestinationCountries.
allowedCountriesArray<String>OptionalAPI keys only: replaces the key's allowed ISO 3166-1 alpha-2 country codes ([] removes the restriction). Unassigned codes such as "UK" (use "GB") are rejected with 400. Same permission rules as allowedIps.
allowedDestinationCountriesArray<String>OptionalAPI keys only: replaces the countries the key may send messages to ([] allows any country). Same validation and permission rules as allowedCountries.

Example Response 200

Response
{
  "user": {
    "_id": "60f7b2a1c9e77c001a2b3c61",
    "role": "admin",
    "status": "active",
    "email": "user@example.com",
    "firstName": "John",
    "lastName": "Doe Updated",
    "updatedAt": "2024-01-16T14:00:00.000Z"
  }
}

SDK Example

DELETE/user/:id

Inactivate a user, revoking their login access.

The following roles are required to use this endpoint: admin, api

Request Body

FieldTypeRequiredDescription
idURL ParamRequiredUser ObjectId.

Example Response 200

Response
{
  "message": "User inactivated successfully"
}

SDK Example

GET/user/:id/notification-preferences

Retrieve notification preferences for a user.

The following roles are required to use this endpoint: admin, api, self

Request Body

FieldTypeRequiredDescription
idURL ParamRequiredUser ObjectId.

Example Response 200

Response
[
  {
    "name": "BRAND_CREATION_SUCCESSFUL",
    "web": true,
    "email": true
  },
  {
    "name": "BRAND_CREATION_FAILED",
    "web": true,
    "email": false
  },
  {
    "name": "CAMPAIGN_APPROVED_BY_SIGNAL_HOUSE",
    "web": true,
    "email": false
  },
  {
    "name": "MESSAGE_DELIVERY_FAILURE",
    "web": true,
    "email": true
  }
]

SDK Example

PUT/user/:id/notification-preferences

Update notification preferences for a user. Restricted to human dashboard users (admin, developer, billing, user) — service (api) users and internal accounts are not eligible and will receive a 403.

The following roles are required to use this endpoint: admin, developer, billing, user

Request Body

FieldTypeRequiredDescription
idURL ParamRequiredUser ObjectId.
notificationPreferencesArray[Object]RequiredArray of preference objects. Duplicate names are not allowed.
notificationPreferences[].nameStringRequiredPreference identifier (e.g., BRAND_CREATION_FAILED).
notificationPreferences[].webBooleanRequiredEnable/disable web notifications.
notificationPreferences[].emailBooleanRequiredEnable/disable email notifications.

Example Request

Request
{
  "notificationPreferences": [
    {
      "name": "BRAND_CREATION_SUCCESSFUL",
      "web": true,
      "email": true
    },
    {
      "name": "CAMPAIGN_APPROVED_BY_SIGNAL_HOUSE",
      "web": true,
      "email": false
    }
  ]
}

Example Response 200

Response
{
  "notificationPreferences": [
    {
      "name": "BRAND_CREATION_SUCCESSFUL",
      "web": true,
      "email": true
    },
    {
      "name": "CAMPAIGN_APPROVED_BY_SIGNAL_HOUSE",
      "web": true,
      "email": false
    }
  ]
}

SDK Example