Make your product
work with UP.

Custom

Get a custom event for the user

Returns the list of custom events of the current user. Custom events can be used for any partner notifications that don't fit any of the other established endpoints. These can be used for notifications or unique signals. Includes text and a picture to inform the user.

This list can be paginated by date or timestamp.

Note that these events are called "Custom" although the actual API call uses "Generic".
URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/generic_events GET application/json Generic
Parameter Type Description
date int Date, formatted as YYYYMMDD. If omitted, returns the information for today.
page_token int Timestamp used to paginate the list of events. The Developer must use the "next" link provided in the "links" section.
start_time int To be used along with end_time. Epoch timestamp that denotes the start of the time range queried for events.
end_time int To be used with start_time. Epoch timestamp that denotes the end of the time range queried for events.
updated_after int Epoch timestamp to list events that are updated later than the timestamp. To be used with start_time to list events that were completed after said start_time.
limit int Maximum number of results to return

Example:

GET <a href="https://jawbone.com/nudge/api/v.1.1/users/@me/generic_events?page_token=1335074239">https://jawbone.com/nudge/api/v.1.1/users/@me/generic_events?page_token=1335074239</a> HTTP/1.1
Host: jawbone.com
	

Will return:

HTTP 200 OK
{
   "meta": 
   {
      "user_xid": "6xl39CsoVp2KirfHwVq_Fx",
      "message": "OK",
      "code": 200
      "time": 1382377526
   },
  “data”:
   {
      "items": 
      [{
         "xid": "40F7_htRRnT8Vo7nRBZO1X",
         "title": "Sunset today at November 21st, 2013 at 4:49PM",
         "type": "generic",
         "time_created": 1384963500,
         "time_updated": 1385049599,
         "date": 20131121,
         "place_lat": "37.451572",
         "place_lon": "-122.184435",
         "place_acc": 10,
         "place_name": "Work",
         "image": "/nudge/image/d/770eca483cd211e3910e22000a1fb6b5_image.png",
         "attributes": 
         {
            "description": "My local sunset time"
         }
         "details": 
         {
            "tz": "America/Los_Angeles"
         }
      },
      {
      ... more items ....
      }],
      "links": 
      {
         "next": "/nudge/api/v.1.1/users/6xl39CsoVp2KirfHwVq_Fx/generic_events?page_token=1384390680"
      },
      “size”: 10
   }   
}
	
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 generic event
type string Type of event, in this case a generic event.
time_created int Epoch timestamp when this generic event was created.
time_updated int Epoch timestamp when this generic event was updated.
date int Date when this generic event was created, formatted as YYYYMMDD.
place_lat float Latitude of location where generic event was logged.
place_lon float Longitude of location where generic event was logged.
place_acc int Accuracy of location where generic event was logged, in meters.
place_name string Name of location where generic event was logged.
image URI Link to the image of this generic event (relative, add prefix https://jawbone.com)
attributes JSON list JSON list of attributes submitted by 3rd party partner.
tz int 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.
size int Number of items in this list.
next URI Link to next page of data (relative, add https://jawbone.com as prefix).

Creates a new custom event.

Custom event is recommended as a means to post your app specific user actions to the user's feed and attract new users from their teammates.
URI Method Response Type Returns
/nudge/api/v.1.1/users/@me/generic_events POST application/json Generic
Parameter Type Description
title string Name of the event (used in the feed story). 255 characters max.
verb string Verb to indicate user action (used in the feed story). 34 characters max.
attributes json Set of attributes associated with the event (for partner data only, not exposed in feed).
note string Description of the event. 512 characters max. URL links can be included to link outside the app. HTML formatting is not available.
image_url URI URI of the event's image
place_lat float Latitude of the location where the event was created
place_lon float Longitude of the location where the event was created
place_acc float Accuracy (meters) of the location where the event was created
place_name string Name of the location where the event was created
time_created int Unix timestamp when the event 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 <a href="https://jawbone.com/nudge/api/v.1.1/users/@me/generic_events">https://jawbone.com/nudge/api/v.1.1/users/@me/generic_events</a> HTTP/1.1
Host: jawbone.com 
Content-Type: application/x-www-form-urlencoded
title=A feed post&image_url=http://site.com/image.png;verb=did;attributes={"description": "ran the Chicago marathon"}
	

Will return:

HTTP 201 Created
{
 "meta": 
    {
    "user_xid": "b9yCLa3f01yf",
    "message": "OK",
    "code": 200
    "time": 1351647790
  },
 "data":
    {
    "xid": "Oqsd3as33r",
    "title": "Earned 10 points",
    "image": "http://example.com/image.png",
    "time_created": 1351647790,
    "date": 20121030,
    "attributes": {
        "description": "ran the Chicago marathon"
     }
  }
}
	

Representation in UP app:

Note cropping on 640x440 image. Each little square is 10x10 in images below.

At feed level:

At detail level:


Update a custom event

URI Method Response Type Returns
/nudge/api/v.1.1/generic_events/{xid}/partialUpdate POST application/json Generic
Parameter Type Description
title string Name of the event (used in the feed story).
verb string Verb to indicate user action (used in the feed story).
attributes json Set of attributes associated with the event (for partner data only, not exposed in feed).
note string Description of the event
image_url URI URI of the event's image
place_lat float Latitude of the location where the event was created
place_lon float Longitude of the location where the event was created
place_acc float Accuracy (meters) of the location where the event was created
place_name string Name of the location where the event was created
time_created int Unix timestamp when the event 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 <a href="https://jawbone.com/nudge/api/v.1.1/generic_events/Oqsd3as33r/partialUpdate">https://jawbone.com/nudge/api/v.1.1/generic_events/Oqsd3as33r/partialUpdate</a> HTTP/1.1
Host: jawbone.com 
Content-Type: application/x-www-form-urlencoded
image_url=http://site.com/MyNewImage.png;verb=mynewverb;
	

Will return:

HTTP 200 OK
{
 "meta": 
    {
    "user_xid": "b9yCLa3f01yf",
    "message": "OK",
    "code": 200
    "time": 1351647790
  },
 "data":
    {
    "xid": "Oqsd3as33r",
    "title": "Earned 10 points",
    "image": "http://example.com/MyNewImage.png",
    "time_created": 1351647790,
    "date": 20121030,
    "attributes": {
        "description": "ran the Chicago marathon"
     }
  }
}
	

Delete a custom event.

Deletes an existing custom 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/generic_events/{xid} /DELETE /application/json /Status

Example:

DELETE <a href="https://jawbone.com/nudge/api/v.1.1/generic_events/0ac1wXjUAYQ">https://jawbone.com/nudge/api/v.1.1/generic_events/0ac1wXjUAYQ</a> HTTP/1.1
Host: jawbone.com
Content-Type: application/x-www-form-urlencoded
	

Will return:

HTTP 200 OK
{
    "meta": {
        "user_xid": "V6p0-s4-qIo",
        "message": "OK",
        "code": 200,
        "time": 1351121565
    },
    "data": {}
}