# collection.update

**Note:**&#x20;

* requests must be made to **<https://api.flipsnack.com/v1>**
* this method is not available while the flipbook is in the processing state\ <br>

## Request parameters

| Name                      | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| apiKey (required)         | string  | 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".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| signature (required)      | string  | The signature must be calculated by you and added to the request. See [How to sign a request](https://developers.flipsnack.com/how-to-sign-a-request) 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".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| action (required)         | string  | The API method that should be called. In this case the value should be *collection.update*. If it is not specified, the request will return the error code "30 - Missing mandatory parameter".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| collectionHash (required) | string  | The hash of the flipbook you wish to update. If you do not specify a flipbook hash, then the request will return the error code "30 - Missing mandatory parameter".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| title                     | string  | The title of the flipbook. This title will appear on the flipbook's direct link and in the My Flipbooks page. By default, if a title is not given, Flipsnack will try to extract the title from the uploaded document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| description               | string  | The description of the flipbook. 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| collectionWidth           | number  | <p>The embed width of the player (measured in pixels).<br><br>Default: <em>650</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| collectionHeight          | number  | <p>The embed height of the player (measured in pixels).<br><br>Default: <em>385</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| collectionStatus          | string  | <p>The type of flipbook. Possible values are <em>public</em>, <em>editable</em> and <em>unlisted</em>.<br><br>Public flipbooks 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 <strong>collection.update</strong> method.<br><br>Unlisted flipbooks 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.<br><br><strong>Note:</strong> Once a flipbook receives the <em>public</em> status, it cannot be changed to <em>unlisted</em>, even if the current status is set to <em>editable</em>. But <em>unlisted</em> flipbooks can be changed to <em>public</em> flipbooks.<br><br>Default: <em>public</em>.</p> |
| enableThumbView           | boolean | <p>If set to <em>true</em>, displays the thumbnail viewer in the player. The thumbnail viewer is displayed only when the player is in fullscreen.<br><br>Default: <em>true</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| enableToc                 | boolean | <p>If set to <em>true</em> and if the pdf has a table of contents the player will display it.<br><br>Default: <em>false</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| showControls              | boolean | <p>If set to <em>true</em>, then the navigation controls will be displayed in normal mode<br><br>Default: <em>false</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| enableDownload            | boolean | <p>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>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| enablePrint               | boolean | <p>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>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| enableFullScreen          | boolean | <p>If set to <em>true</em>, allows the player to enter fullscreen mode: a "Click to read" button is displayed.<br><br>Default: <em>true</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| enableSearch              | boolean | <p>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 flipbook item, the search button is displayed, but disabled.<br><br>Default: <em>true</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| tooltipsLanguage          | string  | <p>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.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| background                | string  | <p>The background color of the player. Possible values are <em>color</em> and <em>transparent</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.<br><br>Default: <em>color</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| color                     | string  | <p>The background color of the player, specified as a hexadecimal value. 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>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| autoFlip                  | boolean | <p>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>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| autoFlipDelay             | number  | <p>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>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| rightToLeftOrientation    | boolean | <p>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>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| singlePageView            | boolean | <p>If set to <em>true</em>, allows the flipbook to be viewed a single page at a time.<br><br>Default: <em>false</em>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

## Response parameters

If the request is successful, the API call returns information about the specified flipbook.

This action method has the same response as [collection.getCollection](https://developers.flipsnack.com/api-reference/api-method-collection.getcollection) method.

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

For complete list of error codes and messages go to [api-status-codes](https://developers.flipsnack.com/api-status-codes "mention") section.

## Examples

### Request

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

```bash
# GET
curl -X GET \
     -G \
     https://api.flipsnack.com/v1/ \
     -d action=collection.update \
     -d apiKey=<YOUR-API-KEY> \
     -d collectionHash=d3m0h45h \
     -d height=600 \
     -d title=Lorem%20ipsum%20dolor \
     -d signature=<YOUR-REQUEST-SIGNATURE> \
     -d width=800
```

{% endtab %}

{% tab title="HTML" %}

```html
<form method="get" action="https://api.flipsnack.com/v1/">
    <input type="hidden" name="action" value="collection.update">
    <input type="hidden" name="apiKey" value="<YOUR-API-KEY>">
    <input type="text" name="title">
    <input type="text" name="width">
    <input type="text" name="height">
    <input type="hidden" name="signature" value="<YOUR-REQUEST-SIGNATURE>">
    <button type="submit">Submit</button>
</form>
```

{% endtab %}
{% endtabs %}

### Response

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

```json
{
    "code": 20,
    "status": "OK",
    "data": {
        "collectionHash": "d3m0h45h",
        "collectionTitle": "Lorem ipsum dolor",
        "collectionStatus": "published",
        "coverImage": "https://d1dhn91mufybwl.cloudfront.net/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": "800",
            "collectionHeight": "600",
            "enableFullScreen": "true"
        }
    }
}
```

{% endtab %}
{% endtabs %}
