# Licensing API

For more information about licenses, events, or webhook-responses see Key terms)

# Endpoints

# GET /v2/licenses

Gets all the licenses for you application

# Query parameters

# Example request

GET https://api.licensing.appsumo.com/v2/licenses?limit=1&page=1&status=active

1

# Example response

{
  "size": 1,
  "items": [{
    "license_key": "1ed6fdd3-f772-4b91-b12d-efb772d23cc0",
    "license_redemption_url":"https://appsumo.com/licensing/a81169a1-eb05-4db8-8d65-2d1a8d5af719/redeem/",
    "license_change_plan_url":"https://appsumo.com/licensing/a81169a1-eb05-4db8-8d65-2d1a8d5af719/change_plan/",
    "plan_id": "1510ad397635386dd1ce401ddddde8886cbaa927efa0f3c66de680cfed5b7480",
    "status": "active",
    "tier": 1,
    "created_at": "2022-03-29T17:21:57.444033Z",
    "updated_at": "2022-03-29T17:23:14.791672Z"
  }]
}

# GET /v2/licenses/events

Gets all the license events for you application. Webhook responses are limited to 10 items. If you need to see more responses, use the license_key in webhook-responses

# Query parameters

# Example request

GET https://appsumo.com/v2/licenses/events?limit=1&page=1&status=active

1

# Example response

{
  "size": 1,
  "items": [{
    "event_id": 33,
    "event": "purchase",
    "tier": 1,
    "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
    "plan_id": "1510ad397635386dd1ce401ddddde8886cbaa927efa0f3c66de680cfed5b7480",
    "responses": {
      "size": 10,
      "items": [{
        "webhook_id": 5,
        "event": "purchase",
        "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
        "request_header": "",
        "request_body": "{\"license_key\":\"2191a2c1-01a9-4060-8067-1b466484f21b\",\"event\":\"purchase\",\"license_status\":\"inactive\",\"event_timestamp\":1650488393814}",
        "response_status": 404,
        "response_body": "Not Found",
        "response_time": 208,
        "url": "https://your-url.com/appsumo-webhook",
        "success": false,
        "created_at": "2022-04-20T20:59:54.023683Z",
        "updated_at": "2022-04-20T20:59:54.023683Z"
      }]
    }
  }]
}

# GET /licenses/:license_key

Gets the information pertaining to a specific a license

# URL parameters

  • :license_key The user's license key

# Example request

GET https://api.licensing.appsumo.com/v2/licenses/2191a2c1-01a9-4060-8067-1b466484f21b

1

# Example response

{
  "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
  "license_redemption_url":"https://appsumo.com/licensing/a81169a1-eb05-4db8-8d65-2d1a8d5af719/redeem/",
  "license_change_plan_url":"https://appsumo.com/licensing/a81169a1-eb05-4db8-8d65-2d1a8d5af719/change_plan/",
  "plan_id": "1510ad397635386dd1ce401ddddde8886cbaa927efa0f3c66de680cfed5b7480",
  "status": "inactive",
  "tier": 1,
  "created_at": "2022-04-20T20:59:53.796937Z",
  "updated_at": "2022-04-20T20:59:53.796937Z"
}

# GET /licenses/:license_key/events

Gets the license events pertaining to a specific a license. Webhook responses are limited to 10 items. If you need to see more responses, use the license_key in webhook-responses

# URL parameters

  • :license_key The user's license key

# Query parameters

# Example request

GET https://api.licensing.appsumo.com/v2/licenses/2191a2c1-01a9-4060-8067-1b466484f21b/events?limit=1&page=1

1

# Example response

{
  "size": 1,
  "items": [{
    "event_id": 33,
    "event": "purchase",
    "tier": 1,
    "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
    "plan_id": "1510ad397635386dd1ce401ddddde8886cbaa927efa0f3c66de680cfed5b7480",
    "responses": {
      "size": 10,
      "items": [{
        "webhook_id": 5,
        "event": "purchase",
        "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
        "request_header": "",
        "request_body": "{\"license_key\":\"2191a2c1-01a9-4060-8067-1b466484f21b\",\"plan_id\": \"1510ad397635386dd1ce401ddddde8886cbaa927efa0f3c66de680cfed5b7480\",\"event\":\"purchase\",\"license_status\":\"inactive\",\"event_timestamp\":1650488393814}",
        "response_status": 404,
        "response_body": "Not Found",
        "response_time": 208,
        "url": "https://your-url.com/appsumo-webhook",
        "success": false,
        "created_at": "2022-04-20T20:59:54.023683Z",
        "updated_at": "2022-04-20T20:59:54.023683Z"
      }]
    }
  }]
}

# GET /licenses/:license_key/webhook-responses

Gets the webhook responses pertaining to a specific a license

# URL parameters

  • :license_key - The user's license key

# Query parameters

# Example request

GET https://api.licensing.appsumo.com/v2/licenses/2191a2c1-01a9-4060-8067-1b466484f21b/webhook-responses?limit=1&page=1

1

# Example response

{
  "size": 1,
  "items": [{
    "webhook_id": 5,
    "event": "purchase",
    "license_key": "2191a2c1-01a9-4060-8067-1b466484f21b",
    "request_header": "\"content-type\":\"application/json; charset=UTF-8\"",
    "request_body": "{\"license_key\":\"2191a2c1-01a9-4060-8067-1b466484f21b\",\"event\":\"purchase\",\"license_status\":\"inactive\",\"event_timestamp\":1650488393814}",
    "response_status": 404,
    "response_body": "Not Found",
    "response_time": 208,
    "url": "https://your-url.com/appsumo-webhook",
    "success": false,
    "created_at": "2022-04-20T20:59:54.023683Z",
    "updated_at": "2022-04-20T20:59:54.023683Z"
  }]
}

# Status types

  • inactive - Inactive licenses
  • active - Active licenses
  • deactivated - Deactivated licenses

# Pagination

Pagination allows you to greater control on the amount of information received.

  • page - The current page (a group of results)
  • limit - The maximum number of results returned for that page

(Note: page starts a 1 and the limit maximum number is 100)

Example:

https://www.appsumo.com/v2/licenses/571c5f3a-42e1-4b25-b209-a46f905462f6?page=2&limit=100

This (assuming they exist) will return the second 100 results (100 - 199)

# Key terms

# License

This is the license that a user has. Using the license key attched to the license, you can request information about it.

# Events

When an action is performed on a license, a record of the event is saved.

License events:

  • activate - A license is activated
  • deactivate - A licenses is deactivated
  • purchase - A license is purchased

# Webhook reponses

Anytime a license event is performed, a webhook request is made. This request is saved including the response from your application.