{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Updates a coupon code specified by the given identifier synchronously. We allow updating the 'status' and 'expires_at' of coupon codes.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`\n\n**Scopes:**\n`coupon-codes:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/update_coupon_code.json)","properties":{"path":{"type":"object","properties":{"id":{"description":"The id of a coupon code is a combination of its unique code and the id of the coupon it is associated with.","type":"string","examples":["10OFF-ASD325FHK324UJDOI2M3JNES99"]}},"required":["id"],"additionalProperties":false},"query":{"type":"object","properties":{"fields[coupon-code]":{"type":"array","items":{"type":"string","enum":["expires_at","id","status","unique_code"]},"description":"For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets"}},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/CouponCodeUpdateQuery"}},"required":["path","headers","body"],"additionalProperties":false,"definitions":{"CouponCodeUpdateQuery":{"type":"object","properties":{"data":{"$ref":"#/definitions/CouponCodeUpdateQueryResourceObject"}},"required":["data"]},"CouponCodeUpdateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/CouponCodeEnum"},"id":{"description":"The id of a coupon code is a combination of its unique code and the id of the coupon it is associated with.","type":"string","examples":["10OFF-ASD325FHK324UJDOI2M3JNES99"]},"attributes":{"type":"object","properties":{"status":{"description":"The API status of our coupon codes.","type":["string","null"],"enum":["ASSIGNED_TO_PROFILE","DELETING","PROCESSING","UNASSIGNED","USED","VERSION_NOT_ACTIVE"]},"expires_at":{"description":"The datetime when this coupon code will expire. If not specified or set to null, it will be automatically set to 1 year.","type":["string","null"],"format":"date-time","examples":["2022-11-08T00:00:00+00:00"]}}}},"required":["type","id","attributes"]},"CouponCodeEnum":{"type":"string","enum":["coupon-code"]}}},"name":"Update Coupon Code","id":"klaviyo.update_coupon_code","example":{"path":{"id":"10OFF-ASD325FHK324UJDOI2M3JNES99"},"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"coupon-code","id":"10OFF-ASD325FHK324UJDOI2M3JNES99","attributes":{}}}},"maxRequests":1,"summary":false}}