invalid_parameter
HTTP/1.1 400 Bad Request{ "error": { "type": "invalid_request_error", "code": "invalid_parameter", "message": "expires_at must be in the future.", "param": "expires_at", "docs_url": "https://docs.patomic.dev/errors/invalid-parameter", "request_id": "…", "suggestion": "Provide a millisecond Unix timestamp greater than the current time, or omit the field for a non-expiring key." }}What it means
Section titled “What it means”A parameter you sent did not pass validation. The param field tells you which one. message tells you why.
Common cases
Section titled “Common cases”param | Cause | Fix |
|---|---|---|
expires_at | Timestamp is in the past or zero | Use Date.now() + N for a future timestamp, or omit the field |
cursor | Cursor is invalid, expired, or tampered | Use next_cursor from the previous response verbatim — never modify or persist cursors |
name | Empty or > 255 chars | Trim, ensure non-empty, keep under 255 |
rate_limit_rpm | < 1 or > 100,000 | Use a value in [1, 100000] |
Path id (e.g. /v1/keys/{id}) | Doesn’t match apk_[a-z0-9]{21} | Use the exact id returned from earlier responses |
How to debug
Section titled “How to debug”- Read the
paramfield — it tells you exactly which input is wrong. - Read the
message— it tells you the constraint that failed. - Read the
suggestion— it tells you what valid input looks like.
If those three together don’t get you to a fix, the bug is on Patomic’s side — include request_id when reporting.