---
title: Export a tracking plan as CSV
description: "Streams a CSV export of the project tracking plan, in the same format as the Events and User Properties downloads in Data. Exports the default branch unless…"
product: general
lang: en
last_updated: 2026-11-18
token_estimate: 1509
---
# Export a tracking plan as CSV

## Export a tracking plan as CSV

**GET** `/v1/projects/{project_id}/tracking-plan/export`

Full URL: `https://developer-api.amplitude.com/v1/projects/{project_id}/tracking-plan/export`

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

**Servers:**
- Production (US): `https://developer-api.amplitude.com/v1/projects/{project_id}/tracking-plan/export`
- Production (EU): `https://developer-api.eu.amplitude.com/v1/projects/{project_id}/tracking-plan/export`

Export a tracking plan as CSV

Streams a CSV export of the project tracking plan, in the same format as
the Events and User Properties downloads in Data. Exports the default
branch unless `branch_id` or `branch_name` selects another one, and
includes that branch's unpublished changes.

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| Authorization | string | Yes | — | http |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| project_id (path) | string | Yes | 12345 | Amplitude project identifier, backed by the canonical app ID. Constraints: pattern: ^[0-9]+$ |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| type (query) | string | No | events | Export format. Defaults to `events`. Allowed values: events, user_properties |
| branch_id (query) | string | No | — | Optional branch identifier. Mutually exclusive with `branch_name`. Constraints: min length: 1 |
| branch_name (query) | string | No | — | Optional branch name. Mutually exclusive with `branch_id`. Constraints: min length: 1 |
| include_deleted (query) | boolean | No | false | Include deleted events or properties in the export. |
| lookback_days (query) | integer | No | 30 | Lookback window in days for the volume and query columns of the `events` export. Defaults to 30. Ignored for `user_properties`. Constraints: min: 1, max: 365 |

## Response (application/json)

**200** — CSV response body.

**400**

**401**

**403**

**404**

**429**

**500**

**502**

**503**

**504** — The export did not start in time.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| type | string | Yes | — | Constraints: format: uri |
| title | string | Yes | — | — |
| status | integer | Yes | — | Constraints: min: 400, max: 599 |
| detail | string | No | — | Constraints: nullable |
| details | object | No | — | Constraints: nullable |
| instance | string | No | — | Constraints: format: uri, nullable |
| error_code | string | Yes | — | — |
| retryable | boolean | Yes | — | — |
| retry_after_seconds | integer | No | — | Constraints: nullable, min: 0 |
| validation_errors | object[] | No | — | Constraints: nullable |

```json
{
  "type": "https://example.com",
  "title": "The export did not start in time.",
  "status": 504,
  "detail": "string",
  "details": {},
  "instance": "https://example.com",
  "error_code": "string",
  "retryable": true,
  "retry_after_seconds": 0,
  "validation_errors": [
    {
      "field": "string",
      "message": "string",
      "code": "string"
    }
  ]
}
```

## Code samples

### cURL

```bash
curl -X GET "https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30" \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30",
    headers={
        "Content-Type": "application/json",
        "Authorization": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "Authorization: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("GET", "https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30"))
      .method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("Authorization", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://developer-api.amplitude.com/v1/projects/12345/tracking-plan/export?type=events&include_deleted=false&lookback_days=30")
request = Net::HTTP::Get.new(uri)
request["Content-Type"] = "application/json"
request["Authorization"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

