Skip to main content
Every request from a SmartAlex standard API action carries an X-SmartAlex-Signature header. You compute the same signature from the raw body and your workspace’s signing secret, and reject the request if they differ. A Custom request is not signed, so this page does not apply to it.
In the app: Sidebar → Agent Settings → APIs → API actions → Signing secret and limits (/home?settings=http_tools). The secret starts with shs_. Reveal shows it and Rotate replaces it.

How is the signature built and checked?

The diagram shows SmartAlex building the signature and your endpoint recomputing it from the raw body.
  1. Take the raw request body exactly as received. Do not parse and re-serialise it.
  2. Read t= (epoch milliseconds) and v1= from the header: X-SmartAlex-Signature: t=1733839200123,v1=4a7c...d6.
  3. Compute HMAC-SHA256(secret, t + "." + rawBody) and write it as lowercase hex.
  4. Compare it with v1 in constant time (timingSafeEqual, compare_digest, hash_equals or hmac.Equal, never ==).
  5. We recommend rejecting a t more than 5 minutes old or more than 1 minute in the future, to stop replays. SmartAlex does not enforce this for you.
The secret is one per workspace, shared by every standard-format action, and is 64 hex characters after the shs_ prefix. Use the whole value, prefix included, as the HMAC key.

What do the verify functions look like?

Each function takes the raw body and returns true or false. Code samples shows them inside full handlers.

How do I show or rotate the signing secret?

1

Open the secret controls

On the API actions tab, open Signing secret and limits.
2

Reveal it

Click Reveal and confirm “Reveal the signing secret?”. Anyone who sees it can sign requests to your endpoints as SmartAlex, so keep it in your secrets store.
3

Or rotate it

Click Rotate and confirm “Rotate the signing secret?”. The old secret stops working at once, so your endpoint refuses our requests until you update it. There is no grace period.
Revealing and rotating are changes, so a role that can only read cannot do either.

Why does the signature never match?

Questions people ask

It is the only proof a request came from SmartAlex. Anyone who learns your URL can call it, so verify, and also protect the endpoint with the key from API key.
No. A custom request is sent as written, so your endpoint relies on the key you place in it.

Code samples

Full handlers for Node, Python, PHP and Go.

Request and response

The body you are signing.
Last modified on November 27, 2026