Sample - GitHub REST API
GET/marketplace_listing/plans/{plan_id}/accounts

List accounts for a plan

Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.

GitHub Apps must use a JWT to access this endpoint. OAuth apps must use basic authentication with their client ID and client secret to access this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
plan_idintegerrequired
The unique identifier of the plan.
sortstringoptional
The property to sort the results by.
Allowed:createdupdatedDefault:created
directionstringoptional
To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter.
Allowed:ascdesc
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1

4 status codes
200Response
urlstringrequired
typestringrequired
idintegerrequired
loginstringrequired
organization_billing_emailstringoptional
emailstringoptional
marketplace_pending_changeobjectoptional
marketplace_purchaseobjectrequired
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 401 is returned: Requires authentication. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.