Developers / API Documentation / Resources / Petitions

Reasons on Petitions

GET petitions/:petition_id/reasons

Returns the reasons given by signers of a petition for having signed.

Request Parameters

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

Response Data

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

The reasons array contains objects with the following data:

Field Name Type Description
created_on string of ISO-8601 datetime The date and time when this reason was posted to the petition.
content string The content of the reason for signing.
like_count int The number of users who have liked this reason.
author_name string The name of the author of the reason.
author_url string The URL to the profile page of the reason author.
flag_endpoint string (Not yet implemented.) The URL to send a PUT request to if this reason should be removed for inappropriate content. The body of the PUT request should include a parameter why that indicates the justification for flagging.


=> {
"reason_count": 1,
"prev_page_endpoint": null,
"next_page_endpoint": null,
"page": 1,
"total_pages": 1,
"reasons": [{
"created_on": "2012-02-15T23:39:31Z",
"content": "Because I’m tired of wearing red!",
"like_count": 4,
"author_name": "Jean-Luc Picard",
"author_url": ""
"flag_endpoint": ""

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.