Skip to main content
mutation StagedFileUploadCreate($input: StagedFileUploadInput!) {
  stagedFileUploadCreate(input: $input) {
    stagedFileUpload {
      signedUploadUrl
      signedUploadUrlExpiryDate
      file {
        createdAt
        filename
        id
        mimeType
        staged
        updatedAt
        ... on Document {
          url
        }
        ... on Image {
          url
        }
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}
{
  "data": {
    "stagedFileUploadCreate": {
      "stagedFileUpload": {
        "signedUploadUrl": "https://example.com",
        "signedUploadUrlExpiryDate": "2025-01-15T10:30:00Z",
        "file": {
          "createdAt": "2025-01-15T10:30:00Z",
          "filename": "document.pdf",
          "id": "gid://ownright/Object/1",
          "mimeType": "AUDIO_M4A",
          "staged": true,
          "updatedAt": "2025-01-15T10:30:00Z",
          "url": "https://example.com"
        }
      },
      "userErrors": []
    }
  }
}

Mutation field

stagedFileUploadCreate

Arguments

input
StagedFileUploadInput!
required
Input required to make a staged file upload.

Return fields

stagedFileUpload
StagedFileUpload
The newly created staged file upload.
userErrors
[StagedFileUploadCreateUserError!]!
required
List of errors that occurred while executing the mutation.

Types

enum FileMimeType {
  AUDIO_M4A # Represents the `audio/x-m4a` MIME type.
  AUDIO_MPEG # Represents the `audio/mpeg` MIME type.
  AUDIO_WAV # Represents the `audio/wav` MIME type.
  CSS # Represents the `text/css` MIME type.
  CSV # Represents the `text/csv` MIME type.
  DOCUMENT_DOC # Represents the `application/msword` MIME type.
  DOCUMENT_DOCX # Represents the `application/vnd.openxmlformats-officedocument.wordprocessingml.documents` MIME type.
  DOCUMENT_ODP # Represents the `application/vnd.oasis.opendocument.presentation` MIME type.
  DOCUMENT_ODS # Represents the `application/vnd.oasis.opendocument.spreadsheet` MIME type.
  DOCUMENT_ODT # Represents the `application/vnd.oasis.opendocument.text` MIME type.
  DOCUMENT_OFFICE_PPT # Represents the `application/vnd.ms-powerpoint` MIME type.
  DOCUMENT_OFFICE_XLS # Represents the `application/vnd.ms-excel` MIME type.
  DOCUMENT_PDF # Represents the `application/pdf` MIME type.
  DOCUMENT_PPTX # Represents the `application/vnd.openxmlformats-officedocument.presentationml.presentation` MIME type.
  DOCUMENT_RTF # Represents the `application/rtf` MIME type.
  DOCUMENT_XLSX # Represents the `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` MIME type.
  FONT_TTF # Represents the `application/x-font-ttf` MIME type.
  GZIP # Represents the `application/gzip` MIME type.
  HTML # Represents the `text/html` MIME type.
  IMAGE_BMP # Represents the `image/bmp` MIME type.
  IMAGE_GIF # Represents the `image/gif` MIME type.
  IMAGE_HEIC # Represents the `image/heic` MIME type.
  IMAGE_HEIF # Represents the `image/heif` MIME type.
  IMAGE_JPEG # Represents the `image/jpeg` MIME type.
  IMAGE_PNG # Represents the `image/png` MIME type.
  IMAGE_SVG # Represents the `image/svg+xml` MIME type.
  IMAGE_TIFF # Represents the `image/tiff` MIME type.
  IMAGE_WEBP # Represents the `image/webp` MIME type.
  JSON # Represents the `application/json` MIME type.
  MARKDOWN # Represents the `text/markdown` MIME type.
  TEXT_PLAIN # Represents the `text/plain` MIME type.
  VIDEO_AVI # Represents the `video/x-msvideo` MIME type.
  VIDEO_MOV # Represents the `video/quicktime` MIME type.
  VIDEO_MP4 # Represents the `video/mp4` MIME type.
  ZIP # Represents the `application/zip` MIME type.
}

enum StagedFileUploadCreateUserErrorCode {
  INVALID_FILENAME # The supplied filename is invalid.
}

scalar GID # A global identifier for an object in the format of 'gid://ownright/ObjectType/ID'.
scalar ISO8601DateTime # An ISO 8601-encoded datetime
scalar Url # A valid URL, transported as a string.