# Put

## Update an existing access tag

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                               | Default |
| ----------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| id          | required            | String    | One of your access tag ids                                                                                                |         |
| name        | required            | String    | min. 1 characters, max. 50 characters                                                                                     |         |
| description | optional            | String    | min. 1 characters, max. 255 characters                                                                                    |         |
| default     | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| iap         | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| kiosks      | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

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

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=pR0VV9tCh5q4ZrEx" -d "name=accesstag7" -d "description=accesstag7" -d "default=n" -d "iap=n" -d "kiosks=webkiosk_25,webkiosk_1572" "https://api.yumpu.com/2.0/account/access_tag.json"
```

{% endtab %}

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

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'pR0VV9tCh5q4ZrEx',
    'name' => 'accesstag7',
    'description' => 'accesstag7',
    'default' => 'n',
    'iap' => 'n',
    'kiosks' => 'webkiosk_25,webkiosk_1572'
);
$putAccessTag = $yumpu->putAccessTag($data);
print_r($putAccessTag);
```

{% endtab %}

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

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'pR0VV9tCh5q4ZrEx',
  name: 'accesstag7',
  description: 'accesstag7',
  default: 'n',
  iap: 'n',
  kiosks: 'webkiosk_25,webkiosk_1572'
};
yumpu.putAccessTag(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=pR0VV9tCh5q4ZrEx", "name=accesstag7", "description=accesstag7", "defaul=n", "iap=n", "kiosks=webkiosk_25,webkiosk_1572" };
System.out.println(y.putAccessTag(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "access_tag": {
    "id": "pR0VV9tCh5q4ZrEx",
    "create_date": "2015-02-03 11:45:01",
    "update_date": "2015-02-03 12:10:08",
    "name": "accesstag7",
    "description": "accesstag7",
    "default": false,
    "iap": false,
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      },
      {
        "id": "1572",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.2296"
}
```
