# License API for Put

**URL:** <https://discuss.elastic.co/t/license-api-for-put/215490>\
**Category:** Elasticsearch\
**Created:** [January 17, 2020, 3:53pm UTC](https://discuss.elastic.co/t/license-api-for-put/215490 "2020-01-17T15:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![balogan](https://avatars.discourse-cdn.com/v4/letter/b/b5e925/32.png) [@balogan](https://discuss.elastic.co/u/balogan)\
**Post date:** [January 17, 2020, 3:53pm UTC](https://discuss.elastic.co/t/license-api-for-put/215490/1 "2020-01-17T15:53:42Z")

</div>

I'm working on writing a play to update the license key. Get and delete works well, but when I put the license I got from the get it throws this error.

{  
"errors": [{  
"code": "license.invalid\_license",  
"message": "Invalid license: null"  
}]  
}

I added this to the get return to match the docs.

{  
"license": {  
"cluster\_licenses": [  
{  
"license" : {}  
}  
],  
"expiry\_date\_in\_millis": 1581185762350,  
...

Looks as though I need a value for what I added to the JSON. Am I correct?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 14, 2020, 3:53pm UTC](https://discuss.elastic.co/t/license-api-for-put/215490/2 "2020-02-14T15:53:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
