Retrieve a License Key

GET

/v1/license-keys/:id

Retrieves the license key with the given ID.


curl "https://api.lemonsqueezy.com/v1/license-keys/1" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a License Key object.

{
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://api.lemonsqueezy.com/v1/license-keys/1"
  },
  "data": {
    "type": "license-keys",
    "id": "1",
    "attributes": {
      "store_id": 1,
      "customer_id": 1,
      "order_id": 1,
      "order_item_id": 1,
      "product_id": 1,
      "user_name": "John Doe",
      "user_email": "[email protected]",
      "key": "80e15db5-c796-436b-850c-8f9c98a48abe",
      "key_short": "XXXX-8f9c98a48abe",
      "activation_limit": 5,
      "instances_count": 0,
      "disabled": 0,
      "status": "inactive",
      "status_formatted": "Inactive",
      "expires_at": null,
      "created_at": "2021-05-24T14:15:07.000000Z",
      "updated_at": "2021-05-24T14:15:07.000000Z"
    },
    "relationships": {
      "store": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/store",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/store"
        }
      },
      "customer": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/customer",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/customer"
        }
      },
      "order": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/order",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/order"
        }
      },
      "order-item": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/order-item",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/order-item"
        }
      },
      "product": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/product",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/product"
        }
      },
      "license-key-instances": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/license-keys/1/license-key-instances",
          "self": "https://api.lemonsqueezy.com/v1/license-keys/1/relationships/license-key-instances"
        }
      }
    },
    "links": {
      "self": "https://api.lemonsqueezy.com/v1/license-keys/1"
    }
  }
}

Was this page helpful?