# Package a new app version

> Source: https://elaichi.ai/docs/api-reference/apps/bundle/createbundleversion/

`POST /bundle/{id}/version`

Resource: **App** · API: **Apps**

## Path parameters

- **`id`** _(string, required)_
  Resource id

## Request body

- **`items_revision`** _(integer)_
- **`draft_revision`** _(integer)_
  Optional: `draft_revision` from the preview.
- **`content_hash`** _(string)_
  Optional: `content_hash` from the preview.
- **`notes`** _(string)_
- **`accept_rows`** _(array<string>)_
  Collection keys whose rows may be copied into the version.

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/bundle/<id>/version' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"items_revision":0,"draft_revision":0,"content_hash":"your_content_hash","notes":"your_notes","accept_rows":[]}'
```

### JavaScript

```javascript
const body = {
  "items_revision": 0,
  "draft_revision": 0,
  "content_hash": "your_content_hash",
  "notes": "your_notes",
  "accept_rows": []
};

const response = await fetch('https://api.elaichi.ai/bundle/<id>/version', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/bundle/<id>/version"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "items_revision": 0,
    "draft_revision": 0,
    "content_hash": "your_content_hash",
    "notes": "your_notes",
    "accept_rows": []
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
