x-kpsdk Headers Reference: ct, cd, v, h, dt, fc, im, r and KP_UIDz
The x-kpsdk headers are ct (session token), cd (single-use proof sent on protected requests), v (SDK version), dt and im (sent on /tl), h, fc and dv (native SDK flows) and the response header r, alongside the KP_UIDz cookie. Every header name carries the x-kpsdk- prefix. Below: direction, endpoint, lifetime and failure signs for each, limited to documented behavior.
Who this is for
Engineers with authorization to test who work with Kasada-protected sites, open a HAR file, see a wall of x-kpsdk-* headers and a KP_UIDz cookie, and need a lookup page that says which side sets each one, on which request, and what breaks when it is wrong.
Which x-kpsdk headers and cookies appear on the wire?
Ten names recur: eight headers (ct, cd, v, h, dt, im, fc, dv), the response header r and the KP_UIDz cookie. Table 1 lists direction, setter, endpoint and lifetime, and says "not documented" where no public source exists.
HTTP field names are case-insensitive (RFC 9110), so a HAR viewer may show X-Kpsdk-Ct where this page writes x-kpsdk-ct. The endpoint names /fp, /ips.js, /tl and /mfc are path suffixes, and the full path and the status codes can differ by target.
| Name | Direction | Set by | Seen on | Lifetime and reuse | Wrong or missing value |
|---|---|---|---|---|---|
x-kpsdk-ct | Response, then request | Target's Kasada edge. The client echoes it back. | /fp (the Catmouse reference sequence shows a 429 response), /tl (request and refreshed response), protected calls | Session token. Refreshed by /tl and carried across protected calls in the active session. | When you ask POST /Solver/cd to bind a proof to a session, a ct under 16 characters returns 400 invalid_ct. The target's own reaction to a wrong ct is not documented. |
x-kpsdk-cd | Request | Client script, or POST /Solver/cd in the Catmouse flow | Protected API calls | Single-use. Generate one immediately before each protected call. | A reused or early-generated value is rejected as used or expired. |
x-kpsdk-v | Request (also a query parameter) | Declared by the served ips.js | ips.js URL, /tl | Changes when the target rolls a new SDK build. Read it from the latest ips.js URL on every session. | The API reference lists a stale served version as a cause of EMPTY_R: a /tl that returns 200 with an empty body and no x-kpsdk-r. |
x-kpsdk-dt | Request | Returned by POST /Solver/solve as dtHeader | /tl | Sent with the /tl submission it was returned for. | No failure signature is documented for this header alone. |
x-kpsdk-im | Query parameter, then request | Target page: it sits in the ips.js URL found in the /fp HTML | /fp HTML, /tl | Taken from the ips.js URL of the current session. | Recommended on the solve call. The solver reads it from ipsUrl when imHeader is absent. |
x-kpsdk-h | Response from /mfc | Native SDK flows that call /mfc | /mfc, passed to the solver as hHeader | Native SDK flows only. | No failure signature is documented for this header alone. |
x-kpsdk-fc | Response from /mfc | Native SDK configuration route | /mfc, passed to the solver as fcHeader | Native SDK flows only. | No failure signature is documented for this header alone. |
x-kpsdk-dv | Request | The native client (iOS value built from app version and app id, Android value from the client) | /tl on native SDKs | Native SDK flows only. | No failure signature is documented for this header alone. |
x-kpsdk-r | Response | Target's Kasada edge | /tl and protected responses | You receive it and never send it. Per the published rotation post it carries the st and rst timing anchors. | The API reference describes a passing /tl as 200 with an x-kpsdk-r token and a declined one as 200 with an empty body and no x-kpsdk-r. |
KP_UIDz | Cookie: Set-Cookie response, then Cookie request | Target site. Published Catmouse posts describe it as an observation in the client's cookie jar, not an API output. | Not documented per endpoint | Expiry and attributes are not documented here, so read them from your own Set-Cookie lines. | Not documented. |
Which header is single-use?
Only cd is documented as single-use. Generate it right before each protected call and never reuse it, because a reused or early value is rejected.
The session token behaves differently from cd. You carry the newest ct across protected calls, whereas you replace cd every time. Do not trust a cd value that you generated earlier in the session, and read the MDN list of HTTP headers if you need the general meaning of request and response header fields.
What does each header and cookie mean?
Each name has one job in the handshake: ct identifies the session, cd proves fresh work, v names the script build, and KP_UIDz carries the session cookie. The glossary below gives the plain definition and one practical consequence per name.
x-kpsdk-ct- The client token. In the Catmouse reference sequence the target returns it on the
/fp429 response and refreshes it on/tl. Send the newest value on protected calls. When you askPOST /Solver/cdto bind a proof to the session, thectyou pass must be at least 16 characters or the API answers 400invalid_ct. x-kpsdk-cd- The challenge data proof. It embeds timing anchors, so it is generated right before the protected request and used once. See the single-use cd and clock skew post.
x-kpsdk-v- The SDK version string the served
ips.jsdeclares, such asj-1.2.661. The prefix identifies the family:j-orv-for web,i-for native iOS anda-for native Android. See the version rotation post. x-kpsdk-dt- A header the solver returns as
dtHeaderand the client sends on/tlnext toctandim. x-kpsdk-im- A value found in the query string of the
ips.jsURL on the/fppage. The solver returns it asimHeader, and the client sends it on/tl. x-kpsdk-handx-kpsdk-fc- Headers from the
/mfcroute that native SDK flows call. Pass them toPOST /Solver/solveashHeaderandfcHeader. See the mobile SDK post. x-kpsdk-dv- A device value used by native SDK flows. On Android the client supplies it as
dvHeader. On iOS the solver accepts a client-computedkpsdkDvor builds the value from app fields. x-kpsdk-r- A response header on
/tl. You read it and never send it. A/tlreply without it is the EMPTY_R case in the API reference. KP_UIDz- A cookie that Kasada-protected sites commonly show in the client's cookie jar. Published Catmouse posts treat that as an observation, and the API does not return it. Handle it like any session cookie under the rules of RFC 6265.
In what order do the headers appear in a Kasada session?
In the Catmouse reference sequence a session starts with a 429 on /fp that issues x-kpsdk-ct (the status can differ by target), continues with the ips.js fetch and a /tl submission, and then repeats a cd plus ct pair for every protected request. The numbered list shows the order.
GET /mfcon native SDK flows. The response carriesx-kpsdk-handx-kpsdk-fc, which go to the solver ashHeaderandfcHeader.GET /fp. The target answers with an HTML challenge page and anx-kpsdk-ctresponse header, a 429 in the reference sequence. Keep whatever cookies the response sets.- Parse the HTML. Read the
ips.jsURL. Its query string carriesx-kpsdk-vandx-kpsdk-im. GETtheips.jsURL. Keep the response as UTF-8 text.POST /Solver/solve. Send the script text,ipsUrl, thectfrom step 2 asctToken,kpsdkV,tzandtzOffset. The response gives a base64payloadand the headers for/tl.POST /tl. Send the decoded payload with thect,dt,imandvheaders. The reply carriesrand a refreshedct.- Each protected request. Call
POST /Solver/cd, then send the newestx-kpsdk-ctand the verbatimx-kpsdk-cd, with the session cookies your client holds.
What changes between /fp and a protected call?
The session token is refreshed on /tl, and each protected call needs a new single-use proof. Send the newest ct together with a fresh cd.
You can confirm this in your own HAR file by comparing the ct value on the /fp response with the one on the /tl response. Source: the Catmouse OpenAPI file and the published single-use cd article describe the same split between the session token and the per-call proof.
How do you list the Kasada headers in a HAR file?
Parse the HAR JSON, keep every entry that has an x-kpsdk- request or response header or a KP_UID cookie, and print only the names, never the values. The Python script below does that with the standard library.
import json
import sys
from urllib.parse import urlsplit
def kp_names(items, prefix, fold=True):
names = {i["name"].lower() if fold else i["name"] for i in items if i["name"].lower().startswith(prefix)}
return sorted(names)
def main(path):
with open(path, encoding="utf-8") as f:
har = json.load(f)
for e in har["log"]["entries"]:
req, res = e["request"], e["response"]
sent = kp_names(req["headers"], "x-kpsdk-")
got = kp_names(res["headers"], "x-kpsdk-")
jar_out = kp_names(req.get("cookies", []), "kp_uid", fold=False)
jar_in = kp_names(res.get("cookies", []), "kp_uid", fold=False)
if sent or got or jar_out or jar_in:
tail = "/".join(urlsplit(req["url"]).path.split("/")[-2:])
print(req["method"], res["status"], tail)
print(" request headers :", ", ".join(sent) or "-")
print(" response headers:", ", ".join(got) or "-")
print(" cookies sent :", ", ".join(jar_out) or "-")
print(" cookies set :", ", ".join(jar_in) or "-")
main(sys.argv[1])
Run it as python kp_headers.py session.har. A healthy session shows x-kpsdk-ct on the /fp response, a /tl entry with a request x-kpsdk-dt and a response x-kpsdk-r, and a cd on each protected request. The curl call below fetches the cd for one protected request from the documented endpoint:
curl -sS https://kasadaapi.catmouse.ai/Solver/cd \
-H "x-api-key: $CATMOUSE_KEY" \
-H "content-type: application/json" \
-d '{"host":"www.example.com","platform":"web","ct":"<x-kpsdk-ct of the session>"}'
A successful reply is HTTP 200 OK with success, host, platform and cd. Copy cd verbatim into the x-kpsdk-cd header of one outbound request.
What does a wrong or missing value look like?
The documented symptoms are a 400 from the solver and a 200 from /tl with an empty body and no x-kpsdk-r. Match the symptom to the list below. Anything else about target behavior is not documented here.
- 429 from the target: status 429 is defined in RFC 6585 as Too Many Requests. The Catmouse reference sequence shows it on
/fpbefore the/tlstep. This page does not document which missing header causes it on other requests. - 200 with an empty body and no
x-kpsdk-ron/tl: the API reference calls this EMPTY_R. It names a stalex-kpsdk-vand a mismatched timezone or exit IP as causes. Re-fetch/fpandips.jsand read the version from the new URL. - Protected call rejected after a good
/tl: check that thecdis single-use, generated immediately before sending, and paired with the newestct. - 400 from the solver: a field problem such as missing
tzandtzOffset, anipsBodythat is not a Kasada script or is truncated, or actshorter than 16 characters on/Solver/cd. Fix the request before retrying.
Results depend on the target's configuration and on your network path. This page lists symptoms and their documented causes and does not predict outcomes.
Is an empty /tl response a solver bug?
Not necessarily. The API reference lists a stale x-kpsdk-v and a mismatched timezone or exit IP as causes, so check those before you retry.
Compare your failing session with one that works. Your tz and tzOffset should describe the exit IP that sent /fp, and your ips.js URL should be the latest one. However, if both match and the response is still empty, the site is declining the payload, so change one variable at a time instead of retrying in a loop.
Key takeaways
Three rules follow from the documented rows of Table 1: refresh ct after every /tl, generate cd per request, and read v from the latest ips.js URL. Each rule has a public source in the Evidence section below, and nothing else is claimed.
ctchanges during a session: always send the newest value returned by the target.cdis single-use: one proof per protected request, generated just before sending.vcomes from the served script: never store it in configuration.
Conclusion and Architecture Recommendations
Treat the Kasada headers as three groups: session state (ct and the cookie jar), per-script values (v, im, dt) and per-request proof (cd). Keep each group in its own part of the client so a rotation or a refresh touches one place.
- Session object: hold the cookie jar and the latest
cttogether, and replace both after each/tlresponse. - Script cache keyed by version: store
ips.jsandimagainst thex-kpsdk-vstring, and evict on any change. - Just-in-time proof: call
POST /Solver/cdinside the request function, never from a queue. - Header logging by name only: log which
x-kpsdk-*names were present, as the script above does, and keep values out of logs.
Scope and limitations. This reference reflects Catmouse documentation and published posts as of 2026-11-13. The vendor does not publish a header specification that Catmouse can cite, so names without a documented failure signature are marked as such and unverified behavior is left out. Protections change, and no success rate or latency figure is stated. Use it only on systems you own or are authorized to test. Pricing is on the pricing page and the endpoints are in the API reference.
Evidence and sources
Every statement on this page traces to the Catmouse OpenAPI contract, the Catmouse API reference, an earlier published Catmouse post or an IETF RFC. The sources below name what each one supports and the date it was reviewed.
- Catmouse OpenAPI 3.1 specification (
/openapi.json) and API reference. Supports: the 429 on/fpin the sequence, EMPTY_R andx-kpsdk-ron/tlin the reference, and the fieldsctToken,imHeader,kpsdkVprefixes,fcHeader,hHeader,dvHeader,dtHeaderand the returned headers map. Reviewed 2026-11-13. - Single-use x-kpsdk-cd headers and clock skew. Supports:
cdlifetime,ctrefresh on/tl,invalid_ct. Reviewed 2026-11-13. - x-kpsdk-v rotations and reload handling. Supports: the
rheader carrying timing anchors and its absence on rejected submissions. Reviewed 2026-11-13. - Kasada mobile SDK telemetry. Supports:
/mfcand thefc,handdvheaders. Reviewed 2026-11-13. - Catmouse Kasada site walkthrough, travel example. Supports: the observation that
KP_UIDzshows in the client's cookie jar and is not returned by the API. Reviewed 2026-11-13. - IETF RFC 9110 (HTTP Semantics). Supports: case-insensitive field names. RFC 6265. Supports:
Set-CookieandCookie. RFC 6585. Supports: status 429. Fetched 2026-11-13.
Methodology and limits. The page states only what the public Catmouse documents and the cited RFCs support. Target-side reactions to wrong header values are not documented publicly, so they are omitted. Reviewed 2026-11-13.
Frequently asked questions
The five answers below cover the session token, the single-use proof, the version string, the cookie and the part of the API surface that returns these headers. Each answer repeats the structured data on this page word for word.
What does the x-kpsdk-ct header do?
x-kpsdk-ct is the session token. In the Catmouse reference sequence the target returns it on the /fp 429 response and refreshes it on /tl, and the client sends the newest value on /tl and on protected requests.
Can an x-kpsdk-cd value be reused?
No. x-kpsdk-cd is a single-use proof with embedded timing anchors. Generate one immediately before each protected request, because a reused or early-generated value is rejected as used or expired.
Why must x-kpsdk-v match the ips.js you fetched?
x-kpsdk-v names the script build that produced the submission. If a client caches an older script or hardcodes an old version after the target rolls a new build, the header and payload diverge from what the edge expects.
Which cookie shows up in a Kasada session?
Published Catmouse posts describe KP_UIDz as the cookie that Kasada-protected sites commonly show in the client's cookie jar. That is an observation and the Catmouse API does not return it. Handle it like any session cookie under RFC 6265.
Which of these headers does the Catmouse API return?
POST /Solver/solve returns x-kpsdk-ct, x-kpsdk-dt, x-kpsdk-im and x-kpsdk-v for /tl, and native SDK solves add fc, h and dv. POST /Solver/cd returns the x-kpsdk-cd value. The x-kpsdk-r header and the cookies come from the target.