Users

This functionality is only available to supporters.

User Listing

> curl -H "Accept: application/vnd.tender-v1+json" "https://USER:PASS@api.tenderapp.com/yoursite/users"
{
  "offset": 0,
  "total": 329,
  "per_page": 30,
  "users": [
    {USER}, {USER}, etc
  ]
}

You can find a user by email by supplying an email param. You can also get a subset of users by using the filter parameter with: support, active, disabled, beta or important.

Single User

> curl -H "Accept: application/vnd.tender-v1+json" "https://USER:PASS@api.tenderapp.com/yoursite/users/12345"
{
  "name": "USER",
  "email": "USER@EXAMPLE",
  "title": null,
  "external_id": "ivanv@equius.com.au",
  "state": "user",
  "enable_email_notifications": true,
  "public_facing": true,
  "openid_url": null,
  "trusted": false,
  "comments_count": 3,
  "discussions_count": 2,
  "href": "https://api.tenderapp.com/yoursite/users/12345",
  "discussions_href": "https://api.tenderapp.com/yoursite/users/12345/discussions{-opt|?|page,user_email}{-join|&|page,user_email}",
  "created_at": "2009-01-26T08:12:37Z",
  "updated_at": "2009-01-26T08:12:37Z",
  "activated_at": "2008-01-20T04:09:41Z"
}

Current User

> curl -H "Accept: application/vnd.tender-v1+json" "https://USER:PASS@api.tenderapp.com/yoursite/profile"

User Attributes

  • name - The user's name.
  • email - The user's email address.
  • title - The user's job title.
  • external_id - ID string used to identify the user for Multipass requests. Uses email by default.
  • state - The state of the user (user, support, disabled, spammer).
  • enable_email_notifications - A boolean that determines if the user receives any email notifications for updated discussions.
  • public_facing - A boolean that determines if the support user is shown on the homepage of the site. Ignored for non-support users.
  • openid_url (readonly) - The user's OpenID URL.
  • trusted (readonly) - A boolean that is set to true if a user has at least three valid discussions posted. Discussions posted by support and trusted users skip spam checks.
  • comments_count (readonly) - the total number of comments
  • discussions_count (readonly) - the total number of discussions started
  • href - API URL for the user.
  • important and beta flags to set the user's access to important- and beta-only knowledge base sections and discussion categories.
  • company_id - if companies is enabled on your site, allows you to associate a user with a company.
  • discussions_href (readonly) - URL template for selecting all discussions created by this user. See the discussion resource for info on parsing the URI templates for discussions.

Create User

To create a user, you need to POST a JSON user with the email, password, and password_confirmation fields. name and title are optional. If successful, a valid user JSON record is returned.

For public sites, you do not have to be logged in to create a user. However, private sites require support users to create users.

> curl -H "Accept: application/vnd.tender-v1+json" \
  -H "Content-Type: application/json" \
  -d '{"email":"USER@EXAMPLE","password":"PASS","password_confirmation":"PASS"}'
  "https://api.tenderapp.com/yoursite/users"

Update User

To update a user, you need to POST a JSON hash with the fields you want updated. If successful, a valid user JSON record is returned.

> curl -X 'PUT' -H "Accept: application/vnd.tender-v1+json" \
  -H "Content-Type: application/json" \
  -d '{"name":"Henry","extras":{"foo":"bar"}}' \
  "https://USER:PASS@api.tenderapp.com/yoursite/users/12345"

You can update the following attributes: name, email, password AND password_confirmation, title, external_id, state and extras.

Login User

You can also validate a login by passing a JSON hash with just the email and password options. You do not have to pass login information to verify an email/password.

> curl -H "Accept: application/vnd.tender-v1+json" \
  -H "Content-Type: application/json" \
  -d '{"email":"USER@EXAMPLE","password":"PASS"}'
  "https://api.tenderapp.com/yoursite/users"

Recent Discussions

17 Jul, 2017 10:30 PM
16 Jul, 2017 10:44 AM
13 Jul, 2017 06:38 PM
25 Jun, 2017 08:56 PM
15 Jun, 2017 08:35 PM