Users

  • A User represent a physical person.

  • A User can have many Emails and Phones.

  • A User is associated with one to many Account Users.

The User Object

Property
Type
Description

name

string[]

The user's full name.

time_zone

string[]

The user's time zone.

preferred_language

string

The user's preferred language.

last_sign_in_at

timestamp

A timestamp of when the user last logged in via the web interface.

emails[].id

string

The ID of the email object.

emails[].email

string

The email address.

emails[].primary

string[]

Boolean indicating if this is the user's primary email address.

phones[].id

string

ID of phone object.

phones[].prefix_id

string

Prefix ID of phone object.

phones[].phone

string

E.164 format phone number.

phones[].primary

boolean

Boolean indicating if this is the user's primary phone number.

phones[].country

string

ISO 3166 alpha-2 country code of the number (determined by PagerTree).

phones[].blocked

boolean

Boolean indicating whether this phone has been blocked.

Create a User

POST https://api.pagertree.com/api/v4/users

Allowed Parameters

def user_params
  params.permit(
    :name,
    :email,
    :notify_push,
    :notify_email,
    :notify_sms,
    :notify_voice,
    emails_attributes: [
      :id,
      :email,
      :primary
    ],
    phones_attributes: [
      :id,
      :phone,
      :confirmation_method,
      :primary
    ]
  )
end

Required Parameters

  • name

  • email

Example Request

POST https://api.pagertree.com/api/v4/users
{
  "name": "Bobby Hill",
  "email": "bobby@example.com"
}

Retrieve a User

GET https://api.pagertree.com/api/v4/users/:id

Update a User

PUT https://api.pagertree.com/api/v4/users/:id

Delete a User

This action is not supported. Please see the Delete a Account User method.

List all Users

GET https://api.pagertree.com/api/v4/users

Last updated

Was this helpful?