References

Users Resources

Resources and actions to manage the users of an organization

GET
https://api.upcoach.com/me/
Get authentication organization and user information

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

Parameters

No parameters

Responses
200: OK

User and Organization Resource Objects

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

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

Returns a list of team members in the organization.

Parameters
Query
filter[id]

Filter by user ID, leave empty to return all

filter[email]

Filter by user email, leave empty to return all.

filter[role]

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

sort

Available sort fields: created_at, name, role

Responses
200: OK

List of Team Member Resource objects


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

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

Returns a list of clients in the organization

Parameters
Query
filter[id]

User ID

filter[email]

User email address

sort

Available sort fields: created_at, name

Responses
200: OK

A paginated list of Client Resource Objects

{
  "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": ...
  }
}

POST
https://api.upcoach.com/clients
Add new client

Adds a new client to the organization

Parameters
Body
name *

Full name

email *

Email address

password

Password (min. 8 characters)

timezone

Timezone (any value from tz database)

send_invite

boolean (send invitation email to clients)

Responses
200: OK

Client Resource Object

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

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

Updates a client's custom field information.

Parameters
Path
<user_id> *

String: User ID

Body
info *

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

Responses
200: OK

Client Resource Object

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

PUT
https://api.upcoach.com/me
Update user's profile information

Updates the authenticated user's profile information.

Parameters
Body
name

string

email

string

email_notifications *

string, one of never, weekly, hourly, daily

digests *

boolean

Responses
200: OK

User and Organization Resource Objects

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

POST
https://api.upcoach.com/me/avatar
Update user's profile avatar image

Updates the authenticated user's profile avatar image.

Parameters
Body
avatar *

image file (jpg, png, gif), max 4mb

Responses
200: OK

User and Organization Resource Objects

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

Resource Objects

User

Property

Type

Description

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

email_notifications

string

Email notification preference for the user. One of never, weekly, hourly, daily

digests

boolean

Whether user receives digests or not

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

Organization

Property

Type

Description

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

Property

Type

Description

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

Property

Type

Description

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

Previous
Quick Start