PUT user
Updates specific user details. Users can only update their own user account, not the account of others.
Resource URL
https://www.drillster.com/api/2.1/user
Parameters
Field | Type | Description |
---|---|---|
name optional |
String | The full name of the user. Example value: Alice Smith |
locale optional |
String | The preferred language of the user. If supported by Drillster, this language will be used if the user logs in to the web interface. If not provided, the calling user's locale will be used. The value must be a 🔗 ISO 639-1 language code. Currently supported language codes by Drillster are:
fr |
timeZone optional |
String | The time zone that the user resides in. Values are as defined by the 🔗 IANA Time Zone Database. 🔗 This document provides a full list of time zone IDs. Example values:
|
description optional |
String | A brief biography or description of the user. Example value: I use Drillster to brush up on my language skills |
yearOfBirth optional |
Integer | The user's year of birth. |
domicile optional |
String | The user's country of residence. Please provide a valid two-letter ISO 3166 country code. |
💡 Good to know
If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e.
Content-Length: 0
). Not all HTTP clients do this automatically. For more information, please see 🔗 RFC 2616
Response
A 2.1 User object reflecting the changes made.
Example request
PUT https://www.drillster.com/api/2.1/user
timeZone=America/Los_Angeles
Response
{
"id": "hs64JqogSRiKSC18ivnOmw",
"type": "USER",
"name": "Jane Doe",
"avatar": {
"type": "image/jpeg",
"url": "https://www.drillster.com/bin/avatar/4e81a717261692f59f4bbe411e312cd04cef6df5"
},
"emailAddress": "jane@example.com",
"locale": "es",
"description": "",
"timeZone": "Europe/Amsterdam"
}
Error responses
The following error situations are possible:
ID | Description |
---|---|
missing_parameters |
No input parameters specified. |
no_such_user |
User account could not be loaded. |
invalid_real_name |
Given real name is invalid. |
invalid_locale |
Given locale is not valid. |
invalid_time_zone |
Given time zone is not valid. |
corrupt_user |
Requested user record is incomplete. |