API reference

createVideoUpload

Start an upload of 1 byte to 1 GiB. Accepts video/mp4, video/quicktime, and video/webm; codecs and file contents are not inspected. Required permission: RestaurantRead

graphql
createVideoUpload(
  restaurantId: ID!
  contentType: String!
  fileSize: UnsignedInt!
): VideoUpload

Arguments

Name Type Description
restaurantId ID!
contentType String!
fileSize UnsignedInt!

Returns

VideoUpload

Example

graphql
mutation CreateVideoUpload($restaurantId: ID!, $contentType: String!, $fileSize: UnsignedInt!) {
  createVideoUpload(restaurantId: $restaurantId, contentType: $contentType, fileSize: $fileSize) {
    expiresAt
    fileSize
    partCount
    partSize
    token
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createVideoUpload(...) { __typename } }"}'