---
title: "Create Snippet"
method: POST
path: "/api/sites/multiscreen/{site_name}/snippets"
tags: ["Site Wide Html"]
---

# Create Snippet

`POST /api/sites/multiscreen/{site_name}/snippets`

## Request

- Base URL: `https://api.duda.co`
- URL: `https://api.duda.co/api/sites/multiscreen/{site_name}/snippets`
- Auth: HTTP basic

Creates a snippet: HTML added to every page of a site, at the `location` you choose.

## Path parameters

- `site_name` string, required

## Request body

- SiteWideHtmlRDT
  - `location` 'BODY' | 'HEADER' | 'CONTENT_END' | 'BEFORE_SCRIPTS'
  - `markup` string

## Response `200`

OK

- SiteWideHtmlIDRDT
  - `id` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Payment Required
- `405`: Method Not Allowed
- `429`: Too many requests. The rate limit was exceeded.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/duda/apis/duda-partner-api.md) - [All operations](https://skmtc.dev/duda/apis/duda-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/duda/apis/duda-partner-api/revisions/52be4d41cb12?raw)
