Upload videos via direct upload URLs

Creates a direct upload that allows video uploads without an API key.

/accounts/{account_identifier}/stream/direct_upload

post

Stream Videos

stream-videos-upload-videos-via-direct-upload-ur-ls

Debug "planAvailability"

null

Debug "tokenPermissions"

null

Debug "parameters"

[
  {
    "in": "path",
    "name": "account_identifier",
    "required": true,
    "schema": {
      "description": "The account identifier tag.",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "type": "string"
    }
  },
  {
    "in": "header",
    "name": "Upload-Creator",
    "schema": {
      "description": "A user-defined identifier for the media creator.",
      "example": "creator-id_abcde12345",
      "maxLength": 64,
      "type": "string"
    }
  }
]

Debug "requestBody"

{
  "content": {
    "application/json": {
      "schema": {
        "properties": {
          "allowedOrigins": {
            "description": "Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin.",
            "example": [
              "example.com"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "creator": {
            "description": "A user-defined identifier for the media creator.",
            "example": "creator-id_abcde12345",
            "maxLength": 64,
            "type": "string"
          },
          "expiry": {
            "default": "Now + 30 minutes",
            "description": "The date and time after upload when videos will not be accepted.",
            "example": "2021-01-02T02:20:00Z",
            "format": "date-time",
            "type": "string"
          },
          "maxDurationSeconds": {
            "description": "The maximum duration in seconds for a video upload. Can be set for a video that is not yet uploaded to limit its duration. Uploads that exceed the specified duration will fail during processing. A value of `-1` means the value is unknown.",
            "maximum": 21600,
            "minimum": 1,
            "type": "integer"
          },
          "meta": {
            "description": "A user modifiable key-value store used to reference other systems of record for managing videos.",
            "example": {
              "name": "video12345.mp4"
            },
            "type": "object"
          },
          "requireSignedURLs": {
            "default": false,
            "description": "Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",
            "example": true,
            "type": "boolean"
          },
          "scheduledDeletion": {
            "description": "Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time.",
            "example": "2014-01-02T02:20:00Z",
            "format": "date-time",
            "type": "string"
          },
          "thumbnailTimestampPct": {
            "default": 0,
            "description": "The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video.  If this value is not set, the default thumbnail image is taken from 0s of the video.",
            "example": 0.529241,
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "watermark": {
            "properties": {
              "uid": {
                "description": "The unique identifier for the watermark profile.",
                "example": "ea95132c15732412d22c1476fa83f27a",
                "maxLength": 32,
                "type": "string"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "maxDurationSeconds"
        ],
        "type": "object"
      }
    }
  },
  "required": true
}

Debug "responses"

{
  "200": {
    "content": {
      "application/json": {
        "schema": {
          "allOf": [
            {
              "allOf": [
                {
                  "properties": {
                    "errors": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "messages": {
                      "example": [],
                      "items": {
                        "properties": {
                          "code": {
                            "minimum": 1000,
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "type": "object",
                        "uniqueItems": true
                      },
                      "type": "array"
                    },
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "items": {},
                          "type": "array"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "success": {
                      "description": "Whether the API call was successful",
                      "enum": [
                        true
                      ],
                      "example": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "errors",
                    "messages",
                    "result"
                  ],
                  "type": "object"
                },
                {
                  "properties": {
                    "result": {
                      "anyOf": [
                        {
                          "type": "object"
                        },
                        {
                          "type": "string"
                        }
                      ]
                    }
                  }
                }
              ],
              "type": "object"
            },
            {
              "properties": {
                "result": {
                  "properties": {
                    "scheduledDeletion": {
                      "description": "Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time.",
                      "example": "2014-01-02T02:20:00Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "uid": {
                      "description": "A Cloudflare-generated unique identifier for a media item.",
                      "example": "ea95132c15732412d22c1476fa83f27a",
                      "maxLength": 32,
                      "type": "string"
                    },
                    "uploadURL": {
                      "description": "The URL an unauthenticated upload can use for a single `HTTP POST multipart/form-data` request.",
                      "example": "www.example.com/samplepath",
                      "type": "string"
                    },
                    "watermark": {
                      "properties": {
                        "created": {
                          "description": "The date and a time a watermark profile was created.",
                          "example": "2014-01-02T02:20:00Z",
                          "format": "date-time",
                          "type": "string"
                        },
                        "downloadedFrom": {
                          "description": "The source URL for a downloaded image. If the watermark profile was created via direct upload, this field is null.",
                          "example": "https://company.com/logo.png",
                          "type": "string"
                        },
                        "height": {
                          "description": "The height of the image in pixels.",
                          "type": "integer"
                        },
                        "name": {
                          "default": "",
                          "description": "A short description of the watermark profile.",
                          "example": "Marketing Videos",
                          "type": "string"
                        },
                        "opacity": {
                          "default": 1,
                          "description": "The translucency of the image. A value of `0.0` makes the image completely transparent, and `1.0` makes the image completely opaque. Note that if the image is already semi-transparent, setting this to `1.0` will not make the image completely opaque.",
                          "example": 0.75,
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "padding": {
                          "default": 0.05,
                          "description": "The whitespace between the adjacent edges (determined by position) of the video and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded video width or length, as determined by the algorithm.",
                          "example": 0.1,
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "position": {
                          "default": "upperRight",
                          "description": "The location of the image. Valid positions are: `upperRight`, `upperLeft`, `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the `padding` parameter.",
                          "example": "center",
                          "type": "string"
                        },
                        "scale": {
                          "default": 0.15,
                          "description": "The size of the image relative to the overall size of the video. This parameter will adapt to horizontal and vertical videos automatically. `0.0` indicates no scaling (use the size of the image as-is), and `1.0 `fills the entire video.",
                          "example": 0.1,
                          "maximum": 1,
                          "minimum": 0,
                          "type": "number"
                        },
                        "size": {
                          "description": "The size of the image in bytes.",
                          "example": 29472,
                          "type": "number"
                        },
                        "uid": {
                          "description": "The unique identifier for a watermark profile.",
                          "example": "ea95132c15732412d22c1476fa83f27a",
                          "maxLength": 32,
                          "type": "string"
                        },
                        "width": {
                          "description": "The width of the image in pixels.",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            }
          ]
        }
      }
    },
    "description": "Upload videos via direct upload URLs response"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": [
                {
                  "code": 7003,
                  "message": "No route for the URI"
                }
              ],
              "minLength": 1
            },
            "messages": {
              "allOf": [
                {
                  "example": [],
                  "items": {
                    "properties": {
                      "code": {
                        "minimum": 1000,
                        "type": "integer"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message"
                    ],
                    "type": "object",
                    "uniqueItems": true
                  },
                  "type": "array"
                }
              ],
              "example": []
            },
            "result": {
              "enum": [
                null
              ],
              "nullable": true,
              "type": "object"
            },
            "success": {
              "description": "Whether the API call was successful",
              "enum": [
                false
              ],
              "example": false,
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "errors",
            "messages",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Upload videos via direct upload URLs response failure"
  }
}

Debug "security"

[
  {
    "api_email": [],
    "api_key": []
  }
]