Developers / API Documentation / Resources / Petitions

Updates on Petitions

GET petitions/:petition_id/updates

Returns the news updates on a petition.

Request Parameters

Parameter Name Type Description
petition_id int (In URL) The petition from which updates should be retrieved.
page_size int (Optional)The maximum number of updates to return per request, but no more than 100. If omitted, returns a maximum of 10 updates.
page int (Optional) The page offset by page_size updates. If omitted, returns the first page by default.
sort string (Optional) The order by which updates will be returned. Accepted values are time_asc and time_desc. If omitted, returns most recent updates in order.

Response Data

Field Name Type Description
update_count int The number of total news updates on this petition.
prev_page_endpoint string The API endpoint that can be called to retrieve the previous page of updates. null if there is no previous page.
next_page_endpoint string The API endpoint that can be called to retrieve the next page of updates. null if there is no next page.
page int The current page number.
total_pages int The total number of pages of updates (of size specified by page_size)
reasons array The array of news updates.

The updates array contains objects with the following data:

Field Name Type Description
created_on string of ISO-8601 datetime The date and time when this update was posted to the petition.
content string The content of the update to the petition.
author_name string The name of the author of the update.
author_url string The URL to the profile page of the update author.


=> {
"update_count": 8,
"prev_page_endpoint": "",
"next_page_endpoint": "",
"page": 3,
"total_pages": 4,
"created_on": "2012-03-14T03:32:39Z",
"content": "We hit 2,000 signatures!",
"author_name": "Jean-Luc Picard",
"author_url": ""
"created_on": "2012-03-23T15:22:21Z",
"content": "Check out this great media coverage in the Times",
"link": "",
"author_name": "Jean-Luc Picard",
"author_url": ""

Note: A public API key is a required parameter on all requests, and a timestamp, endpoint, and request signature are required on certain requests. For readability, these parameters have been omitted from the tables and examples above.