asn1click docs
HTTP API: convert, generate, diagnose, discover

Base URL: https://api.asn1click.com. Plain HTTP, no authentication for the public message set. A bearer token from your asn1click account adds your own defaults and modules.

Concepts

Encodings

Identifying the message (X-Ref)

Encoding rules (X-Compat)

Optional on convert, generate and diagnose: standard (default, X.691) or asn1c, which encodes like asn1c-based stacks such as Vanetza.

Which definition was used

Responses carry X-Resolved-Ref (e.g. _cam_v2_3:CAM), X-Resolved-Message (_Cam_v2_3), X-Auto-Detected (true/false) and X-Compat. A UPER body may be a whole captured packet (Ethernet or 802.11 LLC, GeoNetworking, IEEE 1609.2 unsecured or signed, BTP): the message inside is used, and X-Unwrapped lists the layers taken off, e.g. GeoNetworking (SHB); IEEE 1609.2 signed (psid 36); BTP-B port 2001 (CAM).

Convert

POST /convert

Decode, encode or re-encode a payload. The body is the payload.

HeaderRequiredDescription
X-FromrequiredInput: UPER, WER, JER or XER.
X-TorequiredOutput: same values.
X-RefoptionalWhich definition; omit to auto-detect.
X-Compatoptionalstandard or asn1c.
X-BinaryoptionalA UPER/WER result as hex (default) or base64.

Decode UPER to JSON (auto-detect)

curl -X POST "https://api.asn1click.com/convert" \
  -H "X-From: UPER" -H "X-To: JER" \
  --data "uper:0202000004d200000059ca02160d929e71000000000030d40000000002b6800000028003ff01fff800"

# → {"header":{"protocolVersion":2,"messageId":2,"stationId":1234},"cam":{...}}

Encode JSON to UPER (explicit message)

curl -X POST "https://api.asn1click.com/convert" \
  -H "X-Ref: _Cam_v2_3" -H "X-From: JER" -H "X-To: UPER" \
  --data @cam.json

Base64 in, Base64 out

A UPER payload can be sent as Base64 instead of hex: valid hex is read as hex, anything else that decodes as Base64 (standard or URL-safe, padding optional) as Base64; prefix it with base64: to be explicit.

curl -X POST "https://api.asn1click.com/convert" \
  -H "X-From: UPER" -H "X-To: UPER" -H "X-Binary: hex" \
  --data "AgIAAATSAAAAWcoCFg2SnnEAAAAAADDUAAAAAAK2gAAAAoAD/wH/+AA="

# → uper:0202000004d2…   (and -H "X-Binary: base64" turns hex into Base64)

Generate

POST /generate

A sample message. X-Ref (required) names the message; JSON body, all optional:

FieldDescription
formatUPER (default), WER, JER or XER.
contentMINIMAL (default), RANDOM or FULL.
overrides[{"path": "…", "value": "…"}]: fields to set. Syntax in Building messages.
Since 2026-11-24 content replaces size and minimal; without it the sample is MINIMAL (it used to be a small random one).
curl -X POST "https://api.asn1click.com/generate" \
  -H "X-Ref: _Cam_v2_3" -H "Content-Type: application/json" \
  --data '{"format":"UPER","content":"RANDOM"}'

Add -H "X-Binary: base64" to get the UPER result as Base64.

Diagnose

POST /diagnose

Bit-by-bit breakdown of a UPER payload (X-From: UPER; X-Ref optional). For every field: its bits, raw value, decoded value and type, plus the structural bits (extension markers, presence bits, CHOICE indexes, lengths). A broken payload still answers 200 with what was decoded up to the failure, the field being read and the bit where it broke (error, failurePath, failureBit). Values outside their declared range are flagged in constraintViolations.

curl -X POST "https://api.asn1click.com/diagnose" -H "X-From: UPER" --data "uper:0202…"

# → {"payloadBits":344,"decodedBits":344,"paddingBits":0,"constraintViolations":0,
#    "entries":[{"start":8,"end":16,"path":"CAM.header.messageId","kind":"VALUE","bits":"00000010",
#                "value":"2","type":"MessageId (0..255)"}, ...], "decoded":{...}}

Discover

GET /message-types

The message types (CAM, DENM…), each a valid X-Ref, with a one-line summary and the version it resolves to: default, your own userDefault when signed in, and effective (the one used).

curl "https://api.asn1click.com/message-types"

# → [{"name":"CAM","rootElement":"CAM","summary":"Cooperative Awareness Message: …",
#     "default":"_Cam_v2_3","userDefault":null,"effective":"_Cam_v2_3"}, ...]

GET /messages

The pre-configured messages; each name is a valid X-Ref.

curl "https://api.asn1click.com/messages"

# → [{"name":"_Cam_v2","moduleAlias":"_cam_v2","rootElement":"CAM","description":"CAM v2",
#     "v2x":{"protocolVersion":2,"messageId":2},"options":{"fixups":["header.protocolVersion=2","header.messageID=2"]}}, ...]

GET /messages/versions

Per header identity (messageId v protocolVersion, e.g. 1v2 = DENM, protocolVersion 2): the available versions, the public default and the one used for you (effective).

GET /modules

The ASN.1 modules: moduleId (use it in moduleId:Type refs), oid, a one-line description and the number of types. Optional sort=name (default) or sort=uploaded.

curl "https://api.asn1click.com/modules"

# → [{"moduleId":"_cam_v2_3","oid":"CAM-PDU-Descriptions {itu-t(0) identified-organization(4) ...}",
#     "short":"Cooperative Awareness Message (CAM) ...","elementCount":...}, ...]

GET /index/elements?moduleId=…

The types of a module with their kind, fields, constraints, named values and ASN.1 comments.

Errors & status codes