Skip to main content
Mutation

mintContactAvatarUpload

Returns a short-lived upload target for a contact's avatar. Upload the image to the target; once it has arrived, the next read of the contact shows it as the avatar. No further call is needed. Requires membership of the space.

Arguments

  • contactIdID!

    ID of the contact.

  • contentTypeString!

    MIME type of the image: image/jpeg, image/png or image/webp.

  • sizeBytesBigInt!

    Size of the file in bytes. Uploads are limited to 10 MB.

  • spaceIdID!

    ID of the space.

Returns

Upload!

Example

mutation MintContactAvatarUpload($contactId: ID!, $contentType: String!, $sizeBytes: BigInt!, $spaceId: ID!) {
  mintContactAvatarUpload(
    contactId: $contactId
    contentType: $contentType
    sizeBytes: $sizeBytes
    spaceId: $spaceId
  ) {
    target {
      expiresAt
      method
      objectKey
      uploadUrl
    }
  }
}