> For the complete documentation index, see [llms.txt](https://docs.pptxbuilder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pptxbuilder.com/examples/append-slide.md).

# Append slide

This page describes an example usage of the append\_slide endpoint.

## JSON Example

```javascript
{
	"slide": {
		"id": null,
		"base_text": "Weighted Base (All Answering):ALL",
		"table_text": "Q1",
		"index": 0,
		"layout": {
			"pptx_template": "Default",
			"slide_layout_index": 5,
			"slide_master_index": 0
		},
		"question_text": "Q1. Which of these have you done in the last week?"
	},
	"charts": [{
		"rows": [{
			"text": "Read a printed newspaper",
			"visible": true
		}, {
			"text": "Visited a newspaper website",
			"visible": true
		}, {
			"text": "Read a printed magazine",
			"visible": true
		}],
		"columns": [{
			"text": "Total",
			"selected": true,
			"items": [{
				"base": 1949,
				"data": [43, 41, 25],
				"text": "Total",
				"selected": true
			}]
		}, {
			"text": "Gender",
			"selected": true,
			"items": [{
				"base": 175,
				"data": [44, 44, 24],
				"text": "Male",
				"selected": true
			}, {
				"base": 434,
				"data": [42, 39, 27],
				"text": "Female",
				"selected": true
			}]
		}],
        "view_settings": {
            "chart_type": "bar",
            "placeholder_index": 0
        }
	}]
}
```

{% hint style="info" %}
This is a minimal example of a `json` data request.
{% endhint %}

**Python example using requests library**

{% code title="append\_slide.py" %}

```python
import requests

url = "https://api.pptxbuilder.com/api/v2/append-slide?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyFERder34DM4OTcyMzksImRhdGFfaWQiOjg5LCJhcGlfdmVyc2lvbiI6Mn0.2XGoQSYkYepCeypTfP323UDlxyR_3LCSzovoLYd5_co"

payload = YOUR_SLIDE_JSON_PAYLOAD
headers = {
  'Authorization': YOUR_TOKEN,
  'Content-Type': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

```

{% endcode %}
