<commit_before>[role="xpack"]
[[start-trial]]
=== Start Trial API

This API starts a 30-day trial license.

[float]
==== Request

`POST _xpack/license/start_trial`

[float]
==== Description

The `start trial` API enables you to upgrade from a basic license to a 30-day
trial license, which gives access to all {xpack} features.

NOTE: You are allowed to initiate a trial license only if your cluster has not
already activated a trial license for the current major X-Pack version. For
example, if you have already activated a trial for v6.0, you cannot start a new
trial until v7.0. You can, however, contact `<EMAIL>` to request an
extended trial license.

To check the status of your trial license, use the following API:
<<get-trial-status>>. 

For more information about the different types of licenses, see
https://www.elastic.co/subscriptions.

==== Authorization

You must have `manage` cluster privileges to use this API.
For more information, see
{xpack-ref}/security-privileges.html[Security Privileges].

[float]
==== Examples

The following example checks whether you are eligible to start a trial:

[source,js]
------------------------------------------------------------
GET _xpack/license/start_trial
------------------------------------------------------------
// CONSOLE
// TEST[skip:license testing issues]

Example response:
[source,js]
------------------------------------------------------------
{
  "eligible_to_start_trial": true
}
------------------------------------------------------------
// NOTCONSOLE

The following example starts a 30-day trial license. The acknowledge
parameter is required as you are initiating a license that will expire.

[source,js]
------------------------------------------------------------
POST _xpack/license/start_trial?acknowledge=true
------------------------------------------------------------
// CONSOLE
// TEST[skip:license testing issues]

Example response:
[source,js]
------------------------------------------------------------
{
  "trial_was_started": true,
  "acknowledged": true<commit_msg>Remove trial status info from start trial doc (#31365)<commit_after>[role="xpack"]
[[start-trial]]
=== Start Trial API

This API starts a 30-day trial license.

[float]
==== Request

`POST _xpack/license/start_trial`

[float]
==== Description

The `start trial` API enables you to upgrade from a basic license to a 30-day
trial license, which gives access to all {xpack} features.

NOTE: You are allowed to initiate a trial license only if your cluster has not
already activated a trial license for the current major X-Pack version. For
example, if you have already activated a trial for v6.0, you cannot start a new
trial until v7.0. You can, however, contact `<EMAIL>` to request an
extended trial license.

To check the status of your trial license, use the following API:
<<get-trial-status>>. 

For more information about the different types of licenses, see
https://www.elastic.co/subscriptions.

==== Authorization

You must have `manage` cluster privileges to use this API.
For more information, see
{xpack-ref}/security-privileges.html[Security Privileges].

[float]
==== Examples

The following example starts a 30-day trial license. The acknowledge
parameter is required as you are initiating a license that will expire.

[source,js]
------------------------------------------------------------
POST _xpack/license/start_trial?acknowledge=true
------------------------------------------------------------
// CONSOLE
// TEST[skip:license testing issues]

Example response:
[source,js]
------------------------------------------------------------
{
  "trial_was_started": true,
  "acknowledged": true
{'fraction_non_alphanumeric': 0.23902970836740256, 'fraction_numerical': 0.00681384573453257, 'mean_word_length': 2.213660245183888, 'pattern_counts': {'":': 5, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1456863', 'n_tokens_mistral': 952, 'n_tokens_neox': 883, 'n_words': 388}