---
updatedAt: 2026-06-04T18:48:18.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Create Allowed Domain

Creates an allowed domain for the account.

## Requires api token with one of the following permissions
```
Read, update & delete anything
```

Tokens with the "Act with a team member's permissions" permission
(`all:delegate_to_contact_permissions` scope) can also be used. Requests
made with such a token are authorized using the permissions of the
contact assigned to the token.

An [expiring access token](https://docs.wistia.com/reference/post_expiring-token)
created with the `all:delegate_to_contact_permissions` scope and an
`account` authorization granting the `manage-allowed-domains` permission can
also be used.


# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Data API",
    "description": "Wistia Data API",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.wistia.com/modern"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Allowed Domains"
    }
  ],
  "paths": {
    "/allowed_domains": {
      "post": {
        "summary": "Create Allowed Domain",
        "x-speakeasy-group": "allowedDomains",
        "x-speakeasy-name-override": "create",
        "description": "Creates an allowed domain for the account.\n\n## Requires api token with one of the following permissions\n```\nRead, update & delete anything\n```\n\nTokens with the \"Act with a team member's permissions\" permission\n(`all:delegate_to_contact_permissions` scope) can also be used. Requests\nmade with such a token are authorized using the permissions of the\ncontact assigned to the token.\n\nAn [expiring access token](https://docs.wistia.com/reference/post_expiring-token)\ncreated with the `all:delegate_to_contact_permissions` scope and an\n`account` authorization granting the `manage-allowed-domains` permission can\nalso be used.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "unevaluatedProperties": false,
                "type": "object",
                "properties": {
                  "domain": {
                    "description": "The domain name to add (www will be automatically stripped)",
                    "type": "string",
                    "examples": [
                      "example.com"
                    ]
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Allowed domain created successfully (or already exists)",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "description": "An allowed domain represents a domain where a Wistia video can be embedded. Account\nrestrictions need to be enabled for an allowed domain to have an effect. See\nour [Domain Restrictions](https://support.wistia.com/en/articles/9691672-domain-restrictions)\nguide for more details.\n",
                  "properties": {
                    "domain": {
                      "description": "The allowed domain name.",
                      "type": "string",
                      "examples": [
                        "example.com"
                      ]
                    },
                    "created_at": {
                      "description": "The date that the allowed domain was originally created.",
                      "type": "string",
                      "format": "date-time",
                      "examples": [
                        "2010-08-13T18:47:39+00:00"
                      ]
                    },
                    "cursor": {
                      "description": "A cursor for stable pagination based on current `sort_by` order. You can pass this to `cursor[before]` or `cursor[after]` as a parameter to fetch the records before or after this record in the same sort order. This is only populated if records were fetched with `cursor[enabled]`, or `cursor[before]` or `cursor[after]`.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "domain",
                    "created_at"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request - missing or invalid domain",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "The domain's format doesn't look correct. It should be formatted like \"mydomain.com\""
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "A machine-readable identifier for the specific authorization failure.",
                      "type": "string",
                      "enum": [
                        "unauthorized_credentials",
                        "account_inactive",
                        "unauthorized_scope",
                        "unauthorized_params"
                      ]
                    },
                    "error": {
                      "type": "string",
                      "examples": [
                        "Invalid credentials."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, token is valid but account does not have access to feature",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Webinars are not available on your current plan"
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Internal server error"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Allowed Domains"
        ],
        "parameters": [
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.allowedDomains.create({\n    domain: \"example.com\",\n  });\n\n  console.log(result);\n}\n\nrun();"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "javascript",
      "shell",
      "node",
      "python",
      "ruby"
    ]
  }
}
````