Sirportly

Toggle Menu

Create new user

This method allows you to create a new user within your account. This method is different depending on whether you use the cloud edition or the download edition. With the cloud edition, when you create a user you will automatically email them an invitation which they must accept before they can sign up whereas the download edition you just create the account directly.

URL

/api/v2/users/create

Supported Parameters

  • email_address - the e-mail address of the user you are creating (required)
  • first_name - the first name of the user (required)
  • last_name - the last name of the user (required)
  • time_zone - the user's time zone (optional, defaults to UTC)
  • job_title - the user's job title (optional)
  • admin_access - true or false depending on whether you wish to grant access to the admin interface
  • reporting_access - true or false depending on whether you wish to grant access to the reporting interface
  • tickets_access - true or false depending on whether you wish to grant access to the tickets interface
  • api_allowed - true or false depending on whether you wish to allow access to the API for this user
  • restrictions - an array of restrictions which should applied to this user
  • team_ids - an array of team IDs which this user should be assigned to

The follow two parameters are only appropriate in the download edition:

  • username - a username for the user (required)
  • password - a password for the user (required)

Example Data

Successful Creation

{
  "id": 12,
  "username": "steve",
  "first_name": "Adam",
  "last_name": "Cooke",
  "email_address": "test2@atechmedia.com",
  "time_zone": "UTC",
  "created_at": "2012-03-19T16:18:20+00:00",
  "job_title": "Managing Director",
  "permissions": {
    "admin": false,
    "reporting": false,
    "tickets": true,
    "api": true
  },
  "restrictions": [
    "tickets.deletion"
  ]
}

Validation Error

{
  "email_address": [
    "can't be blank",
    "is invalid"
  ],
  "first_name": [
    "can't be blank"
  ],
  "last_name": [
    "can't be blank"
  ],
  "username": [
    "can't be blank"
  ],
  "password": [
    "can't be blank"
  ]
}