# Create upload Create upload based on input data Endpoint: POST /api/v1/uploads Version: 1.0 Security: header ## Request fields (application/json): - `extension` (string, required) - `isGzipped` (boolean) - `meta` (object,null) User meta attached to upload. Can contain information like name etc. Example: {"name":"value"} - `meta.blurhash` (string,null) - `meta.name` (string,null) Example: "value" - `meta.altText` (string,null) - `tags` (array, required) Tags attached to the upload Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event" - `privacy` (string,null) Privacy of the upload. Possible values: PUBLIC, PRIVATE, DIRECT. Enum: "Public", "Private", "Direct" - `allowedUsers` (array,null) Can contain a list of users who are allowed to access the upload. Works only for uploads with privacy set to DIRECT. ## Response 200 fields (application/json): - `uri` (string, required) - `upload` (object, required) Uploaded file - `upload.uploadId` (string, required) Internal id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `upload.userId` (string, required) User id this upload belongs to Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `upload.uploadType` (string, required) Type of the upload Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `upload.meta` (object, required) Meta data - `upload.meta.blurhash` (string,null) - `upload.meta.name` (string,null) - `upload.meta.altText` (string,null) - `upload.size` (integer, required) Size in bytes of all the files in this upload - `upload.files` (array, required) List of all the files this upload has - `upload.files.uri` (string,null, required) Full url of the file - `upload.files.fileId` (string, required) File id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `upload.files.extension` (string, required) File extension Example: "mp4" - `upload.files.original` (boolean, required) true if this file is original, false if it is a derivative - `upload.files.meta` (object, required) File metadata. Contains optional values for width, height etc. - `upload.files.meta.duration` (number,null) Video duration in seconds - `upload.files.meta.width` (integer,null) Media width - `upload.files.meta.height` (integer,null) Media height - `upload.files.meta.codec` (string,null) Video codec - `upload.files.meta.rotate` (integer,null) Rotation in degrees - `upload.files.size` (integer, required) File size in bytes - `upload.files.createdAt` (string, required) Example: "2022-03-10T16:15:50Z" - `upload.files.updatedAt` (string, required) Example: "2022-03-10T16:15:50Z" - `upload.files.type` (string, required) File type Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `upload.tags` (array, required) List of tags attached to upload Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event" - `upload.error` (string,null) Upload processing error - `upload.cached` (boolean) true if cached - `upload.logs` (string,null) Logs - `upload.remote` (boolean) true if this upload is remote ## Response 401 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 403 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 400 fields