# Post url

## Create a new document - url

### Parameters

| Name                         | Optional / Required | Data type | Description                                                                                                                                                                                                                                                                                                                               | Default  |
| ---------------------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| url                          | required            | String    | URL of document to be uploaded (public accessable). Allowed content types application/pdf or application/octet-stream. Max. file size is 600 MB.                                                                                                                                                                                          |          |
| 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   |
| rendering\_type              | optional            | String    | Rendering method used for the document in our engine. It can be instant or html.                                                                                                                                                                                                                                                          | instant  |
| domains                      | optional            | String    | A list of domains seperated by a comma (Note: Visibility must be set to dprotected) Examples: yumpu.com, blog.yumpu.com, developers.yumpu.com yumpu.com                                                                                                                                                                                   |          |
| 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)                                                                        |          |
| blurred                      | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_image          | optional            | File      | Image data The image must be less than 2 MB in size. Allowed mime types are image/gif, image/jpeg, image/pjpeg, image/png and image/x-png. The image will be resized to fit in the page dimensions (of your magazine). Note: If you use page\_teaser\_image, the parameters page\_teaser\_page\_range and page\_teaser\_url are required. |          |
| page\_teaser\_page\_range    | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_url            | optional            | String    | A valid URL. Examples: <http://www.yumpu.com/en>                                                                                                                                                                                                                                                                                          |          |
| page\_teaser\_closeable      | optional            | String    | Allow users to close teaser. y or n                                                                                                                                                                                                                                                                                                       | n        |
| downloadable                 | optional            | String    | Allow users to download your source pdf file. y or n                                                                                                                                                                                                                                                                                      | n        |
| detect\_elements             | optional            | String    | Detect elements automatically? y or n                                                                                                                                                                                                                                                                                                     | y        |
| 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                                                                                                                                                                                                                                                                                                                         |          |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;title  url&#x20;

Run request

```
```

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

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "url=https://www.domain.com/filename.pdf" -d "title=My document title" "https://api.yumpu.com/2.0/document/url.json"
```

{% endtab %}

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

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'title' => 'My document title',
    'url' => 'http://www.domain.com/filename.pdf',
);
$newDocument = $yumpu->postDocumentUrl($data);
print_r($newDocument);
```

{% endtab %}

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

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   title: 'My document title',
   url: 'http://www.domain.com/filename.pdf'
};
yumpu.postDocumentUrl(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 = {
                "url=http://www.domain.com/filename.pdf",
                "title=My document title"};
System.out.println(y.postDocumentUrl(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "file": {
    "url": "https://www.domain.com/filename.pdf",
    "client_name": "suchparameter-google-uebersicht.pdf",
    "size": "183.0 KB",
    "mime_type": "application/pdf"
  },
  "document": {
    "url": "https://www.domain.com/filename.pdf",
    "title": "My document title"
  },
  "progress_id": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
  "state": "success",
  "completed_in": 0.3786
}
```


---

# 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/documentposturl.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.
