Upstash-Signature
HTTP header.
You can use this signature to verify the request is coming from QStash.

You need to keep your signing keys in a secure location.
Otherwise some malicious actor could use them to send requests to your API as if they were coming from QStash.
Verifying
You can use the official QStash SDKs or implement a custom verifier either by using an open source library or by processing the JWT manually.Via SDK (Recommended)
QStash SDKs provide aReceiver
type that simplifies signature verification.
Depending on the environment, the body might be parsed into an object by the HTTP handler if it is JSON.
Ensure you use the raw body string as is. For example, converting the parsed object back to a string (e.g., JSON.stringify(object)) may cause inconsistencies and result in verification failure.
Manual verification
If you don’t want to use the SDKs, you can implement your own verifier either by using an open-source library or by manually processing the JWT. The exact implementation depends on the language of your choice and the library if you use one. Instead here are the steps you need to follow:- Split the JWT into its header, payload and signature
- Verify the signature
- Decode the payload and verify the claims
iss
: The issuer must beUpstash
.sub
: The subject must the url of your API.exp
: Verify the token has not expired yet.nbf
: Verify the token is already valid.body
: Hash the raw request body usingSHA-256
and compare it with thebody
claim.