Guides & Tutorials

List users of an organization

GET /api/organizations/users.php

This endpoint returns the list of users of an organization.

Request parameters

Parameter Value
limit Limits number of records to return per request.

Value is capped at 250.

Default: 250
page Page number.

For example, having a value of 2 (with limit of 250) will return records from (including) 501-750.

Default: 0

Response parameters

Response is a JSON list of JSON objects.

Parameter Value
id User ID.
email User’s email address.
first_name User’s first name.
last_name User’s last name.
is_owner User’s ownership status of the organization.
role User’s role in the organization.

See “Role parameter structure” for more information.

Role parameter structure

Response is a JSON list of JSON objects.

Parameter Value
id Role ID.
name Role name.

Example

$ curl -X GET -u "${USERNAME}:${PASSWORD}" \
  "https://${SUBDOMAIN}.sendsmaily.net/api/organizations/users.php?page=0&limit=250"

(JavaScript/JSON)

[
  {
    "id": 1,
    "email": "first.last@domain.tld",
    "first_name": "First",
    "last_name": "Last",
    "is_owner": true,
    "role": {
      "id": 1,
      "name": "Manager"
    }
  },
  {
    "id": 2,
    "email": "user.name@domain.tld",
    "first_name": "User",
    "last_name": "Name",
    "is_owner": false,
    "role": {
      "id": 2,
      "name": "Editor"
    }
  }
]