---
type: api
title: Start a transform
description: When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/operation/operation-transform-start-transform
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/operation/operation-transform-start-transform
products:
  - Elasticsearch Serverless
---

# Start a transform

Availability:

## Paths

- `POST` `/_transform/{transform_id}/_start`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch-serverless/authentication#apikeyauth)

#### Path Parameters

- `transform_id` (string Id)
  Identifier for the transform.

## Description

When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is
set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping
definitions for the destination index from the source indices and the transform aggregations. If fields in the
destination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations),
the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
in a pivot transform.

When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
created the transform, they occur when you start the transform—​with the exception of privilege checks. When
Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
time of creation and uses those same roles. If those roles do not have the required privileges on the source and
destination indices, the transform fails when it attempts unauthorized operations.

## Required authorization

* Index privileges: `read`,`view_index_metadata`
* Cluster privileges: `manage_transform`

## Query String Parameters

- `timeout` (string Duration · default: 30s)
  Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
- `from` (string)
  Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code Examples

#### Console

```console
POST _transform/ecommerce-customer-transform/_start
```

#### JavaScript

```javascript
const response = await client.transform.startTransform({
  transform_id: "ecommerce-customer-transform",
});
```

#### Python

```python
resp = client.transform.start_transform(
    transform_id="ecommerce-customer-transform",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/_transform/ecommerce-customer-transform/_start" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.transform().startTransform(s -> s
    .transformId("ecommerce-customer-transform")
);
```

#### C#

```c#
var response = await client.TransformManagement.StartTransformAsync(transformId: "ecommerce-customer-transform");
```

#### PHP

```php
$resp = $client->transform()->startTransform([
    "transform_id" => "ecommerce-customer-transform",
]);
```

#### Ruby

```ruby
response = client.transform.start_transform(
  transform_id: "ecommerce-customer-transform"
)
```

## Response Examples

#### Start transform response example1

A successful response when a transform starts.

```json
{
  "acknowledged": true
}
```

