Redirecting you to Core API Docs - Users

Index

This method returns a list of all users in an organization. The selected organization is determined by the authentication values associated with that organization.

Method URL
GET /api/v2/users.json
GET /api/v2/users.json?invited=true

Parameters

Param Type Required Notes
invited bool No If set to true, also return users who have been invited to the organization.

Example Response

Code Status
200 OK

Response JSON

Here is a simplified example response with invited=true given. A list of users will be listed with their associated values, and invited users will be listed with "invited":true as a field.

[
    {
        "id": 3,
        "name": "Mr",
        "surname": "Burns",
        "email": "c.m.burns@snpp.com",
        "role": "Administrator"
        ...
    },
    {
        "email": "success@monorails.com",
        "expiry": "2018-07-07T12:34:56-07:00",
        "invited": true,
        "role": "Member"
    }
]

Invite

This method allows you to invite a user to an organization. If the user doesn’t have an existing account then they will be sent an invite email with a sign up link and will remain in your organization’s invited users section until they register. If the user already has an account, but with a different organization then the user will immediately be added to this organization.

Method URL
POST /api/v2/users/invite.json

Parameters

Param Type Required Notes
email string Yes The email address of the user you would like to invite.
role “member”/”analyst” Yes The role that the user will have in your organization (note that you cannot invite admins via the API.

Responses

Code Status Notes
201 Created Returned if the user has been invited and is required to register.
201 Created Returned if an existing user is added to an organization they were previously not a member of.
204 No Content Returned if the user is already part of the organization.
204 No Content Returned if the user has already been invited to the organization and awaiting their registration into their account.
422 Unprocessable Entity Returned if the email param is missing or blank.
422 Unprocessable Entity Returned if the role is something other than the allowed member or analyst.
Tags: