Users

Resources and actions to manage the users of an organization

Endpoints

Get authentication organization and user information

GET https://api.upcoach.com/me/

Returns the user and organization information for the API key used for authentication.

{
    "user": {
        "avatar": "...",
        "email": "...",
        "id": "...",
        "name": "...",
        "timezone": "..."
    },
    "organization": {
        "id": "...",
        "name": "...",
        "subdomain": "..",
        "url_home": "..",
        "created_at": 1590851285
    }
}

List team members

GET https://api.upcoach.com/team-members

Returns a list of team members in the organization.

Query Parameters

NameTypeDescription

filter[id]

String

Filter by user ID, leave empty to return all

filter[email]

String

Filter by user email, leave empty to return all.

filter[role]

String

Filter by team role, leave empty to return all. Available roles: coach, admin

sort

String

Available sort fields: created_at, name, role


{
    "data": [
        {
            "id": "...",
            "avatar": "...",
            "name": "...",
            "email": "...",
            "timezone": "...",
            "role": "admin",
            "created_at": null
        },
        ...
    ]
}

List clients

GET https://api.upcoach.com/clients

Returns a list of clients in the organization

Query Parameters

NameTypeDescription

filter[id]

String

User ID

filter[email]

String

User email address

sort

String

Available sort fields: created_at, name

{
  "data": [
    {
      "id": "...",
      "avatar": "...",
      "name": "...",
      "email": "...",
      "timezone": "...",
      "created_at": 1637585633,
      "info": {
        "...": "...",
        ...
      }
    },
    ...
  ],
  "links": {
    "first": "...",
    "last": "...",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": ...,
    "from": ...,
    "last_page": ...,
    "path": "...",
    "per_page": ...,
    "to": ...,
    "total": ...
  }
}

Add new client

POST https://api.upcoach.com/clients

Adds a new client to the organization

Request Body

NameTypeDescription

name*

String

Full name

email*

String

Email address

password

String

Password (min. 8 characters)

timezone

String

Timezone (any value from tz database)

{
  "client": {
    "id": "...",
    "avatar": "...",
    "name": "...",
    "email": "...",
    "timezone": "...",
    "created_at": ...,
    "info": {
        "...": "...",
        ...
      }
  }
}

Update a client

PUT https://api.upcoach.com/clients/<user_id>

Updates a client's custom field information.

Path Parameters

NameTypeDescription

<user_id>*

String

User ID

Request Body

NameTypeDescription

info*

Object

A key-value object that has field slugs as its keys and values for the new information to be saved

{
  "client": {
    "id": "...",
    "avatar": "...",
    "name": "...",
    "email": "...",
    "timezone": "...",
    "created_at": ...,
    "info": {
        "...": "...",
        ...
      }
  }
}

Resource Objects

User

PropertyTypeDescription

id

string

User ID

name

string

User's full name

email

string

User's email address

avatar

string

User avatar URL

timezone

string

User's timezone

Team Member, Client and Program Member resource objects inherit properties from this User resource object.

Organization

PropertyTypeDescription

id

string

Organization ID

name

string

Organization name

subdomain

string

Organization subdomain

url_home

string

Organization home URL

created_at

integer

Organization created at (Unix timestamp)

Team Member

Inherits all the properties of the User Resource and extends it with the following properties

PropertyTypeDescription

role

string

Team role, can be admin or coach

created_at

integer

Team member created at (Unix timestamp)

Client

Inherits all the properties of the User Resource and extends it with the following properties

PropertyTypeDescription

created_at

integer

Client created at (Unix timestamp)

info

object or null

A key-value object listing all the client custom fields. If there are no custom fields, it will be a null value

Last updated