Skip to main content
mutation StagedFileUploadCreate($input: StagedFileUploadInput!) {
  stagedFileUploadCreate(input: $input) {
    stagedFileUpload {
      signedUploadUrl
      signedUploadUrlExpiryDate
      file {
        createdAt
        filename
        formattedSize
        id
        mimeType
        size
        staged
        updatedAt
        ... on Document {
          url
        }
        ... on Image {
          url
        }
        ... on Media {
          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",
          "formattedSize": "example-formatted-size",
          "id": "gid://ownright/FileRecord/1",
          "mimeType": "DOCUMENT_DOC",
          "size": 1024,
          "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