Admin API / Types
CreateLivestreamInput
InputA new livestream with the caller as host.
input CreateLivestreamInputInput fields
| Field | Type | Description |
|---|---|---|
collectionIds | [ID!] | 0 to 100 unique manual livestream collections that hold the new livestream. A missing, deleted, automated or listing collection gives CollectionsNotAssignableError. An ADMINS_ONLY collection gives UnauthorizedError with requiredRole: ADMIN to a caller below the ADMIN role. Either error creates nothing. Omitted, null or empty: no collection. A duplicate ID or more than 100 IDs fails with VALIDATION_ERROR. A value that is not null also needs the client scope admin:collections:write; without it the call fails with error code FORBIDDEN. |
idempotencyKey | String! | A client-generated key, 1 to 200 characters after trim. A repeat with the same key and input within 24 hours returns the first result and creates no second livestream. The same key with another input returns IdempotencyConflictError. |
isMature | Boolean | True: the livestream is mature content. Default false. |
productIds | [ID!] | 0 to 100 unique listing IDs to attach. Each listing must be readable by the caller in this store, of a seller in Viewer.access.actingFor unless the caller has the ADMIN role or higher and the listing is PUBLIC, and not a timed auction. One listing that fails gives LivestreamProductsNotAddableError, and the call creates nothing. Each listing gets a magic code. A listing whose auction ended with no winner gets a new auction that has not started. Omitted, null or empty: no listings. A duplicate ID or more than 100 IDs fails with VALIDATION_ERROR. |
startAt | DateTime | The scheduled start. Omitted or null: now. A time more than 5 minutes before now fails with VALIDATION_ERROR. The storefront stops showing a livestream that has not started 30 minutes after this time. |
thumbnailFileUrl | URL | The public URL of a PUBLIC District files image: File.url with access: PUBLIC in District API. Any last path segment is accepted. The livestream stores its own copy of the 4096-pixel rendition on the marketplace image host, so a later change to the file in District files does not change the thumbnail. Not with thumbnailId: VALIDATION_ERROR. When District files does not answer the check or the copy fails, the mutation fails with error code MEDIA_FILE_CHECK_FAILED and writes nothing; send the same request again. |
thumbnailId | ID | An image that the caller owns. With no thumbnailId and no thumbnailFileUrl, the livestream uses the default livestream thumbnail of the caller's account; with no default, the call gives LivestreamThumbnailRequiredError. |
title | String! | Trimmed. 1 to 255 characters; another length fails with VALIDATION_ERROR. |
visibility | LivestreamVisibility | How the storefront lists the livestream. Omitted or null: PUBLIC. |