Make your product
work with UP.

Mood

Users can log their mood in the Jawbone UP app or via a 3rd party. Use this endpoint to retrieve the mood details or write your user's mood.

Get user's mood.

URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/mood GET application/json Mood
Parameter Type Description
date string Date, formatted as YYYYMMDD. If omitted, returns the information for today. Only the last mood per day will be returned even if multiple moods were logged.

Example:

GET https://jawbone.com/nudge/api/v.1.1/users/@me/mood HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp3skGXGXNh5wx",
      "message": "OK",
      "code": 200,
      "time": 1386180667
   },
   "data": 
   {
      "xid": "54ylQ_eAUP03niRrISOzAQ",
      "title": "Pumped UP",
      "time_created": 1382119282,
      "time_updated": 1382420872,
      "date": 20131018,
      "type": "mood",
      "sub_type": 2,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Home",
      "details":
      {
         "tz": "America/Los_Angeles"
      }
   }
}
	
Data Value Type Description
xid string Unique ID for this event. Can be used to retrieve data for this specific event, see below.
title string Title of this mood.
time_created int Epoch timestamp when this mood was created.
time_updated int Epoch timestamp when this mood was last updated.
date int Date when this mood was created, formatted as YYYYMMDD.
type string Type of event, in this case a mood.
sub_type int Mood type. 1 = Amazing, 2 = Pumped UP, 3 = Energized, 8= Good, 4 = Meh, 5 = Dragging, 6 = Exhausted, 7 = Totally Done. NOTE: mood number 8 is out of sequence, see below.
place_lat float Latitude of location where mood was logged.
place_lon float Longitude of location where mood was logged.
place_acc int Accuracy of location where mood was logged, in meters.
place_name string Name of location where mood was logged.
tz string Time zone when this event was generated. Whenever possible, Olson format (e.g., "America/Los Angeles") will be returned, otherwise the GMT offset (e.g., "GMT+0800") will be returned.

Mood Types:

1 - Amazing!

2 - Pumped UP
3 - Energized
8 - Good (NOTE: number for this mood is out of sequence)
4 - Meh

5 - Dragging
6 - Exhausted
7 - Totally Done


Get a single mood event.

URI Method Response Type Returns
/nudge/api/v.1.1/mood/{xid} GET application/json Mood

Example:

GET https://jawbone.com/nudge/api/v.1.1/mood/54ylQ_eAUP03niRrISOzAQ HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp3skGXGXNh5wx",
      "message": "OK",
      "code": 200,
      "time": 1386180667
   },
   "data": 
   {
      "xid": "54ylQ_eAUP03niRrISOzAQ",
      "title": "Pumped UP",
      "time_created": 1382119282,
      "time_updated": 1382420872,
      "date": 20131018,
      "type": "mood",
      "sub_type": 2,
      "place_lat": "37.451572",
      "place_lon": "-122.184435",
      "place_acc": 10,
      "place_name": "Home",
      "details":
      {
         "tz": "America/Los_Angeles"
      }
   }
}
	

Record user's mood.

URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/mood POST application/json Mood
Parameter Type Description
title string Title of the event.
sub_type int Mood type. 1 = Amazing, 2 = Pumped UP, 3 = Energized, 8= Good, 4 = Meh, 5 = Dragging, 6 = Exhausted, 7 = Totally Done. NOTE: mood number 8 is out of sequence, see above.
time_created int Epoch timestamp when this mood was created.
tz string Time zone when this event was generated. Whenever possible, Olson format (e.g., "America/Los Angeles") will be returned, otherwise the GMT offset (e.g., "GMT+0800") will be returned.
share boolean Set whether to share event on user's public feed. Will not override if user's privacy setting is set to not share.

Example:

POST https://jawbone.com/nudge/api/v.1.1/users/@me/mood HTTP/1.1
Host: jawbone.com
Content-Type: application/x-www-form-urlencoded
title=MoodTest&sub_type=2
	

Will return:

HTTP 201 Created
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fw",
      "message": "Created",
      "code": 201,
      "time": 1386184433
   },
   "data": 
   {
      "xid": "54ylQ_eAUP03niRrISOzAQ",
      "title": "MoodTest",
      "time_created": 1386184433,
      "time_updated": 1386184433,
      "date": 20131204,
      "type": "mood",
      "sub_type": 2,
      "place_lat": null,
      "place_lon": null,
      "place_acc": "",
      "place_name": "",
      "details":
      {
         "tz": null
      }
   }
}
	

Representation in UP app:

At feed level:

At detail level:


Delete a single mood event.

Deletes an existing event. The event must have been created by the partner for this call to succeed.
URI Method Response Type Returns
/nudge/api/v.1.1/mood/{xid} DELETE application/json Status

Example:

DELETE https://jawbone.com/nudge/api/v.1.1/mood/40F7_htRRnRaVaukZMRiBg HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200,
      "time": 1351121565
    },
    "data": {}
}