Gumroad API Reference

The Gumroad OAuth API is based around REST. We return JSON for every request, including errors. We also use HTTP response codes to indicate errors.

We've tried to make it as easy to use as possible, but if you have any feedback please let us know.

To start using the Gumroad API, you'll need to register as a developer and then register your OAuth application.

After creating an application, you'll be given a unique application id and application secret.

Authentication

get /oauth/authorize

Get an authorization code.

https://gumroad.com/oauth/authorize

Parameters:

  • client_id (string) - Provided by Gumroad when you registered your application
  • redirect_uri (string) - URL in your app where users will be sent after authorization.
  • scope (optional string) Space separated list of scopes

cURL example

curl https://gumroad.com/oauth/authorize \
  -d "client_id=CLIENT_ID" \
  -d "redirect_uri=http://yourapp.com/callback" \
  -d "scope=edit_products" \
  -X GET

Gumroad redirects back to your site

If the user gives your application access, Gumroad will redirect back to your redirect_uri with a temporary code in a code parameter.

You can exchange this code for an access token by sending a POST back:

post /oauth/token

Get an access token using the authorization code

https://gumroad.com/oauth/token

Parameters:

  • code (string) - Temporary code recieved in a POST request to redirect_uri
  • redirect_uri (string) - URL in your app where users will be sent after authorization.
  • client_id (string) - Provided by Gumroad when you registered your application
  • client_secret (string) - Provided by Gumroad when you registered your application

cURL example

curl https://gumroad.com/oauth/token \
  -d "code=CODE" \
  -d "redirect_uri=http://yourapp.com/callback" \
  -d "client_secret=CLIENT_SECRET" \
  -d "client_id=CLIENT_ID" \
  -X POST

Example response:

{
  "access_token": "3e46813167b85ab64184112ec7793ca9ccaef321f6cf3378a52ed34f9156f6ab",
  "token_type":"bearer",
  "scope":"edit_products"
}

This access token never expires.

Scopes

We've provided three scopes that you may request when the user authorizes your application.

  • no scope: read-only access to the user's public information and products.
  • edit_products: read/write access to the user's products and their variants, offer codes, and custom fields.
  • view_sales: read access to the user's products' sales information, including sales counts and view counts. This scope is also required in order to subscribe to the user's sales.
  • revenue_share: Allows products that your application creates to take a percentage of all proceeds. The OAuth Application must also request the edit_products scope in order to create products. For more information visit the Revenue Share section.

Resources

omniauth-gumroad - (Ruby) an OmniAuth strategy for Gumroad OAuth.

revenue-share-sample-app - a sample Rails app using Revenue Share and Devise to power a basic store.

More reading

If you're interested in learning more about OAuth, here are some links that might be useful:

API Errors

Gumroad uses HTTP status codes to indicate the status of a request. Here's a run down on likely response codes.

  • 200 OK everything worked as expected.
  • 400 Bad Request you probably missed a required parameter.
  • 401 Unauthorized you did not provide a valid access token.
  • 402 Request Failed the parameters were valid but request failed.
  • 404 Not Found the requested item doesn't exist.
  • 500, 502, 503, 504 Server Error something else went wrong on our end.

To help you further, we provide a JSON object that goes more in-depth about the problem that led to the failed request. Errors responses from the api will follow the following format.

{
  "success": false,
  "message": "The product could not be found."
}

When present, the message will describe the particular problem and suggestions on what went wrong.

API Methods

Gumroad's OAuth 2.0 API lets you do most functions on your products. You can add, edit, and delete products and their offer codes, variants, and custom fields. You can also upload files directly, with a 6GB limit. Finally, you can see a user's public information and subscribe to be notified of their sales. If you have any questions, feel free to email us.

Products

get /products

Retrieve all of the existing products for the authenticated user.

https://api.gumroad.com/v2/products

cURL example

curl https://api.gumroad.com/v2/products \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "products": [{
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": true,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }, {...}, {...}]
}

get /products/:id

Retrieve the details of a product.

https://api.gumroad.com/v2/products/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA== \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "product": {
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": true,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }
}

post /products

Create a new product for the user.

https://api.gumroad.com/v2/products

Parameters:

  • name
  • url or file (any local file)
  • price (in cents)
  • description (optional)
  • preview_url or preview (optional, image or audio)
  • country_available (optional, (US, UK, CA, AU, or JP) )
  • max_purchase_count (optional, integer)
  • customizable_price (optional, boolean)
  • webhook (optional, boolean)
  • require_shipping (optional, boolean)
  • shown_on_profile (optional, boolean)
  • custom_receipt (optional, string)
  • custom_summary (optional, string)
  • custom_product_type (optional, string)
  • custom_filetype (optional, string)
  • custom_permalink (optional, string)

cURL example

curl https://api.gumroad.com/v2/products \
  -d "access_token=ACCESS_TOKEN" \
  -d "name=Pencil Icon PSD" \
  -d "url=http://sahillavingia.com/pencil.psd" \
  -d "price=100" \
  -d "description=I made this for fun." \
# or if uploading a file rather than using a link \
curl https://api.gumroad.com/v2/products \ -F "access_token=ACCESS_TOKEN" \ -F "name=Pencil Icon PSD" \ -F "file=@/path/to/pencil.psd" \ -F "preview=@/path/to/pencil_preview.png" \ -F "price=100" \ -F "description=I made this for fun." -F "subscription_duration=monthly"

Example response:

{
  "success": true,
  "product": {
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": true,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }
}

put /products/:id

Edit an existing product.

https://api.gumroad.com/v2/products/:id

Parameters:

  • product
  • name
  • url or file (any local file)>
  • price (in cents)
  • description
  • preview_url or preview (image or audio)
  • country_available (US, UK, CA, AU, or JP)
  • max_purchase_count (integer)
  • customizable_price (boolean)
  • webhook (boolean)
  • require_shipping (boolean)
  • shown_on_profile (boolean)
  • custom_receipt (string)
  • custom_summary (string)
  • custom_product_type (string)
  • custom_filetype (string)
  • custom_permalink (string)
  • subscription_duration (string, monthly or yearly)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA== \
  -d "access_token=ACCESS_TOKEN" \
  -d "price=100" \
  -X PUT

Example response:

{
  "success": true,
  "product": {
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": true,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }
}

delete /products/:id

Permanently delete a product.

https://api.gumroad.com/v2/products/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA== \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The product has been deleted successfully."
}

put /products/:id/enable

Enable an existing product.

https://api.gumroad.com/v2/products/:id/enable

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/enable \
  -d "access_token=ACCESS_TOKEN" \
  -X PUT

Example response:

{
  "success": true,
  "product": {
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": true,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }
}

put /products/:id/disable

Disable an existing product.

https://api.gumroad.com/v2/products/:id/disable

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/disable \
  -d "access_token=ACCESS_TOKEN" \
  -X PUT

Example response:

{
  "success": true,
  "product": {
    "custom_permalink": null,
    "custom_receipt": null,
    "custom_summary": "You'll get one PSD file.",
    "custom_fields": [],
    "customizable_price": null,
    "description": "I made this for fun.",
    "deleted": false,
    "max_purchase_count": null,
    "name": "Pencil Icon PSD",
    "preview_url": null,
    "require_shipping": false,
    "subscription_duration": null,
    "published": false,
    "url": "http://sahillavingia.com/pencil.psd",
    "webhook": null,
    "id": "A-m3CDDC5dlrSdKZp0RFhA==",
    "custom_product_type": null,
    "country_available": null,
    "price": 100,
    "currency": "usd",
    "short_url": "https://gum.co/a",
    "formatted_price": "$1",
    "file_info": {},
    "shown_on_profile": true,
    "view_count": "0", # available with the 'view_sales' scope
    "sales_count": "0", # available with the 'view_sales' scope
    "sales_usd_cents": "0" # available with the 'view_sales' scope
  }
}

Variant categories

post /products/:product_id/variant_categories

Create a new variant category on a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories

Parameters:

  • variant_category
  • title

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories \
  -d "access_token=ACCESS_TOKEN" \
  -d "title=colors" \
  -X POST

Example response:

{
  "success": true,
  "variant_category": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "title": "colors"
  }
}

get /products/:product_id/variant_categories/:id

Retrieve the details of a variant category of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g== \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "variant_category": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "title": "colors"
  }
}

put /products/:product_id/variant_categories/:id

Edit a variant category of an existing product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:id

Parameters:

  • variant_category
  • title

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g== \
  -d "access_token=ACCESS_TOKEN" \
  -d "title=sizes" \
  -X PUT

Example response:

{
  "success": true,
  "variant_category": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "title": "colors"
  }
}

delete /products/:product_id/variant_categories/:id

Permanently delete a variant category of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g== \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The variant_category has been deleted successfully."
}

get /products/:product_id/variant_categories

Retrieve all of the existing variant categories of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "variant_categories": [{
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "title": "colors"
  }, {...}, {...}]
}

post /products/:product_id/variant_categories/:variant_category_id/variants

Create a new variant of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:variant_category_id/variants

Parameters:

  • variant
  • name
  • price_difference_cents
  • max_purchase_count (optional)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g==/variants \
  -d "access_token=ACCESS_TOKEN" \
  -d "name=red" \
  -d "price_difference_cents=250"

Example response:

{
  "success": true,
  "variant": {
    "id": "l5C1XQfr2TG3WXcGY7YrUg==",
    "max_purchase_count": null,
    "name": "red",
    "price_difference_cents": 100
  }
}

get /products/:product_id/variant_categories/:variant_category_id/variants/:id

Retrieve the details of a variant of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:variant_category_id/variants/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g==/variants/kuaXCPHTmRuoK13rNGVbxg== \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "variant": {
    "id": "l5C1XQfr2TG3WXcGY7YrUg==",
    "max_purchase_count": null,
    "name": "red",
    "price_difference_cents": 100
  }
}

put /products/:product_id/variant_categories/:variant_category_id/variants/:id

Edit a variant of an existing product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:variant_category_id/variants/:id

Parameters:

  • variant
  • name
  • price_difference_cents
  • max_purchase_count (optional)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g==/variants/kuaXCPHTmRuoK13rNGVbxg== \
  -d "access_token=ACCESS_TOKEN" \
  -d "price_difference_cents=150" \
  -X PUT

Example response:

{
  "success": true,
  "variant": {
    "id": "l5C1XQfr2TG3WXcGY7YrUg==",
    "max_purchase_count": null,
    "name": "red",
    "price_difference_cents": 100
  }
}

delete /products/:product_id/variant_categories/:variant_category_id/variants/:id

Permanently delete a variant of a product.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:variant_category_id/variants/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g==/variants/kuaXCPHTmRuoK13rNGVbxg== \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The variant has been deleted successfully."
}

get /products/:product_id/variant_categories/:variant_category_id/variants

Retrieve all of the existing variants in a variant category.

https://api.gumroad.com/v2/products/:product_id/variant_categories/:variant_category_id/variants

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/variant_categories/mN7CdHiwHaR9FlxKvF-n-g==/variants \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "variants": [{
    "id": "l5C1XQfr2TG3WXcGY7YrUg==",
    "max_purchase_count": null,
    "name": "red",
    "price_difference_cents": 100
  }, {...}, {...}]
}

Offer codes

get /products/:product_id/offer_codes

Retrieve all of the existing offer codes for a product.

https://api.gumroad.com/v2/products/:product_id/offer_codes

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/offer_codes \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "offer_codes": [{
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "name": "discount",
    "amount_cents": 100,
    "max_purchase_count": null
  }, {...}, {...}]
}

get /products/:product_id/offer_codes/:id

Retrieve the details of a specific offer code of a product

https://api.gumroad.com/v2/products/:product_id/offer_codes/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/offer_codes/bfi_30HLgGWL8H2wo_Gzlg== \
  -d "access_token=ACCESS_TOKEN" \
  -d "name=discount" \
  -d "amount_cents=100" \
  -X GET

Example response:

{
  "success": true,
  "offer_code": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "name": "discount",
    "amount_cents": 100,
    "max_purchase_count": null
  }
}

post /products/:product_id/offer_codes

Create a new offer code for a product.

https://api.gumroad.com/v2/products/:product_id/offer_codes

Parameters:

  • offer_code
  • name
  • amount_cents
  • max_purchase_count (optional)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/offer_codes \
  -d "access_token=ACCESS_TOKEN" \
  -d "name=discount" \
  -d "amount_cents=100" \
  -X POST

Example response:

{
  "success": true,
  "offer_code": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "name": "discount",
    "amount_cents": 100,
    "max_purchase_count": null
  }
}

put /products/:product_id/offer_codes/:id

Edit an existing product's offer code.

https://api.gumroad.com/v2/products/:product_id/offer_codes/:id

Parameters:

  • offer_code
  • max_purchase_count

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/offer_codes/bfi_30HLgGWL8H2wo_Gzlg== \
  -d "access_token=ACCESS_TOKEN" \
  -d "max_purchase_count=10" \
  -X PUT

Example response:

{
  "success": true,
  "offer_code": {
    "id": "mN7CdHiwHaR9FlxKvF-n-g==",
    "name": "discount",
    "amount_cents": 100,
    "max_purchase_count": null
  }
}

delete /products/:product_id/offer_codes/:id

Permanently delete a product's offer code.

https://api.gumroad.com/v2/products/:product_id/offer_codes/:id

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/offer_codes/bfi_30HLgGWL8H2wo_Gzlg== \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The offer_code has been deleted successfully."
}

Custom fields

get /products/:product_id/custom_fields

Retrieve all of the existing custom fields for a product.

https://api.gumroad.com/v2/products/:product_id/custom_fields

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/custom_fields \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "custom_fields": [{
    "name": "phone number",
    "required": "false"
  }, {...}, {...}]
}

post /products/:product_id/custom_fields

Create a new custom field for a product.

https://api.gumroad.com/v2/products/:product_id/custom_fields

Parameters:

  • variant
  • name
  • required (true or false)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/custom_fields \
  -d "access_token=ACCESS_TOKEN" \
  -d "name=phone number" \
  -d "required=true" \
  -X PUT

Example response:

{
  "success": true,
  "custom_field": {
    "name": "phone number",
    "required": "false"
  }
}

put /products/:product_id/custom_fields/:name

Edit an existing product's custom field.

https://api.gumroad.com/v2/products/:product_id/custom_fields/:name

Parameters:

  • variant
  • required (true or false)

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/custom_fields/phone%20number \
  -d "access_token=ACCESS_TOKEN" \
  -d "required=false" \
  -d "name=phone number" \
  -X PUT

Example response:

{
  "success": true,
  "custom_field": {
    "name": "phone number",
    "required": "false"
  }
}

delete /products/:product_id/custom_fields/:name

Permanently delete a product's custom field.

https://api.gumroad.com/v2/products/:product_id/custom_fields/:name

cURL example

curl https://api.gumroad.com/v2/products/A-m3CDDC5dlrSdKZp0RFhA==/custom_fields/phone%20number \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The custom_field has been deleted successfully."
}

User

get /user

Retrieve the user's data.

https://api.gumroad.com/v2/user

cURL example

curl https://api.gumroad.com/v2/user \
  -d "access_token=ACCESS_TOKEN" \
  -X GET

Example response:

{
  "success": true,
  "user": {
    "bio": "a sailor, a tailor",
    "facebook_profile": null,
    "name": "John Smith",
    "twitter_handle": null,
    "id": "5169428188213",
    "email": "johnsmith@gumroad.com"
  }
}

Resource subscriptions

get /resource_subscriptions

Show all active subscriptions for this user.

https://api.gumroad.com/v2/resource_subscriptions

Parameters:

  • resource_name (string) - Currently the only supported value is "sale".

cURL example

curl https://api.gumroad.com/v2/resource_subscriptions \
  -d "access_token=ACCESS_TOKEN" \
  -d "resource_name=sale" \
  -X GET

Example response:

{
  "success": true,
  "resource_subscriptions": [{
    "id": "G_-mnBf9b1j9A7a4ub4nFQ==",
    "resource_name": "sale",
    "post_url": "https://postatmebro.com"
  }, {...}, {...}]
}

put /resource_subscriptions

Subscribe to a resource. Currently the only supported resource name is "sale". Once subscribed you will be notified of the user's sales with an HTTP POST to your post_url. The format of the POST is described on the Gumroad Ping page.

https://api.gumroad.com/v2/resource_subscriptions

cURL example

curl https://api.gumroad.com/v2/resource_subscriptions \
  -d "access_token=ACCESS_TOKEN" \
  -d "resource_name=sale" \
  -d "post_url=https://postatmebro.com" \
  -X PUT

Example response:

{
  "success": true,
  "resource_subscription": {
    "id": "G_-mnBf9b1j9A7a4ub4nFQ==",
    "resource_name": "sale",
    "post_url": "https://postatmebro.com"
  }
}

delete /resource_subscriptions/:resource_subscription_id

Unsubscribe from a resource.

https://api.gumroad.com/v2/resource_subscriptions/:resource_subscription_id

cURL example

curl https://api.gumroad.com/v2/resource_subscriptions/G_-mnBf9b1j9A7a4ub4nFQ== \
  -d "access_token=ACCESS_TOKEN" \
  -X DELETE

Example response:

{
  "success": true,
  "message": "The resource_subscription was deleted successfully."
}