Community Forums

Where our customers, developers, and more can come together to help each other with both general and technical questions about our products and services.

The key 'expiry' is not allowed in this context

Om Kesarwani

HI Team,

"Expiry" key not working for android Json. I am using below json for api calling :


JSON for POST Request :


"screenName": "Test",

"alert":"Updated : TestActivity",



Response : Please see the below error response .

"ok": false,
"error": "Could not parse request body.",
"error_code": 40000,
"details": {
"error": "The key 'expiry' is not allowed in this context",
"path": "",
"location": {
"line": 21,
"column": 16
"operation_id": "39adb731-aa1d-4e18-ac4c-1da617a0c58a"


Please sign in to leave a comment.


Hi Om,

This is Sean with Urban Airship Technical Support.

The expiry key needs to be included as part of the 'options' object in the payload.

Please let me know if you have any other questions or concerns.

Thank you,
Sean Conlin
Urban Airship Technical Support
Portland, Oregon


Sean Conlin 0 votes
Comment actions Permalink