[role="xpack"]
[[put-analytics-collection]]
=== Put Analytics Collection

beta::[]

++++
<titleabbrev>Put Analytics Collection</titleabbrev>
++++

.New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
--

////
[source,console]
----
DELETE _application/analytics/my_analytics_collection
----
// TEARDOWN
////

Creates a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.

[[put-analytics-collection-request]]
==== {api-request-title}

`PUT _application/analytics/<name>`

[[put-analytics-collection-path-params]]
==== {api-path-parms-title}

`<name>`::
(Required, string)

[[put-analytics-collection-prereqs]]
==== {api-prereq-title}

Requires the `manage_behavioral_analytics` cluster privilege.

[[put-analytics-collection-response-codes]]
==== {api-response-codes-title}

`400`::
Analytics Collection `<name>` exists.

[[put-analytics-collection-example]]
==== {api-examples-title}

The following example creates a new Analytics Collection called `my_analytics_collection`:

[source,console]
----
PUT _application/analytics/my_analytics_collection
----
