Use the REST API to interact with GitHub Marketplace
For more information about GitHub Marketplace, see GitHub Marketplace.
These endpoints allow you to see which customers are using a pricing plan, see a customer's purchases, and see if an account has an active subscription.
You can test your GitHub App with stubbed data. Stubbed data is hard-coded, fake data that will not change based on actual subscriptions.
To test with stubbed data, use a stubbed endpoint in place of its production counterpart. This allows you to test whether the API logic succeeds before listing GitHub Apps on GitHub Marketplace.
Make sure to replace stubbed endpoints with production endpoints before deploying your GitHub App.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /marketplace_listing/accounts/{account_id}
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. 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.
accept (string)application/vnd.github+json is recommended.account_id (integer) (required)200 - OK
401 - Requires authentication
404 - Not Found when the account has not purchased the listing
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/accounts/ACCOUNT_ID
Response schema (Status: 200):
url: required, stringtype: required, stringid: required, integerlogin: required, stringorganization_billing_email: stringemail: string or nullmarketplace_pending_change: object or null:
is_installed: booleaneffective_date: stringunit_count: integer or nullid: integerplan: Marketplace Listing Plan:
url: required, string, format: uriaccounts_url: required, string, format: uriid: required, integernumber: required, integername: required, stringdescription: required, stringmonthly_price_in_cents: required, integeryearly_price_in_cents: required, integerprice_model: required, string, enum: FREE, FLAT_RATE, PER_UNIThas_free_trial: required, booleanunit_name: required, string or nullstate: required, stringbullets: required, array of stringmarketplace_purchase: required, object:
billing_cycle: stringnext_billing_date: string or nullis_installed: booleanunit_count: integer or nullon_free_trial: booleanfree_trial_ends_on: string or nullupdated_at: stringplan: Marketplace Listing Plan (see above)GET /marketplace_listing/plans
Lists all plans that are part of your GitHub Marketplace listing.
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.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
401 - Requires authentication
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/plans
Response schema (Status: 200):
Array of Marketplace Listing Plan:
url: required, string, format: uriaccounts_url: required, string, format: uriid: required, integernumber: required, integername: required, stringdescription: required, stringmonthly_price_in_cents: required, integeryearly_price_in_cents: required, integerprice_model: required, string, enum: FREE, FLAT_RATE, PER_UNIThas_free_trial: required, booleanunit_name: required, string or nullstate: required, stringbullets: required, array of stringGET /marketplace_listing/plans/{plan_id}/accounts
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.
accept (string)application/vnd.github+json is recommended.plan_id (integer) (required)
The unique identifier of the plan.
sort (string)
The property to sort the results by.
Default: created
Can be one of: created, updated
direction (string)
To return the oldest accounts first, set to asc. Ignored without the sort parameter.
Can be one of: asc, desc
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
401 - Requires authentication
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/plans/PLAN_ID/accounts
Response schema (Status: 200):
Array of Marketplace Purchase:
url: required, stringtype: required, stringid: required, integerlogin: required, stringorganization_billing_email: stringemail: string or nullmarketplace_pending_change: object or null:
is_installed: booleaneffective_date: stringunit_count: integer or nullid: integerplan: Marketplace Listing Plan:
url: required, string, format: uriaccounts_url: required, string, format: uriid: required, integernumber: required, integername: required, stringdescription: required, stringmonthly_price_in_cents: required, integeryearly_price_in_cents: required, integerprice_model: required, string, enum: FREE, FLAT_RATE, PER_UNIThas_free_trial: required, booleanunit_name: required, string or nullstate: required, stringbullets: required, array of stringmarketplace_purchase: required, object:
billing_cycle: stringnext_billing_date: string or nullis_installed: booleanunit_count: integer or nullon_free_trial: booleanfree_trial_ends_on: string or nullupdated_at: stringplan: Marketplace Listing Plan (see above)GET /marketplace_listing/stubbed/accounts/{account_id}
Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. 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.
accept (string)application/vnd.github+json is recommended.account_id (integer) (required)200 - OK
401 - Requires authentication
404 - Not Found when the account has not purchased the listing
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/stubbed/accounts/ACCOUNT_ID
Response schema (Status: 200):
Same response schema as Get a subscription plan for an account.
GET /marketplace_listing/stubbed/plans
Lists all plans that are part of your GitHub Marketplace listing.
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.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
401 - Requires authentication
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/stubbed/plans
Response schema (Status: 200):
Same response schema as List plans.
GET /marketplace_listing/stubbed/plans/{plan_id}/accounts
Returns repository 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.
accept (string)application/vnd.github+json is recommended.plan_id (integer) (required)
The unique identifier of the plan.
sort (string)
The property to sort the results by.
Default: created
Can be one of: created, updated
direction (string)
To return the oldest accounts first, set to asc. Ignored without the sort parameter.
Can be one of: asc, desc
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
401 - Requires authentication
Request:
curl -L \
-X GET \
https://api.github.com/marketplace_listing/stubbed/plans/PLAN_ID/accounts
Response schema (Status: 200):
Same response schema as List accounts for a plan.
GET /user/marketplace_purchases
Lists the active subscriptions for the authenticated user.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
401 - Requires authentication
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/user/marketplace_purchases
Response schema (Status: 200):
Array of User Marketplace Purchase:
billing_cycle: required, stringnext_billing_date: required, string or null, format: date-timeunit_count: required, integer or nullon_free_trial: required, booleanfree_trial_ends_on: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeaccount: required, Marketplace Account:
url: required, string, format: uriid: required, integertype: required, stringnode_id: stringlogin: required, stringemail: string or null, format: emailorganization_billing_email: string or null, format: emailplan: required, Marketplace Listing Plan:
url: required, string, format: uriaccounts_url: required, string, format: uriid: required, integernumber: required, integername: required, stringdescription: required, stringmonthly_price_in_cents: required, integeryearly_price_in_cents: required, integerprice_model: required, string, enum: FREE, FLAT_RATE, PER_UNIThas_free_trial: required, booleanunit_name: required, string or nullstate: required, stringbullets: required, array of stringGET /user/marketplace_purchases/stubbed
Lists the active subscriptions for the authenticated user.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
401 - Requires authentication
Request:
curl -L \
-X GET \
https://api.github.com/user/marketplace_purchases/stubbed
Response schema (Status: 200):
Same response schema as List subscriptions for the authenticated user.