> For the complete documentation index, see [llms.txt](https://developers.flipsnack.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.flipsnack.com/api-reference/api-method-collection.create.md).

# collection.create

Uploads a single PDF document and creates a flipbook with a single item (flipbook).

**Note:** Requests must be made to **<https://upload.flipsnack.com/v1>**.

Once the upload has finished, the flipbook is created and the PDF document starts the conversion process. Converting a PDF document into a flipbook might take up to several minutes, depending on the size of the document.

The API method will return a response as soon as the document is finished uploading. You can check the status of the flipbook item using the [`collection.getCollection`](/api-reference/api-method-collection.getcollection.md) method. It will let you know if the document is still converting, has finished conversion, or if the conversion process has failed.

Once the API call is successful, even if the document fails to convert, the request is counted in the monthly upload counts. If the request fails, the request is not taken into consideration for the monthly upload counts.

You can now customize the player (logo, background image, background audio, appearance, navigation, sharing, interaction, and tracking) in the same `collection.create` call. When uploading any customization file (`logoImage`, `backgroundImage`, or `backgroundAudio`), send the request as **POST** with **`multipart/form-data`**.

If you use `fileUrl` without a local `file` upload, customize asset files cannot be attached in the same request unless you also send multipart file fields. In that case, create the flipbook first and upload customize assets later with `collection.update`.

## Request parameters

<table data-header-hidden><thead><tr><th width="225.55598958333331">Name</th><th width="128.20703125">Type</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Type</td><td>Description</td></tr><tr><td>apiKey (required)</td><td>string</td><td>The API key provided for your user. If it is not specified, the request will return the error code "30 - Missing mandatory parameter". If the key is incorrect the request returns the error code "41 - Invalid credentials".</td></tr><tr><td>signature (required)</td><td>string</td><td>The signature must be calculated by you and added to the request. See <a href="/how-to-sign-a-request.md">How to sign a request</a> for more information.If the parameter is missing the request will return the error code "30 - Missing mandatory parameter". If the signature is incorrect the request will return the error code "44 - Invalid signature".</td></tr><tr><td>action (required)</td><td>string</td><td>The API method that should be called. In this case the value should be <em>collection.create</em>. If it is not specified, the request will return the error code "30 - Missing mandatory parameter".</td></tr><tr><td>file (required)</td><td>file</td><td><p>The PDF document that should be uploaded.<br><br>Documents can be uploaded either using a local file, through the <strong>file</strong> parameter, or from an external URL, using the <strong>fileUrl</strong> parameter. You must specify at least one of them. If both parameters are specified, the API will take into consideration only the <strong>file</strong> parameter.<br><br>If neither file or fileUrl are specified the request will return the error code "30 - Missing mandatory parameter".</p><p>Also, file uploads are bound to <a href="/api-limitations.md">API limitations</a>.</p></td></tr><tr><td>fileUrl (required)</td><td>string</td><td><p>The URL of a PDF document.<br><br>Documents can be uploaded either using a local file, through the <strong>file</strong> parameter, or from an external URL, using the <strong>fileUrl</strong> parameter. You must specify at least one of them. If both parameters are specified, the API will take into consideration only the <strong>file</strong> parameter.<br><br>If neither file or fileUrl are specified the request will return the error code "30 - Missing mandatory parameter".</p><p>Also, file uploads are bound to <a href="/api-limitations.md">API limitations</a>.</p></td></tr><tr><td>title</td><td>string</td><td>The title of the collection. This title will appear on the collection's direct link and in the My Collections page. By default, if a title is not given, Flipsnack will try to extract the title from the uploaded document.</td></tr><tr><td>description</td><td>string</td><td>The description of the collection. By default, during the conversion process, Flipsnack extracts the first few words from the document. You can overwrite that description with yours, using this parameter.</td></tr><tr><td>collectionWidth</td><td>number</td><td>The embed width of the player (measured in pixels).<br><br>Default: <em>650</em>.</td></tr><tr><td>collectionHeight</td><td>number</td><td>The embed height of the player (measured in pixels).<br><br>Default: <em>385</em>.</td></tr><tr><td>collectionStatus</td><td>string</td><td><p>The type of collection. Possible values are <em>public</em>, <em>editable, unlisted</em> and <em>private</em>.<br><br>Public collections are listed on your public profile and in search results.They are publicly available to other users.<br><br>Editable collections are not published. They must be published manually from the Flipsnack editor or have their status updated using the <a href="/api-reference/api-method-collection.update.md"><code>collection.update</code></a> method.<br><br>Unlisted collections are published but not listed on your profile page and in search results. Other users may view them only if they receive a direct link or an embedded player from you.</p><p>Published with restricted access. Configure access with <a href="/api-reference/collection.setpermissions.md"><code>collection.setPermissions</code></a>.<br><br>Default: <em>public</em>.</p></td></tr><tr><td>showControls</td><td>boolean</td><td>If set to <em>true</em>, then the navigation controls will be displayed in normal mode<br><br>Default: <em>false</em>.</td></tr><tr><td>enableDownload</td><td>boolean</td><td>If set to <em>true</em>, displays the download button in the player menu. The menu is displayed only when the player is in fullscreen.<br><br>Default: <em>true</em>.</td></tr><tr><td>enablePrint</td><td>boolean</td><td>If set to <em>true</em>, displays the print button in the player menu. The menu is displayed when the player is in fullscreen.<br><br>Default: <em>true</em>.</td></tr><tr><td>enableFullScreen</td><td>boolean</td><td>If set to <em>true</em>, allows the player to enter fullscreen mode.<br><br>Default: <em>true</em>.</td></tr><tr><td>enableSearch</td><td>boolean</td><td>If set to <em>true</em>, displays the search button in the player menu. The menu is displayed only when the player is in fullscreen.<br><br>If there is no text to search within the current collection, the search button is displayed, but disabled.<br><br>Default: <em>true</em>.</td></tr><tr><td>tooltipsLanguage</td><td>string</td><td>Selects the language for the tooltips displayed in the player. Possible languages are: Basque, Bosanski, Català, Czech, Dansk, Deutsch, English, Español, כשר, Française, ελληνικά, Hrvatski, Indonesian, Italiano, Magyar, Nederlands, Nederlands, Norsk, Polski, Português, Português do Brasil, Română, Pусский, Cрпски, Slovene, Suomi, Slovak, Swedish, Turkish.<br><br>Default: English.</td></tr><tr><td>background</td><td>string</td><td>The background color of the player. Possible values are <em>color, transparent</em> and <em>image</em>. If set to <em>transparent</em>, the player is displayed with no background. Background color value can be set using the <strong>color</strong> parameter, explained below. When using the <em>image</em> option, upload the image with the <code>backgroundImage</code> option as <code>multipart/form-data</code>.<br><br>Default: <em>color</em>.</td></tr><tr><td>color</td><td>string</td><td><p>The background color of the player, specified as a hexadecimal value or CSS gradient. Accepted values are <code>444444</code>, <code>#ff0000</code> and <code>linear-gradient(...)</code>/<code>radial-gradient(...)</code> expressions.</p><p>If the <strong>background</strong> is set to <em>transparent</em>, the player will ignore the <strong>color</strong> parameter.<br><br>Default: <em>444444</em>.</p></td></tr><tr><td>autoFlip</td><td>boolean</td><td>If set to <em>true</em>, allows the player to automatically turn the pages of the flipbook. The pages turn after a time specified by the <strong>autoFlipDelay</strong> parameter.<br><br>Default <em>false</em>.</td></tr><tr><td>autoFlipDelay</td><td>number</td><td>Specifies the time in seconds for pages to turn automatically. If <strong>autoFlip</strong> is <em>false</em>, this parameter is ignored.<br><br>Default: <em>6</em>.</td></tr><tr><td>rightToLeftOrientation</td><td>boolean</td><td>If set to <em>true</em>, allows the flipbook to be viewed from right to left:the first page is starts from the end, as viewed in normal mode. This option is useful for documents written in right to left languages.<br><br>Default: <em>false</em>.</td></tr><tr><td>singlePageView</td><td>boolean</td><td>If set to <em>true</em>, allows the flipbook to be viewed a single page at a time.<br><br>Default: <em>false</em>.</td></tr><tr><td>logoUrl</td><td>string</td><td>URL opened when the viewer clicks the logo. Upload the logo image using the <code>logoImage</code> parameter.</td></tr><tr><td>folder</td><td>string</td><td><p>The folder path where the collection will be added in your account.</p><ul><li>A folder name must contain only english letters, digits and spaces. Also a folder name must start and end with a letter or a digit, not a space.</li><li>The folder name is case insensitive. "My Folder" will be the same with "my folder".</li><li>If the parameter is not specified or empty string is provided the collection will be displayed on main folder (root).</li><li>The path must not include first or last slash character (/).</li><li>Eg: <em>folder1</em></li></ul><p>You can specify a folder structure up to 3 levels.</p><ul><li>If a deeper folder is specified, it will be ignored.</li><li>in a structure, folder names must be separated with a slash character (/).</li><li>Eg: <em>folder1/folder2/folder3</em></li></ul><p>If the folder already exists in your account the collection will be added in that folder, otherwise the folder structure will be created and, after that, the collection will be added in that folder.</p></td></tr><tr><td>logoImage</td><td>file</td><td>Logo image uploaded as <code>multipart/form-data</code>. Replaces a separate <code>collection.setLogo</code> call during create.</td></tr><tr><td>logoLink</td><td>string</td><td>Alias for <code>logoUrl</code> (click-through URL).</td></tr><tr><td>backgroundImage</td><td>file</td><td>Background image uploaded as <code>multipart/form-data</code>. Use with <code>background=image</code>.</td></tr><tr><td>backgroundScaleType</td><td>string</td><td>Background image scaling when using an image background. Values: <code>scaleCrop</code>, <code>center</code>, <code>tile</code>. Default when uploading: <code>scaleCrop</code>.</td></tr><tr><td>backgroundAudio</td><td>file</td><td>Background audio uploaded as <code>multipart/form-data</code>.</td></tr><tr><td>backgroundAudioEnabled</td><td>boolean</td><td>Enables/disables background audio. Default when uploading a new file: <code>true</code>.</td></tr><tr><td>backgroundAudioLoop</td><td>boolean</td><td>If <code>true</code>, audio loops. Default: <code>false</code>.</td></tr><tr><td>backgroundAudioAutoplay</td><td>boolean</td><td>If <code>true</code>, audio starts on open. Default: <code>false</code>.</td></tr><tr><td>playerSkin</td><td>string</td><td>Player skin: <code>classic</code>, <code>default</code> (case-insensitive).</td></tr><tr><td>playerAccentColor</td><td>string</td><td>Accent color, e.g. <code>#ff0000</code>.</td></tr><tr><td>pageTransition</td><td>string</td><td>Desktop transition: <code>flip</code>, <code>slide</code>, <code>scroll</code> (case-insensitive).</td></tr><tr><td>mobilePageTransition</td><td>string</td><td>Mobile transition: <code>flip</code>, <code>slide</code>, <code>scroll</code> (case-insensitive).</td></tr><tr><td>layoutStyle</td><td>string</td><td>Layout: <code>smartView</code>, <code>singlePage</code>, <code>doublePage</code> (case-insensitive). Takes precedence over <code>singlePageView</code>.</td></tr><tr><td>showPageShadows</td><td>boolean</td><td>If <code>true</code>, displays page shadows.</td></tr><tr><td>enableThumbView</td><td>boolean</td><td>Shows the thumbnail navigator.</td></tr><tr><td>navigationArrows</td><td>boolean</td><td>Shows previous/next arrows.</td></tr><tr><td>enableRemoteControl</td><td>boolean</td><td>Enables remote control.</td></tr><tr><td>enableToc</td><td>boolean</td><td>Enables table of contents (PDF TOC when available).</td></tr><tr><td>startWithTOCOpen</td><td>boolean</td><td>Opens the TOC panel on load. Requires <code>enableToc=true</code> and a PDF with TOC.</td></tr><tr><td>enableShareOptions</td><td>boolean</td><td>Enables share options in the player menu. <strong>Preferred</strong> over deprecated per-network params.</td></tr><tr><td>shareLink</td><td>boolean</td><td>Enables share by link.</td></tr></tbody></table>

### Customization assets limits <a href="#response_params" id="response_params"></a>

Player customization uploads are validated before storage. Invalid files return an error and are not applied.

| Field           | Formats                         | Max size               | Other limits                     |
| --------------- | ------------------------------- | ---------------------- | -------------------------------- |
| logoImage       | JPEG, PNG, GIF, WebP, AVIF, SVG | 2 MB raster, 10 MB SVG | Raster logos: max 1000 × 1000 px |
| backgroundImage | JPEG, PNG, GIF, WebP, AVIF      | 20 MB                  | —                                |
| backgroundAudio | MP3, MPEG                       | 20 MB                  | —                                |

MIME type is detected server-side. The file extension must match the detected content type.

## Response parameters <a href="#response_params" id="response_params"></a>

If the upload is successful, the API call returns information about the flipbook which was just created.

<table data-header-hidden><thead><tr><th width="198.19270833333331">Name</th><th width="133.55078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Type</td><td>Description</td></tr><tr><td>collectionHash</td><td>string</td><td>The hash for the newly created flipbook. If the flipbook status is <em>editable</em> the generated hash will be temporary. Once the flipbook is published, a new, final hash will be generated for it.</td></tr><tr><td>collectionTitle</td><td>string</td><td>The title of the flipbook.</td></tr><tr><td>collectionDescription</td><td>string</td><td>The description of the flipbook. It can be specified in the creation parameters or generated by the conversion system.</td></tr><tr><td>collectionStatus</td><td>string</td><td><p>Possible values are:</p><ul><li><strong>public</strong>: The flipbook is published and accessible to the public.</li><li><strong>editable</strong>: The flipbook can be modified by the owner or authorized users.</li><li><strong>unlisted</strong>: The flipbook is published but not publicly accessible without a direct link.</li><li><strong>processing</strong>: The flipbook is published but not yet complete.</li></ul><p>While in processing:</p><ul><li>the <strong>collection.update</strong> and <a href="/api-reference/api-method-collection.downloadhtml.md"><strong>collection.downloadHTML5</strong></a> endpoints are <strong>unavailable</strong>.</li><li>the public link for the flipbook may not yet be functional.</li></ul><p>Publishing a flipbook may take a few seconds. You can check the collectionStatus at regular intervals (e.g., every few seconds) using the <a href="/api-reference/api-method-collection.getcollection.md">collection.getCollection</a> method. Continue making requests to <a href="/api-reference/api-method-collection.getcollection.md"><strong>collection.getCollection</strong></a> until the collectionStatus has a value <strong>other than processing</strong>.</p></td></tr><tr><td>coverImage</td><td>string</td><td>The url of the flipbook's thumbnail image. This thumbnail is generated from the first page of the first flipbook item.</td></tr><tr><td>collectionPageCount</td><td>number</td><td>The number of pages in the flipbook, for all the flipbook items.</td></tr><tr><td>createdDate</td><td>date</td><td>The date when the flipbook was created (not necessarily published).</td></tr><tr><td>publishDate</td><td>date</td><td>The date when the flipbook was published.</td></tr><tr><td>directLink</td><td>string</td><td>The public link of the flipbook, which becomes active within a few seconds.</td></tr><tr><td>flipbookPageCount</td><td>number</td><td>The number of pages of the flipbook item.<br><br>For flipbook created with the API, <strong>collectionPageCount</strong> and <strong>flipbookPageCount</strong> should have the same value.</td></tr><tr><td>settings</td><td>object</td><td>An object containing the <a href="/api-reference/api-method-collection.create.md#configuration-parameters">configuration parameters</a> of the flipbook, as set from the API call. <a href="/api-reference/api-method-collection.create.md#configuration-parameters">See the list below.</a></td></tr><tr><td>collectionItems</td><td>array</td><td>The list of flipbook items belonging to the flipbook. In case of flipbooks created using the API, the list contains a single item.<br><br>The <a href="/api-reference/api-method-collection.create.md#collection-item-parameters">parameters of the collection item</a> are listed below.</td></tr></tbody></table>

### **Configuration parameters**

<table data-header-hidden><thead><tr><th width="205.11458333333331">Name</th><th width="161.92578125">Type</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Type</td><td>Description</td></tr><tr><td>collectionWidth</td><td>number</td><td>The embed width of the player (measured in pixels).</td></tr><tr><td>collectionHeight</td><td>number</td><td>The embed height of the player (measured in pixels).</td></tr><tr><td>collectionStatus</td><td>string</td><td>The type of collection. Possible values are <em>public</em>, <em>editable</em> and <em>unlisted</em>.<br><br>Public collections are listed on your public profile and in search results. They are publicly available to other users.<br><br>Editable collections are not published. They must be published manually from the Flipsnack editor or updated using the <strong>collection.update</strong> method.<br><br>Unlisted collections are published but not listed on your profile page and in search results. Other users may view them only if they receive a direct link or an embedded player from you.</td></tr><tr><td>enableDownload</td><td>boolean</td><td>If set to <em>true</em>, displays the download button in the player menu. The menu is displayed only when the player is in fullscreen.</td></tr><tr><td>enableFullScreen</td><td>boolean</td><td>If set to <em>true</em>, allows the player to enter fullscreen mode.</td></tr><tr><td>enableSearch</td><td>boolean</td><td>If set to <em>true</em>, displays the search button in the player menu. If there is no text to search within the current collection item, the search button is displayed as disabled.</td></tr><tr><td>tooltipsLanguage</td><td>string</td><td>Selects the language for the tooltips displayed in the player. Possible languages are: Basque, Bosanski, Català, Czech, Dansk, Deutsch, English, Español, כשר, Française, ελληνικά, Hrvatski, Indonesian, Italiano, Magyar, Nederlands, Nederlands, Norsk, Polski, Português, Português do Brasil, Română, Pусский, Cрпски, Slovene, Suomi, Slovak, Swedish, Turkish.</td></tr><tr><td>transparentBackground</td><td>boolean</td><td>If set to <em>true</em>, the player is displayed with no background.</td></tr><tr><td>backgroundColor</td><td>string</td><td>The background color of the player, specified as a hexadecimal value. If the <strong>transparentBackground</strong> is set to <em>true</em>, the player will ignore the <strong>backgroundColor</strong> parameter.</td></tr><tr><td>backgroundScaleType</td><td>string</td><td>The scale mode of images used as background for the player. Possible values are <em>scaleCrop</em>, <em>center</em> and <em>tile</em>. Background images can be set using the <strong>collection.setBackgroundImage</strong> method.</td></tr><tr><td>autoFlip</td><td>boolean</td><td>If set to <em>true</em>, allows the player to automatically turn the pages of the flipbook. The pages turn after a time specified by the <strong>autoFlipDelay</strong> parameter.</td></tr><tr><td>autoFlipDelay</td><td>number</td><td>Specifies the time in seconds for pages to turn automatically. If <strong>autoFlip</strong> is <em>false</em>, this parameter is ignored.</td></tr><tr><td>rightToLeftOrientation</td><td>boolean</td><td>If set to <em>true</em>, allows the flipbook to be viewed from right to left: the first page is starts from the end as viewed in normal mode. This option is useful for documents written in right to left languages.</td></tr><tr><td>singlePageView</td><td>boolean</td><td>If set to <em>true</em>, allows the flipbook to be viewed a single page at a time.</td></tr><tr><td>logoUrl (DEPRECATED)</td><td>string</td><td>The URL of the logo image. A logo image can be set only by uploading it with the <strong>collection.setLogo</strong> method.</td></tr><tr><td>shareFacebook (DEPRECATED)</td><td>boolean</td><td>If set to <em>true</em>, the player displays a Facebook sharing option in the player menu, in fullscreen mode.</td></tr><tr><td>shareTwitter (DEPRECATED)</td><td>boolean</td><td>If set to <em>true</em>, the player displays a Twitter sharing option in the player menu, in fullscreen mode.</td></tr><tr><td>shareGooglePlus (DEPRECATED)</td><td>boolean</td><td>If set to <em>true</em>, the player displays a Google+ sharing option in the player menu, in fullscreen mode.</td></tr><tr><td>sharePinterest (DEPRECATED)</td><td>boolean</td><td>If set to <em>true</em>, the player displays a Pinterest sharing option in the player menu, in fullscreen mode.</td></tr><tr><td>shareEmail (DEPRECATED)</td><td>boolean</td><td>If set to <em>true</em>, the player displays an email sharing option in the player menu, in fullscreen mode.</td></tr><tr><td>shareLinkText (DEPRECATED)</td><td>string</td><td>The link opened from the link sharing option, within the player. By default, this link is the direct link of the collection.</td></tr><tr><td>playerSkin</td><td>string</td><td>Player skin.</td></tr><tr><td>playerAccentColor</td><td>string</td><td>Accent color.</td></tr><tr><td>pageTransition</td><td>string</td><td>Desktop page transition.</td></tr><tr><td>mobilePageTransition</td><td>string</td><td>Mobile page transition.</td></tr><tr><td>layoutStyle</td><td>string</td><td>Page layout.</td></tr><tr><td>showPageShadows</td><td>boolean</td><td>Page shadows enabled.</td></tr><tr><td>enableThumbView</td><td>boolean</td><td>Thumbnail navigator.</td></tr><tr><td>navigationArrows</td><td>boolean</td><td>Navigation arrows.</td></tr><tr><td>enableRemoteControl</td><td>boolean</td><td>Remote control.</td></tr><tr><td>enableToc</td><td>boolean</td><td>Table of contents.</td></tr><tr><td>startWithTOCOpen</td><td>boolean</td><td>TOC open on load.</td></tr><tr><td>enableShareOptions</td><td>boolean</td><td>Share menu enabled.</td></tr><tr><td>shareLink</td><td>boolean</td><td>Share by link.</td></tr><tr><td>animatedInteractions</td><td>boolean</td><td>Animated interactions.</td></tr><tr><td>highlightsOnLinks</td><td>boolean</td><td>Link highlights.</td></tr><tr><td>textSelection</td><td>boolean</td><td>Text selection.</td></tr><tr><td>autodetectLinks</td><td>boolean</td><td>Auto-detected links.</td></tr><tr><td>googleAnalyticsID</td><td>string</td><td>GA measurement ID.</td></tr><tr><td>allowIPAnonymization</td><td>boolean</td><td>GA IP anonymization.</td></tr><tr><td>googleTagManagerID</td><td>string</td><td>GTM container ID.</td></tr><tr><td>color</td><td>string</td><td>Background color (hex or gradient).</td></tr></tbody></table>

### **Flipbook item parameters**

<table data-header-hidden><thead><tr><th width="204.29036458333331">Name</th><th width="164.96875">Type</th><th>Description</th></tr></thead><tbody><tr><td>Name</td><td>Type</td><td>Description</td></tr><tr><td>flipbookHash</td><td>string</td><td>The hash generated for the flipbook item.</td></tr><tr><td>flipbookPageCount</td><td>number</td><td>The number of pages of the flipbook item.</td></tr><tr><td>flipbookTitle</td><td>string</td><td>The title of the flipbook.</td></tr><tr><td>flipbookDescription</td><td>string</td><td>The description of the flipbook.</td></tr><tr><td>extension</td><td>string</td><td>The extension of the document that the flipbook is based on. Extensions can be pdf, jpg or png.</td></tr><tr><td>convertStatus</td><td>string</td><td><p>The status of the flipbook specifies if it has finished converting or if it is still in the process of conversion.</p><p>Possible values are:</p><ul><li>PROCESSING</li><li>FAILED</li><li>COMPLETE</li></ul><p>Converting a PDF document is a time consuming process. You can check the status of a flipbook at a few seconds intervals by using the <strong>collection.getCollection</strong> method. The requests to collection.getCollection should be made until the flipbook has completed or failed converting.</p></td></tr></tbody></table>

## Error codes <a href="#error_codes" id="error_codes"></a>

For a complete list of error codes and messages go to [API status codes](/api-status-codes.md) section.

## Examples

### Request

{% tabs %}
{% tab title="cURL" %}

```bash
# POST
curl -X POST "https://upload.flipsnack.com/v1/" \
     -F 'file=@"mydocs/document.pdf";filename="document.pdf"' \
     -F "action=collection.create" \
     -F "apiKey=<YOUR-API-KEY>" \
     -F "collectionStatus=public" \
     -F "title=Lore Ipsim" \
     -F "signature=<YOUR-REQUEST-SIGNATURE>"
```

{% endtab %}

{% tab title="HTML" %}

```html
<form method="post" action="https://upload.flipsnack.com/v1/" enctype="multipart/form-data">
    <input type="hidden" name="action" value="collection.create">
    <input type="hidden" name="apiKey" value="<YOUR-API-KEY>">
    <input type="hidden" name="collectionStatus" value="public">
    <input type="file" name="file">
    <input type="text" name="title">
    <textarea name="description"></textarea>
    <input type="hidden" name="signature" value="<YOUR-REQUEST-SIGNATURE>">
    <button type="submit">Submit</button>
</form>
```

{% endtab %}
{% endtabs %}

### Branded create (logo + background + audio)

```bash
curl -X POST \
     https://upload.flipsnack.com/v1/ \
     -F action=collection.create \
     -F apiKey=<YOUR-API-KEY> \
     -F signature=<YOUR-REQUEST-SIGNATURE> \
     -F file=@/path/to/document.pdf \
     -F title="Branded Flipbook" \
     -F collectionStatus=private \
     -F background=image \
     -F backgroundScaleType=scaleCrop \
     -F logoLink=https://example.com \
     -F logoImage=@/path/to/logo.png \
     -F backgroundImage=@/path/to/background.jpg \
     -F backgroundAudio=@/path/to/track.mp3 \
     -F backgroundAudioEnabled=true \
     -F backgroundAudioLoop=true
```

### Gradient background

```bash
curl -X POST \
     https://upload.flipsnack.com/v1/ \
     -F action=collection.create \
     -F apiKey=<YOUR-API-KEY> \
     -F signature=<YOUR-REQUEST-SIGNATURE> \
     -F file=@/path/to/document.pdf \
     -F background=color \
     -F 'color=linear-gradient(180deg, #1a1a2e 0%, #16213e 100%)'
```

#### Tracking settings

```bash
curl -X POST \
     https://upload.flipsnack.com/v1/ \
     -F action=collection.create \
     -F apiKey=<YOUR-API-KEY> \
     -F signature=<YOUR-REQUEST-SIGNATURE> \
     -F file=@/path/to/document.pdf \
     -F googleAnalyticsID=G-XXXXXXX \
     -F googleTagManagerID=GTM-XXXXXX \
     -F allowIPAnonymization=1
```

### Response

{% tabs %}
{% tab title="JSON" %}

```json
{
    "code": 20,
    "status": "OK",
    "data": {
        "collectionHash": "d3m0h45h",
        "collectionTitle": "Lorem ipsum",
        "collectionStatus": "published",
        "coverImage": "https://cdn.flipsnack.com/collections/items/7c5e600d4459fe4e04d23ae5ei188777/covers/page_1/medium",
        "directLink": "https://www.flipsnack.com/user/lorem-ipsum.html",
        "createdDate": "2015-06-09 01:43:05",
        "publishDate": "2015-06-09 01:43:07",
        "collectionPageCount": 2,
        "collectionItems": [
            {
                "flipbookHash": "7c5e600d4459fe4e04d23ae5ei188777",
                "flipbookPageCount": "2",
                "flipbookTitle": "Lorem ipsum",
                "flipbookDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
                "extension": "pdf",
                "convertStatus": "COMPLETE"
            }
        ],
        "settings": {
            "collectionWidth": "640",
            "collectionHeight": "385",
            "enableFullScreen": "true"
        }
    }
}
```

{% endtab %}
{% endtabs %}
