# Deactivate a license

```
POST 
https://api.freemius.com/v1/products/{product_id}/licenses/deactivate.json
```

<!-- -->

***

Deactivate a license from an install (No Authorization header is required).

## Request[​](#request "Direct link to request")

### Path Parameters

* **product\_id**
  <!-- -->
  integer\<int64>[](#param-property-licenses-deactivate-param-path-product-id "Direct link to product_id")required

  The ID of the product.

  **Possible values:** `>= 1`

  **Example:<!-- -->&#x20;**`1234`

### Query Parameters

* **fields**
  <!-- -->
  string[](#param-property-licenses-deactivate-param-query-fields "Direct link to fields")

  Comma separated list of fields to return in the response. If not specified, all fields are returned.

  **Example:<!-- -->&#x20;**`id,name,slug`

application/json

### Body**required**

* **uid**string\<uid>[](#schema-property-licenses-deactivate-request-body-uid-string-uid "Direct link to uid")required

  Unique identifier of the caller. The UID must be same when pinging and when activating or deactivating a license. The generation of the UID is a responsibility of the client.

  **Possible values:** `>= 32 characters` and `<= 32 characters`

  **Example:<!-- -->&#x20;**`7W131pej6bJYV8WYM9KgGoBNB9bCiSrY`

  **install\_id**integer[](#schema-property-licenses-deactivate-request-body-install-id-integer "Direct link to install_id")required

  Install ID from which the license should be deactivated. The license must be active on the install.

  **license\_key**string[](#schema-property-licenses-deactivate-request-body-license-key-string "Direct link to license_key")required

  The license key. This is used for activating the license on the user's site.

  **Example:<!-- -->&#x20;**`sk_123FGqM456Pa786WtOp%^+67Y+;sXXz`

## Responses[​](#responses "Direct link to Responses")

* 200
* 400
* 401
* 402
* 404

License deactivated.

application/json

**Schema**

**secret\_key**string[](#schema-property-licenses-deactivate-response-schema-secret-key-string "Direct link to secret_key")

The secret key associated with the entity for authorization.

**Example:<!-- -->&#x20;**`sk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6`

**public\_key**string[](#schema-property-licenses-deactivate-response-schema-public-key-string "Direct link to public_key")

The public key associated with the entity for authorization.

**Example:<!-- -->&#x20;**`pk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6`

**id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-id-string-int64 "Direct link to id")

The unique identifier of the entity.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**created**string\<date-time>[](#schema-property-licenses-deactivate-response-schema-created-string-date-time "Direct link to created")

The date and time the entity was created, under UTC timezone.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**updated**string\<date-time>[](#schema-property-licenses-deactivate-response-schema-updated-string-date-time "Direct link to updated")nullable

The date and time the entity was updated, under UTC timezone. If `null` then the entity was never updated since its creation.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**site\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-site-id-string-int64 "Direct link to site_id")

The ID of the site.

**Example:<!-- -->&#x20;**`1234`

**plugin\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-plugin-id-string-int64 "Direct link to plugin_id")

The ID of the product the entity belongs to.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**user\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-user-id-string-int64 "Direct link to user_id")

The ID of the user the entity belongs to.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**url**string[](#schema-property-licenses-deactivate-response-schema-url-string "Direct link to url")nullable

The site URL.

**Example:<!-- -->&#x20;**`https://example.com`

**title**string[](#schema-property-licenses-deactivate-response-schema-title-string "Direct link to title")nullable

The site title.

**Example:<!-- -->&#x20;**`Catwalk Designs`

**version**string[](#schema-property-licenses-deactivate-response-schema-version-string "Direct link to version")

The Product version.

**Example:<!-- -->&#x20;**`1.0.0`

**plan\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-plan-id-string-int64 "Direct link to plan_id")

The ID of the plan associated with the product that the install has a license activation. If `null` it means the install is using the free plan.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`1234`

**license\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-license-id-string-int64 "Direct link to license_id")nullable

The ID of the license associated with the entity.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**trial\_plan\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-trial-plan-id-string-int64 "Direct link to trial_plan_id")

The ID of the trial license associated to the product. If this is not a trial, this will be `null`.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`1234`

**trial\_ends**string\<date-time>[](#schema-property-licenses-deactivate-response-schema-trial-ends-string-date-time "Direct link to trial_ends")nullable

The product trial license expiry date. If this is not a trial, this will be null.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**subscription\_id**string\<int64>[](#schema-property-licenses-deactivate-response-schema-subscription-id-string-int64 "Direct link to subscription_id")nullable

The ID of the subscription associated with the entity.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**gross**number\<float>[](#schema-property-licenses-deactivate-response-schema-gross-number-float "Direct link to gross")

The gross amount the install has spent on the product. This includes one time purchase, or subscriptions and renewals.

**Example:<!-- -->&#x20;**`100`

**country\_code**string[](#schema-property-licenses-deactivate-response-schema-country-code-string "Direct link to country_code")nullable

The [ISO 3166-1 alpha 2](http://www.wikiwand.com/en/ISO_3166-1_alpha-2) two-letter country code associated with the entity.

**Example:<!-- -->&#x20;**`us`

**language**string[](#schema-property-licenses-deactivate-response-schema-language-string "Direct link to language")nullable

The language specified for the product install.

**Example:<!-- -->&#x20;**`en-GB`

**platform\_version**string[](#schema-property-licenses-deactivate-response-schema-platform-version-string "Direct link to platform_version")nullable

The platform version (e.g WordPress version).

**Example:<!-- -->&#x20;**`1.0.0`

**sdk\_version**string[](#schema-property-licenses-deactivate-response-schema-sdk-version-string "Direct link to sdk_version")nullable

The Freemius SDK version. Only relevant for WordPress products using the Freemius [WP SDK](https://freemius.com/help/documentation/wordpress-sdk/).

**Example:<!-- -->&#x20;**`1.2.2`

**programming\_language\_version**string[](#schema-property-licenses-deactivate-response-schema-programming-language-version-string "Direct link to programming_language_version")nullable

The programming language version (e.g PHP version).

**Example:<!-- -->&#x20;**`5.6`

**is\_active**boolean[](#schema-property-licenses-deactivate-response-schema-is-active-boolean "Direct link to is_active")

If the product is actively installed on the site.

**is\_disconnected**boolean[](#schema-property-licenses-deactivate-response-schema-is-disconnected-boolean "Direct link to is_disconnected")

If the product is disconnected on the site.

**is\_premium**boolean[](#schema-property-licenses-deactivate-response-schema-is-premium-boolean "Direct link to is_premium")

If the install using the premium code. Relevant only for WP Products.

**is\_uninstalled**boolean[](#schema-property-licenses-deactivate-response-schema-is-uninstalled-boolean "Direct link to is_uninstalled")

If the product is uninstalled on the site.

**is\_locked**boolean[](#schema-property-licenses-deactivate-response-schema-is-locked-boolean "Direct link to is_locked")

If the product is locked on the site.

**source**number[](#schema-property-licenses-deactivate-response-schema-source-number "Direct link to source")

The source of the migration data. To get support migrating from other platform please see our [documentation](https://freemius.com/help/documentation/migration/).

* `0` - Freemius
* `1` - Other
* `2` - Easy Digital Downloads (EDD)
* `3` - WooCommerce (WC)
* `4` - Rating Widget
* `5` - Gumroad
* `6` - CodeCanyon
* `7` - ThemeForest
* `8` - AppSumo
* `9` - SendOwl
* `10` - WHMCS
* `11` - Lemon Squeezy

**Possible values:** \[`0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`]

**upgraded**string\<date-time>[](#schema-property-licenses-deactivate-response-schema-upgraded-string-date-time "Direct link to upgraded")nullable

Time when the product was upgraded to the current version. If never upgraded since the initial installation, this will be `null`.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**last\_seen\_at**string\<date-time>[](#schema-property-licenses-deactivate-response-schema-last-seen-at-string-date-time "Direct link to last_seen_at")nullable

The last time the product was used on the site.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**last\_served\_update\_version**string[](#schema-property-licenses-deactivate-response-schema-last-served-update-version-string "Direct link to last_served_update_version")nullable

The last product version update used on the site. If not updated, this will be null.

**Example:<!-- -->&#x20;**`1.2.2`

Bad request. The request could not be understood by the server due to malformed syntax or arguments.

application/json

**Schema**

**path**string[](#schema-property-licenses-deactivate-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-licenses-deactivate-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-licenses-deactivate-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-licenses-deactivate-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-licenses-deactivate-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-licenses-deactivate-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-licenses-deactivate-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

Unauthorized access error. The request requires [authentication](https://freemius.com/help/api/#bearer-token-authentication) but was not provided or the provided authentication does not satisfy the required permissions.

application/json

**Schema**

**path**string[](#schema-property-licenses-deactivate-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-licenses-deactivate-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-licenses-deactivate-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-licenses-deactivate-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-licenses-deactivate-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-licenses-deactivate-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-licenses-deactivate-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

The request is missing the specified argument.

application/json

**Schema**

**path**string[](#schema-property-licenses-deactivate-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-licenses-deactivate-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-licenses-deactivate-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-licenses-deactivate-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-licenses-deactivate-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-licenses-deactivate-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-licenses-deactivate-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

The requested resource was not found.

application/json

**Schema**

**path**string[](#schema-property-licenses-deactivate-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-licenses-deactivate-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-licenses-deactivate-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-licenses-deactivate-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-licenses-deactivate-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-licenses-deactivate-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-licenses-deactivate-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`
