# Put

## Update an existing document

### Parameters:

| Name                         | Optional / Required | Data type | Description                                                                                                                                                                                                                                                        | Default  |
| ---------------------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| id                           | required            | Integer   | One of your document ids                                                                                                                                                                                                                                           |          |
| title                        | required            | String    | A title for your document. Min. length 5 characters, max. length 255 characters                                                                                                                                                                                    |          |
| description                  | optional            | String    | A description for your document. Min. length 5 characters, max. length 2500 characters                                                                                                                                                                             |          |
| category                     | optional            | Integer   | 1, 2 or ... (A list of valid category ids: [Document categories](https://developers.yumpu.com/api/document-categories/documentcategoriesget))                                                                                                                      | 0 = None |
| language                     | optional            | String    | en, de or ... (A list of valid languages: [Document languages](https://developers.yumpu.com/api/document-languages/documentlanguagesget))                                                                                                                          | en       |
| tags                         | optional            | String    | A list of words seperated by comma (house,garden,balcony). Min. length 3 characters, max. length 30 characters. Allowed characters a-z and a space.                                                                                                                |          |
| visibility                   | optional            | String    | public, private, rprotected, pprotected, dprotected, webkiosk, appkiosk or webappkiosk (rprotected = protected by referrer, pprotected = protected by password, dprotected = protected by domain(s))                                                               | public   |
| validity                     | optional            | String    | Valid from and / or valid until Examples: 2013-10-01T00:00:00-2013-10-30T23:59:59 (valid from 2013-10-01 00:00:00, valid until 2013-10-30 23:59:59) 2013-10-01T00:00:00- (valid from 2013-10-01 00:00:00-) -2013-10-30T23:59:59 (valid until -2013-10-30 23:59:59) |          |
| downloadable                 | optional            | String    | Allow users to download your source pdf file. y or n                                                                                                                                                                                                               | n        |
| site\_recommended\_magazines | optional            | String    | Show recommended magazines on Yumpu? y or n (Preferred)                                                                                                                                                                                                            | y        |
| recommended\_magazines       | optional            | String    | Backward-compatible alias for `site_recommended_magazines`. **Deprecated**.                                                                                                                                                                                        | y        |
| site\_show\_more\_magazines  | optional            | String    | Show more user magazines on Yumpu? y or n                                                                                                                                                                                                                          | y        |
| site\_info\_magazines        | optional            | String    | Show information panel on Yumpu? y or n                                                                                                                                                                                                                            | y        |
| site\_social\_sharing        | optional            | String    | Show social sharing buttons on Yumpu. y or n (Preferred)                                                                                                                                                                                                           | y        |
| social\_sharing              | optional            | String    | Backward-compatible alias for `site_social_sharing`. **Deprecated**.                                                                                                                                                                                               | y        |
| site\_printing\_webkiosk     | optional            | String    | Allow print the document directly from the Webkiosk                                                                                                                                                                                                                | n        |
| site\_pageview               | optional            | String    | Show document in single or double pageview. double or single                                                                                                                                                                                                       | double   |
| player\_social\_sharing      | optional            | String    | Show social sharing buttons in Yumpu Player. y or n                                                                                                                                                                                                                | y        |
| player\_download\_pdf        | optional            | String    | Show button "download pdf" in Yumpu Player. y or n                                                                                                                                                                                                                 | n        |
| player\_print\_page          | optional            | String    | Show button "print page" in Yumpu Player. y or n                                                                                                                                                                                                                   | n        |
| player\_branding             | optional            | String    | Show Yumpu branding in Yumpu Player. y or n                                                                                                                                                                                                                        | y        |
| player\_sidebar              | optional            | String    | Show a list of recommended documents in Yumpu Player. y or n                                                                                                                                                                                                       | n        |
| player\_html5\_c2r           | optional            | String    | Activate HTML5 full screen on Yumpu. y or n                                                                                                                                                                                                                        | y        |
| player\_outer\_shadow        | optional            | String    | Drop shadow in Yumpu player. y or n                                                                                                                                                                                                                                | y        |
| player\_inner\_shadow        | optional            | String    | Shadow effects on pages. y or n                                                                                                                                                                                                                                    | y        |
| player\_ga                   | optional            | String    | Activate Google Analytics tracking. A valid UA code from Google Analytics.                                                                                                                                                                                         |          |
| access\_tags                 | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                                                                                                                                                             |          |
| subscriptions                | optional            | String    | One or multiple subscription ids (myid1 or myid1,myid2)                                                                                                                                                                                                            |          |
| iap                          | optional            | String    | Enable In-App Purchase (y or n)                                                                                                                                                                                                                                    | n        |
| itc\_product\_id             | optional            | String    | iTunes Product ID                                                                                                                                                                                                                                                  |          |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=20582984" -d "title=My new document title" "https://api.yumpu.com/2.0/document.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 20582984,  
    'title' => 'My new document title'
);
$putDocument = $yumpu->putDocument($data);
print_r($putDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: '20582984',
  title: 'My new document title'
};
yumpu.putDocument(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=20582984", "title=My new document title"};
System.out.println(y.putDocument(params));
```

{% endtab %}
{% endtabs %}

Whatever language you are using, the result will be the same.

```bash
{
  "document": [
    {
      "id": 20582984,
      "create_date": "2016-09-13 09:13:15",
      "update_date": "2016-09-13 09:17:23",
      "url": "https://www.yumpu.com/de/document/view/55932706/new-title-2",
      "short_url": "https://www.yumpu.com/s/Ok8tEcVRDCsfAod0",
      "image": {
        "small": "https://img.yumpu.com/55932706/1/115x163/new-title.jpg",
        "medium": "https://img.yumpu.com/55932706/1/452x640/new-title.jpg",
        "big": "https://img.yumpu.com/55932706/1/1129x1600/new-title.jpg"
      },
      "language": "de",
      "title": "My new document title",
      "description": "",
      "pages": 3,
      "width": 452,
      "height": 640,
      "tags": [
        "suchparameter",
        "liefert",
        "google",
        "webseiten",
        "suchbegriff",
        "mehreren",
        "angezeigt",
        "beschreibung",
        "nutzwert",
        "treffer",
        "www.lukasbals.at"
      ],
      "embed_code": "<iframe width=\"512px\" height=\"384px\" src=\"https://www.yumpu.com/de/embed/view/CsdA9tSUlmyVvbNO\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>",
      "settings": {
        "date_validity_from": "",
        "date_validity_until": "",
        "site_social_sharing": true,
        "privacy_mode": "public",
        "site_download_pdf": false,
        "site_recommended_magazines": true,
        "player_download_pdf": false,
        "player_print_page": false,
        "player_branding": true,
        "player_sidebar": false,
        "player_social_sharing": true,
        "player_google_analytics_code": "",
        "player_html5_c2r": true,
        "player_outer_shadow": true,
        "player_inner_shadow": true,
        "appkiosk_itc_product_id": "",
        "appkiosk_iap_sale_item": false,
        "magazine_premium_blurred": false,
        "magazine_premium_blurred_page_range": "",
        "magazine_page_teaser": false,
        "magazine_page_teaser_page_range": "",
        "magazine_page_teaser_url": "",
        "magazine_page_teaser_image_url": "",
        "magazine_acl_running": false,
        "player_zoom_factor": 2.5,
        "hotspoteditor_custom": false
      },
      "access_tags": false,
      "subscriptions": false
    }
  ],
  "state": "success",
  "status_code": 200,
  "completed_in": 0.8976
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.yumpu.com/api/document/documentput.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
