GET /sign-request.ashx?ca Open #
The relying-party CA certificate the wallet pins (PEM).
Responses
200— PEM
Everything behind sign-request.html: upload PDFs, sign them with CodeB Wallet by scanning a QR code, and invite other people by e-mail to sign one after another. The wallet endpoints are capability URLs (128-bit step ids, rate-limited); the requester endpoints need the site’s sign-in.
api=create): 1–10 PDFs, the level (advanced, or qualified = a signature card whose certificate states a qualified signature), optionally “I sign first” and up to 5 invited people (guests: 2) in signing order.eudi-rqes://?client_id=x509_san_dns:<host>&request_uri=<host>/sign-request.ashx?r=<sid>: the requester as a QR code on the page, an invited person by e-mail.?r=), checks it against the pinned CA (?ca), shows who asks and every document (?doc=), signs with the person's signature card (NFC) or the CodeB signing service, and posts the signed PDFs to ?respond= — or declines.?final=).Wallet side designed to follow the OpenID4VP-based signing request of ETSI TS 119 432 and ARF 3.0 topic 16; not certified. “Qualified” is shown only when the signer's certificate states it; there is no trusted-list check. Your own turn stays open 24 hours, an invited person's 72 hours; requests are kept 30 days after they close. Each account sees only its own requests.
CodeB Wallet creates signing requests with this API too: share one or more PDFs to the app and choose who signs – see signing requests from the phone. Visible signature boxes keep a PDF/A-3 e-invoice valid (details).
/sign-request.ashx?ca Open #The relying-party CA certificate the wallet pins (PEM).
200 — PEM/sign-request.ashx?r={sid} Open #Signed request object of the active step (OpenID4VP, ETSI TS 119 432). Fresh ES256 JWT, typ oauth-authz-req+jwt, exp 15 minutes, x5c chain to the CA from ?ca. Claims: client_id x509_san_dns:<host>, response_mode direct_post, response_uri, state, nonce, signatureQualifier (eu_eidas_qes / eu_eidas_aes), documentDigests (label + SHA-256 per document), documentLocations (?doc URLs). The wallet link is eudi-rqes://?client_id=...&request_uri=<this URL>. When the requester placed a visible signature field for this signer: codeb_signature_fields = [{document (index into documentDigests), name (the empty field in the PDF, e.g. CodeB_Signer1), page, rect (hint for a preview; the field in the PDF counts), appearance (allowed: handwritten, id_image, name_only), required_visible, handwritten_image? {uri, hash}}]. handwritten_image is present only when the signer drew a signature on the web page (GET ?sigimg=); hash = SHA-256 of the PNG, base64. The answer must sign into exactly that field; when required_visible the field needs a visible appearance. A wallet that cannot show it answers error=access_denied with error_description=signature_appearance_unavailable.
sid (path, required) — string200 — JWT404 — Unknown step409 — not_yet: earlier signers have not signed410 — request_closed429 — Rate limit/sign-request.ashx?doc={sid}.{n}.{token} Open #Input PDF n of the active step (original or the previous signer's PDF).
sid (path, required) — stringn (path, required) — integertoken (path, required) — string200 — PDF404 — Unknown410 — Closed429 — Rate limit/sign-request.ashx?respond={sid} Open #Wallet answer (direct_post): signed PDFs or a decline. Each signed PDF must be an incremental update of the input, byte for byte, with one verifying CMS signature; changes that could hide or replace content are refused; the PAdES level is reported. Idempotent for the same state and body. When an invited signer's answer is accepted, a guest account's signatures for it do not count toward its daily limit. With a visible signature field for this signer the signed PDF must have signed exactly that field (position unchanged, no other field signed; with required_visible a visible appearance); otherwise the answer is refused.
sid (path, required) — string{
"state": "...",
"documentWithSignature": "...",
"error": "user_cancelled"
}
200 — Accepted400 — invalid_request or invalid_signed_document (with the reason)404 — Unknown410 — request_closed{}
/sign-request.ashx?invite={sid} Open #Invited person's page data (documents, who asks, own turn, wallet link, downloads). sign_field {width, height (points), drawn} is present on the person's turn when a visible signature field is placed for them and handwritten is allowed: the page offers to draw the signature (POST ?sigimg=).
sid (path, required) — string200 — Page data404 — Unknown{}
/sign-request.ashx?sigimg={sid} Open #Store (or remove) the signature the signer drew on the web page. For the signer of the ACTIVE step when a visible signature field is placed for them and handwritten is allowed. Body: the drawing as a transparent PNG (twice the field size, longest side at most 1200 px, at most 100 KB). It is kept until the step ends (signed, declined, withdrawn or expired) and offered to the wallet as codeb_signature_fields[].handwritten_image. A new drawing replaces the old one; clear=1 (no body) removes it. 20 per minute per IP. The step id is the capability (no sign-in).
sid (path, required) — stringclear (query) — 1 = remove the drawing(the PNG itself)
200 — Stored or removed400 — appearance_image_invalid (the PNG is not usable)404 — Unknown step409 — no_signature_field410 — request_closed (the step is not active)413 — appearance_image_invalid: more than 100 KB415 — invalid_request: image/png expected429 — Rate limit{
"drawn": true
}
/sign-request.ashx?sigimg={sid}.{token} Open #The drawn signature (PNG) for the wallet. The URI in codeb_signature_fields[].handwritten_image of the request object. Answers only while the step is active. hash in the claim = SHA-256 of exactly these bytes, base64.
sid (path, required) — stringtoken (path, required) — string200 — PNG404 — Unknown410 — request_closed429 — Rate limit/sign-request.ashx?final={sid}.{n}.{token} Open #Signed PDF for an invited signer, once everyone has signed.
sid (path, required) — stringn (path, required) — integertoken (path, required) — string200 — PDF404 — Unknown or not yet signed/sign-request.ashx?verify={sid}.{n}.{token} Open #Signature report of the final signed PDF (invited signer). Same token as final=. Every signature in the PDF is checked: integrity of the signed revision, later changes, certificate and timestamp. No check against the EU trusted lists.
sid (path, required) — stringn (path, required) — integertoken (path, required) — string200 — Report404 — Unknown or not yet signed503 — busy (two reports at a time){
"status": "valid",
"summary": "...",
"size": 0,
"trust_note": "...",
"signatures": [
{
"index": 0,
"revision_end": 0,
"covers_whole_file": true,
"subfilter": "...",
"kind": "signature",
"status": "valid",
"integrity": true,
"later_changes": "none",
"later_changes_detail": "...",
"signer": "..."
}
]
}
Bearer access token of this site’s own sign-in (client codeb-admin). Any account, guests included.
/sign-request.ashx?api=create Bearer #Create a signing request. 1-10 PDFs (40 MB each, 50 MB together), signature level qes (signature card whose certificate states a qualified signature) or aes, optional note, self=1 to sign first, invited e-mails in signing order (up to 5; guests 2; 20 invitations a day). Your own turn stays open 24 h, an invited person's 72 h; requests are kept 30 days after they close. The first invited signer is mailed at once when the requester does not sign first. Visible signature fields (optional): fields = JSON array [{"doc": n, "signer": 1-based signing position, "page": 1-based, "rect": [x1, y1, x2, y2] in PDF points}], at most one field per signer and document, at least 60 x 20 points, inside the page, at most 10 per document. Before the documents are hashed the server adds an empty signature field CodeB_Signer<n> per entry as an incremental update; the wallet signs into that field and draws the appearance. appearance = comma list of what the signer may use (handwritten, id_image, name_only; default all three); required_visible is no longer needed: a signer with a field always signs visibly (no invisible fallback). Without fields nothing changes. AI apps and agents: an access token from the MCP sign-in or from OpenID CIBA (scope sign_requests) works on api=create, list, status, invite, resend, withdraw, download, verify and verify-upload (not on delete, not on the card path); the request records via_agent.
{
"file": [
"(the file itself)"
],
"label": [
"..."
],
"level": "qes",
"note": "...",
"self": "0",
"invite": [
"person@example.com"
],
"fields": "[{\"doc\":0,\"signer\":1,\"page\":1,\"rect\":[72,90,272,150]}]",
"appearance": "handwritten,id_image,name_only"
}
200 — Created400 — invalid_request (with the reason)401 — Sign-in required409 — limit429 — slow_down{
"id": "...",
"status": "open",
"level": "qes",
"note": "...",
"created": "2026-10-16T10:00:00Z",
"expires": "2026-10-16T10:00:00Z",
"closed_at": "...",
"keep_until": "...",
"current": 0,
"my_turn": true
}
/sign-request.ashx?api=list Bearer #The signed-in user's own signing requests. Each account sees only its own requests.
200 — List401 — Sign-in required{
"requests": [
{
"id": "...",
"status": "open",
"level": "qes",
"note": "...",
"created": "2026-10-16T10:00:00Z",
"expires": "2026-10-16T10:00:00Z",
"closed_at": "...",
"keep_until": "...",
"current": 0,
"my_turn": true
}
]
}
/sign-request.ashx?api=status Bearer #One request (polled by the page). On the requester's own turn (my_turn) with a visible signature field placed for them: sign_field {width, height, drawn} and sid (the step id for POST ?sigimg=). Each signer also has fields: [{"doc","page","rect"}] - where that signer signs (empty without signature fields).
id (query, required) — string200 — Request401 — Sign-in required404 — Not found or another account's{
"id": "...",
"status": "open",
"level": "qes",
"note": "...",
"created": "2026-10-16T10:00:00Z",
"expires": "2026-10-16T10:00:00Z",
"closed_at": "...",
"keep_until": "...",
"current": 0,
"my_turn": true
}
/sign-request.ashx?api=invite Bearer #Add invited signers at the end of an open request.
{
"id": "...",
"emails": [
"person@example.com"
]
}
200 — Request400 — invalid_request404 — not_found409 — not_open, already_invited or limit429 — slow_down{
"id": "...",
"status": "open",
"level": "qes",
"note": "...",
"created": "2026-10-16T10:00:00Z",
"expires": "2026-10-16T10:00:00Z",
"closed_at": "...",
"keep_until": "...",
"current": 0,
"my_turn": true
}
/sign-request.ashx?api=resend Bearer #Send the invitation e-mail again to the invited person whose turn it is. Owner only, open request; at most 3 times per signer, not twice within a minute; counts as an invitation for the daily limit. The summary's mail field says whether the mail was handed to the mail server.
{
"id": "..."
}
200 — Request404 — not_found409 — not_open, not_waiting, resend_limit or limit429 — slow_down502 — mail_failed: could not be handed to the mail server{
"id": "...",
"status": "open",
"level": "qes",
"note": "...",
"created": "2026-10-16T10:00:00Z",
"expires": "2026-10-16T10:00:00Z",
"closed_at": "...",
"keep_until": "...",
"current": 0,
"my_turn": true
}
/sign-request.ashx?api=withdraw Bearer #Withdraw an open request (the invited person whose turn it was is told).
{
"id": "..."
}
200 — Done404 — not_found409 — not_open{}
/sign-request.ashx?api=delete Bearer #Delete a request and its documents.
{
"id": "..."
}
200 — Done404 — not_found409 — not_open{}
/sign-request.ashx?api=download Bearer #Download an original or the (latest) signed PDF of an own request.
id (query, required) — stringn (query, required) — integerkind (query, required) — string200 — PDF400 — invalid_request404 — Not found or no longer kept/sign-request.ashx?api=verify Bearer #Signature report of an original or signed PDF of an own request. 30 per minute per account.
id (query, required) — stringn (query, required) — integerkind (query, required) — string200 — Report400 — invalid_request401 — Not signed in404 — Not found or no longer kept429 — slow_down503 — busy{
"status": "valid",
"summary": "...",
"size": 0,
"trust_note": "...",
"signatures": [
{
"index": 0,
"revision_end": 0,
"covers_whole_file": true,
"subfilter": "...",
"kind": "signature",
"status": "valid",
"integrity": true,
"later_changes": "none",
"later_changes_detail": "...",
"signer": "..."
}
]
}
/sign-request.ashx?api=verify-upload Bearer #Signature report of any PDF (not stored). The body is the PDF itself (at most 40 MB). Nothing is stored. 10 per minute per account. The page sends a local file only when it contains signatures and the user asks for the check.
"(the file itself)"
200 — Report400 — invalid_request (not a PDF)401 — Not signed in413 — Larger than 40 MB429 — slow_down503 — busy{
"status": "valid",
"summary": "...",
"size": 0,
"trust_note": "...",
"signatures": [
{
"index": 0,
"revision_end": 0,
"covers_whole_file": true,
"subfilter": "...",
"kind": "signature",
"status": "valid",
"integrity": true,
"later_changes": "none",
"later_changes_detail": "...",
"signer": "..."
}
]
}
/sign-request.ashx?api=inspect Bearer #Page sizes and rotation of a PDF, to place signature fields. Body = the PDF (application/pdf, at most 40 MB; nothing is stored). Returns {"pages":[{"page","x1","y1","x2","y2","width","height","rotate"}],"page_count","size","min_field":[60,20],"max_fields_per_document":10}: each page's media box (inherited from the page tree) in PDF points and the page rotation (0/90/180/270), the same values the server uses to check fields in api=create. Place a field rect [x1,y1,x2,y2] inside the box (origin at its lower-left corner in PDF user space; for a rotated page convert from the displayed view). 30 calls a minute per account. Also for AI apps and agents with the permission sign_requests.
200 — Pages400 — invalid_request (not a PDF, or it could not be read)401 — sign_in_required413 — Larger than 40 MB429 — slow_downFor a national eID card read by CodeB Wallet over NFC, the server builds the PDF signature and the card signs only one hash: card-prepare returns the SHA-256 of the CMS signed attributes, the card signs it with its signing key (PIN), card-finish embeds the signature and adds a signature time stamp, validation data (OCSP / CRL) and a document time stamp as far as they can be had (PAdES B-T, B-LT, B-LTA). The PDF never leaves the server. The result is checked like every other answer before the request continues. The signature is qualified only when the card’s certificate is a qualified certificate. Overview: National eID card in CodeB Wallet.
/sign-request.ashx?op=card-prepare Bearer + DPoP #Signature card: prepare the PDF signature and get the hash the card signs. Step 1 of 2. For a signature card read by CodeB Wallet over NFC whose signing key cannot produce a PDF signature itself (the national eID card): the server builds the PDF signature, the phone only lets the card sign one hash. The PDF never leaves the server. Both calls need the signer's account access token (Authorization: Bearer, as the requester API) AND a DPoP proof; the session is bound to the account and to the DPoP key. JSON body at most 200 KB (card-finish: 64 KB). Limits: 30 per minute per IP; per hour 60 prepares / 120 finishes per IP and 30 / 60 per account. request_id is the step id from the request object link (?r=) or the request id (when the account is the requester signing its own step, or the invited e-mail address of the active step). certificate = the card's signing certificate (DER, base64url; RSA 2048-4096, keyUsage nonRepudiation, valid now; for a qes request it must state a qualified signature (qcStatements), self-signed is refused); chain = up to 4 issuing CA certificates (DER, base64url). The server adds an incremental update with an invisible signature field (SubFilter ETSI.CAdES.detached) to the PDF of this step and builds the CMS signed attributes (content-type, message-digest, ESS signing-certificate-v2, CMS algorithm protection). hash = SHA-256 of the DER signed attributes: the card signs it with RSASSA-PKCS1-v1_5 (the card adds the DigestInfo). The session lives 600 s; at most 3 open sessions per account. Several documents in one request: one session per document (document = n); the step completes when every document is signed. The DPoP proof must carry ath = base64url(SHA-256(access token)). The card certificate must chain to the national eID card CA certificates installed on the server (see eidmt-status) with keyUsage nonRepudiation and must pass the revocation check (OCSP / CRL, fails closed): otherwise 400 certificate_refused or 503 revocation_unavailable; with no CA installed card-prepare answers 503 not_configured. Visible signature field: when the requester placed a field for this signer, the server signs into that field (no invisible field) and draws the appearance: the image on the left (at most 45 % of the width), right of it "Digitally signed by", the name from the certificate (letters outside WinAnsi without the diacritic) and "<yyyy-MM-dd HH:mm UTC> · CodeB Wallet". appearance = handwritten | id_image | name_only (default: handwritten when an image is sent, else name_only); appearance_image = PNG, base64url, at most 100 KB, longest side at most 1200 px, not interlaced. Without a field both are ignored. 400 appearance_image_invalid (image not usable), 400 invalid_request (appearance not allowed for this request), 422 signature_appearance_unavailable (the request allows only image kinds and no image was sent).
{
"request_id": "Zt3pQ8vK1mWc",
"certificate": "MIIF...base64url DER...",
"chain": [
"MIIG...issuing CA..."
],
"document": 0,
"appearance": "handwritten",
"appearance_image": "(PNG, base64url)"
}
200 — Prepared400 — invalid_certificate (with the reason) / invalid_request (request_id, document) / certificate_refused (chain to the installed eID CAs, key usage or revocation)401 — sign_in_required (Bearer) or invalid_dpop_proof (WWW-Authenticate: DPoP)404 — not_found: unknown request, or the account is not the signer of the active step405 — method_not_allowed409 — not_yet: the earlier signers have not signed yet410 — request_closed415 — invalid_request: application/json expected422 — unsupported_document: the PDF cannot take an incremental signature (with the reason)429 — rate_limited / slow_down503 — not_configured (no national eID CA certificates installed) / revocation_unavailable (OCSP / CRL could not be checked){
"session": "q9Wd2LrX7cVb",
"hash": "x3Jt0k3bTq4Wm2u7lq3l0c9yJ8d1Pz6hV5sG4fE2aB0",
"algorithm": "RSASSA-PKCS1-v1_5-SHA256",
"expires_in": 600
}
/sign-request.ashx?op=card-finish Bearer + DPoP #Signature card: send the card's signature; the server finishes and checks the PAdES signature. Step 2 of 2. For a signature card read by CodeB Wallet over NFC whose signing key cannot produce a PDF signature itself (the national eID card): the server builds the PDF signature, the phone only lets the card sign one hash. The PDF never leaves the server. Both calls need the signer's account access token (Authorization: Bearer, as the requester API) AND a DPoP proof; the session is bound to the account and to the DPoP key. JSON body at most 64 KB. Limits: 30 per minute per IP; per hour 60 prepares / 120 finishes per IP and 30 / 60 per account. signature = the raw RSA PKCS#1 v1.5 signature of hash (base64url). The server checks it against the certificate and the prepared hash, builds the CMS and embeds it, then adds what can be had: a signature time stamp (PAdES B-T), OCSP responses / CRLs in a DSS (B-LT) and a document time stamp (B-LTA). Every level reached is validated like a signature from the wallet, the highest one that passes is delivered and the step continues (next signer or completion). level says what was reached; reason says why a higher level was not reached. The signature is qualified only when the card's certificate is a qualified certificate; the PAdES level does not make it qualified. The session is used up by this call, also when it fails. The DPoP proof must carry ath = base64url(SHA-256(access token)). The card certificate must chain to the national eID card CA certificates installed on the server (see eidmt-status) with keyUsage nonRepudiation and must pass the revocation check (OCSP / CRL, fails closed): otherwise 400 certificate_refused or 503 revocation_unavailable; with no CA installed card-prepare answers 503 not_configured.
{
"session": "q9Wd2LrX7cVb",
"signature": "Vb8...base64url..."
}
200 — Signed400 — signature_invalid (prepare again) / invalid_certificate / invalid_signed_document / invalid_request / certificate_refused (chain to the installed eID CAs, key usage or revocation)401 — sign_in_required or invalid_dpop_proof409 — session_expired: unknown, used, expired, or of another account or DPoP key - prepare again410 — request_closed415 — invalid_request429 — rate_limited / slow_down500 — server_error: the signature could not be built503 — not_configured (no national eID CA certificates installed) / busy / revocation_unavailable (OCSP / CRL could not be checked){
"status": "signed",
"level": "B-LTA"
}
An AI app connects with one address: the person adds https://phone.codeb.io/mcp to the app, the app finds the sign-in by itself (RFC 9728 → RFC 8414, issuer https://phone.codeb.io/mcp-auth), the person signs in and chooses Allow on mcp-connect.html, and the app receives one-hour access tokens (scope = the permissions the person ticked: sign_requests, age_checks, meetings, cards for administrators; renewed with a rotating refresh token) for the MCP server and, with sign_requests, this API. Agents without a screen use OpenID CIBA instead: the agent asks, the person approves on agent-approvals.html. Apps and agents never sign and cannot delete requests; the person removes them on agent-approvals.html. Guide: AI agents.
A program without a browser window of its own – an invoicing tool, a PDF editor, a script on a server – signs in to this API as an agent: its own login with OpenID CIBA (poll mode), never the person’s password. An agent prepares, follows, withdraws and downloads signing requests for one person. It can never sign: every signature is made by that person in CodeB Wallet.
client_id (the agent ID, agent- followed by 32 hex characters), client_secret, login_hint (the person’s user name), the CIBA and token endpoints and two sample requests.scope=openid sign_requests, login_hint and a short binding_message (at most 64 characters, for example a 4-digit code) – show the same code in your program.requested_expiry 60–600 s); at most 2 open requests per agent.grant_type=urn:openid:params:grant-type:ciba and the auth_req_id every interval seconds (5): authorization_pending = keep waiting, slow_down = wait longer, access_denied / expired_token = stop.Authorization: Bearer … to api=create, api=status, api=invite, api=withdraw and api=download. api=delete stays with the person (403 not_for_agents).my_turn: true and link – show it as a QR code so the person can sign with CodeB Wallet without leaving your program.Agents do not expire on their own; they stay until the person removes them. Apps connected through the MCP sign-in (no secret) are different: their access ends after 30 days without use.
/.well-known/oauth-protected-resource/mcp Open #Protected Resource Metadata of the MCP server at /mcp (RFC 9728). resource = https://phone.codeb.io/mcp, authorization_servers = [https://phone.codeb.io/mcp-auth], scopes_supported [sign_requests, age_checks, meetings, cards], bearer_methods_supported [header]. The 401 of /mcp points here in WWW-Authenticate resource_metadata. /mcp.ashx has the same document with resource https://phone.codeb.io/mcp.ashx (/.well-known/oauth-protected-resource/mcp.ashx or /mcp.ashx?resource-metadata).
200 — resource, authorization_servers, scopes_supported, bearer_methods_supported/.well-known/oauth-authorization-server/mcp-auth Open #OAuth 2.0 Authorization Server Metadata of the MCP sign-in (RFC 8414). Issuer https://phone.codeb.io/mcp-auth (RFC 8414 path insertion). authorization_endpoint /mcp-auth/authorize, token_endpoint /mcp-auth/token, registration_endpoint /mcp-auth/register, revocation_endpoint /mcp-auth/revoke; response_types [code]; grant_types [authorization_code, refresh_token]; code_challenge_methods_supported [S256]; token_endpoint_auth_methods_supported [none] (public clients); scopes_supported [sign_requests, offline_access]; client_id_metadata_document_supported true; authorization_response_iss_parameter_supported true (RFC 9207). Separate from the OpenID provider of the site: the sign-in of people and of CodeB Wallet is unchanged.
200 — Authorization server metadata/mcp-auth/authorize Open #MCP sign-in: authorization request of an AI app (OAuth 2.1 authorization code + PKCE). MCP authorization (2026-07-28). client_id = the HTTPS URL of the app's Client ID Metadata Document (fetched by the server: https only, public addresses only, no redirects, at most 5 KB, client_id must equal the URL, no client secret; cached one hour) or a client_id from /mcp-auth/register. redirect_uri must be one of the app's redirect_uris (https, or http on localhost/127.0.0.1/[::1] with any port). response_type=code, code_challenge with code_challenge_method=S256 (required), resource = https://phone.codeb.io/mcp or https://phone.codeb.io/mcp.ashx (RFC 8707; default /mcp), scope: any of sign_requests, age_checks, meetings, cards (none = all four; offline_access and openid are accepted; the consent page shows one checkbox per permission, cards only to administrators). The person is sent to /mcp-connect.html, signs in as usual and sees the app name, its website (for metadata documents), the host it returns to and a warning for localhost apps; Allow redirects back with code, state and iss (RFC 9207), Deny with error=access_denied. An invalid client_id or redirect_uri is never redirected to.
GET /mcp-auth/authorize?response_type=code&client_id=https%3A%2F%2Fapp.example%2Foauth%2Fclient.json&redirect_uri=http%3A%2F%2F127.0.0.1%3A33418%2Fcallback&code_challenge=E9Mel...&code_challenge_method=S256&resource=https%3A%2F%2Fphone.codeb.io%2Fmcp&scope=sign_requests&state=af0ifjsldkj
302 — To /mcp-connect.html (consent) or back to redirect_uri with error, state and iss/mcp-auth/token Open #MCP sign-in: token request (authorization_code with PKCE, refresh_token). Public clients only (no client secret). grant_type=authorization_code: code (once, 2 minutes; a second use ends the connection), redirect_uri, client_id, code_verifier (S256), resource optional (must equal the authorization request). grant_type=refresh_token: refresh_token, client_id; the refresh token is rotated on every use (30 days), presenting a rotated-away one ends the connection. Answer: access_token (JWT, 1 hour, aud = the MCP server URL, scope = the permissions the person ticked, act.sub = client_id, role agent - guest for a guest account), token_type Bearer, expires_in, refresh_token, scope. The token works only on the MCP server and the signing requests API, never as a sign-in; it stops working within a minute when the person removes the app.
grant_type=authorization_code&code=...&redirect_uri=http%3A%2F%2F127.0.0.1%3A33418%2Fcallback&client_id=https%3A%2F%2Fapp.example%2Foauth%2Fclient.json&code_verifier=...&resource=https%3A%2F%2Fphone.codeb.io%2Fmcp
200 — Tokens400 — invalid_grant, invalid_target, unsupported_grant_type, invalid_request401 — invalid_client (client authentication sent)429 — Rate limit/mcp-auth/register Open #MCP sign-in: dynamic client registration (RFC 7591, for apps without a Client ID Metadata Document). Public clients only: redirect_uris (1-10; https, or http on localhost/127.0.0.1/[::1]), client_name (shown to the person as given, marked as not confirmed by a website), client_uri, grant_types (authorization_code, refresh_token), response_types (code). token_endpoint_auth_method is always none. Rate limited per address.
{"client_name":"My AI app","redirect_uris":["http://127.0.0.1:33418/callback"],"grant_types":["authorization_code","refresh_token"],"token_endpoint_auth_method":"none"}
201 — client_id, client_id_issued_at, client_name, redirect_uris, grant_types, response_types, token_endpoint_auth_method400 — invalid_redirect_uri, invalid_client_metadata429 — Rate limit/mcp-auth/revoke Open #MCP sign-in: revoke a refresh token (RFC 7009). token = the app's refresh token: the connection ends. Always 200.
200 — Done/oidc.ashx?action=mcp-request Bearer #Consent page: what an app asks for. Used by mcp-connect.html. id = the request id from the page fragment. Returns client_name, client_id, client_uri, verified_site (host of the metadata document URL; null for registered apps), redirect_host, localhost, scope (the permissions the app asks for), resource, user, is_admin (whether the page may offer cards), expires_in (seconds; requests last 15 minutes).
200 — Request details401 — login_required404 — not_found (expired)/oidc.ashx?action=mcp-decide Bearer #Consent page: allow or deny an app. Body {"id","decision":"allow"|"deny","scopes":[permissions the person ticked]} (scopes optional: missing = all the app asked for; cards only for administrators; allow with an empty list gives 400). Returns {"ok":true,"redirect":"<redirect_uri with code, state, iss or error=access_denied>"}; the page navigates there. A request can be decided once.
200 — ok + redirect401 — login_required409 — not_possible (expired or already answered)/oidc.ashx?action=mcp-connections Bearer #The apps the person connected. Returns {"connections":[{"id","name","client_id","redirect_host","created","last_used"}],"mcp_url":"https://phone.codeb.io/mcp"}. Each connection also has scope (the permissions the person ticked).
200 — Connections401 — login_required/oidc.ashx?action=mcp-connection-delete Bearer #Remove a connected app. Body {"id"}. The app's refresh token ends at once, its access token within a minute.
200 — ok401 — login_required404 — not_found/oidc.ashx?action=bc-authorize Agent client #OpenID CIBA backchannel authentication request of an agent. OpenID Connect Client-Initiated Backchannel Authentication Core 1.0, poll mode (discovery: backchannel_authentication_endpoint, backchannel_token_delivery_modes_supported [poll]). The agent client (created by the person on agent-approvals.html; client_id agent-<32 hex>) authenticates with client_secret_basic or client_secret_post and asks its owner: login_hint = the owner's user name or e-mail, scope = 'openid sign_requests' (nothing else is available to agents), binding_message = a short code (at most 64 characters) the agent also shows, requested_expiry 60-600 s (default 300). The person gets an e-mail and approves or denies on agent-approvals.html. Then poll the token endpoint with grant_type=urn:openid:params:grant-type:ciba and the auth_req_id every interval seconds. Signed requests (request), login_hint_token, id_token_hint and user_code are not supported. At most 2 open requests per agent and 5 per person (access_denied); the person gets at most one e-mail every five minutes per agent. Rate limits per address and per agent (429 slow_down). Clients other than agent clients get unauthorized_client.
scope=openid sign_requests&login_hint=alice&binding_message=4711 (client_secret_basic)
200 — Request accepted400 — invalid_request, invalid_scope, unknown_user_id (not the agent's owner), invalid_binding_message401 — invalid_client429 — slow_down: too many open requests{
"auth_req_id": "...",
"expires_in": 300,
"interval": 5
}
/oauth2/v1/token Agent client #OpenID CIBA token request of an agent (grant urn:openid:params:grant-type:ciba). CIBA (poll mode): until the person decides the answer is 400 authorization_pending; polling faster than interval gives slow_down (interval +5 s); then access_denied, expired_token, or 200 with access_token (1 hour, aud = the agent client, scope sign_requests, act.sub = the agent, role agent - guest for a guest account -, no auth_time) and id_token; no refresh_token. The auth_req_id can be redeemed once. A token of an agent is accepted only by the signing requests API and the MCP server; every other endpoint (including userinfo and token introspection without resource=sign_requests) treats it as invalid, and it stops working within a minute after the person removes the agent.
grant_type=urn:openid:params:grant-type:ciba&auth_req_id=... (client_secret_basic)
200 — Access + optionally id + refresh tokens400 — {
"access_token": "...",
"token_type": "Bearer",
"expires_in": 3600,
"id_token": "...",
"scope": "openid sign_requests"
}
/oidc.ashx?action=agent-approvals Bearer #The person's open agent requests (to approve or deny). Bearer = the person's own access token (aud codeb-admin; agent tokens are refused). Used by agent-approvals.html.
200 — Open requests401 — login_required/oidc.ashx?action=agent-decide Bearer #Approve or deny an agent request. Bearer = the person's own access token. An approval lets the agent collect one access token (1 hour, scope sign_requests) at the token endpoint.
{"id": "...", "decision": "approve"}
200 — Done400 — invalid_request401 — login_required409 — not_possible: unknown, already answered, expired or agent removed/oidc.ashx?action=agent-clients Bearer #The person's agents and the endpoints they use.
200 — Agents401 — login_required/oidc.ashx?action=agent-client-create Bearer #Add an agent (client_id + client_secret, the secret is shown once). At most 10 agents per person. An agent client may only ask its owner (login_hint).
{"name": "Contracts assistant"}
200 — Created400 — invalid_request401 — login_required/oidc.ashx?action=agent-client-delete Bearer #Remove an agent. Its open requests end at once; an access token it already holds stops working within a minute.
{"client_id": "agent-..."}
200 — Removed401 — login_required404 — not_found/mcp.ashx Bearer #MCP server 'CodeB' (Model Context Protocol, Streamable HTTP, JSON responses). JSON-RPC 2.0 messages: initialize (protocol versions 2025-06-18, 2025-03-26, 2024-11-05), ping, tools/list, tools/call; notifications get 202. No server-sent event stream, no session id, no batches. Also at the clean address /mcp, the address people paste into their AI app (same server). Bearer = the access token of an app the person allowed with the MCP sign-in (authorization server https://phone.codeb.io/mcp-auth; aud = this server's URL) or of an agent that received it through OpenID CIBA after the person's approval (oidc.ashx?action=bc-authorize, then the token endpoint with grant_type urn:openid:params:grant-type:ciba). No other token is accepted. Agent tokens are accepted only here and by the signing requests API, and stop working within a minute after the person removes the agent. Without a valid token: 401 with WWW-Authenticate resource_metadata (RFC 9728). Messages that cannot be parsed or are not valid JSON-RPC get HTTP 400; JSON-RPC responses sent by the client get 202. Only for hosts this site serves. Tools: inspect_pdf, create_signing_request (documents, level aes|qes, sign_myself, invite, note, signature_fields with rect or position bottom-left|bottom-center|bottom-right, appearance, required_visible; at most 12 MB of PDFs), list_signing_requests, get_signing_request, invite_signers, resend_invitation, withdraw_signing_request, get_document (at most 8 MB), verify_document. The tools use the signing requests API with the same token, so all its rules apply. Agents cannot sign and cannot delete requests. Requests with a foreign Origin are refused. Permissions (scopes) the person ticks when connecting the app: sign_requests (the signing tools above), age_checks (create_age_check {reference, days 1-30}, get_age_check, list_age_checks, cancel_age_check: a link /check?c=<id> for one customer, who confirms 18+ with an EUDI wallet (proof of age eu.europa.ec.av.1); the app gets only age_over_18 true/false, nobody is signed in), meetings (create_meeting {title, start ISO 8601 with time zone, duration_minutes 5-720, note, invite[] up to 20 e-mail addresses}, list_meetings, get_meeting, invite_to_meeting, cancel_meeting: a browser video meeting room.html?room=mt-..., e-mail invitations with invite.ics; at most 100 invitation e-mails per person and day; guest accounts cannot e-mail invitations), cards (administrators only: list_card_templates, issue_card {template_id, member, delivery email_link|sign_in|wallet, days, given_name + family_name for a new guest}, list_card_offers, revoke_card_offer; existing templates only). tools/list shows only the tools of the token's permissions; other tools answer isError. Agents connected with OpenID CIBA keep sign_requests only.
{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
200 — JSON-RPC response202 — Notification accepted401 — Authorization required (WWW-Authenticate: Bearer resource_metadata=...)403 — Origin not allowed405 — GET/DELETE: no event stream, no sessions413 — Larger than 20 MB415 — application/json expected429 — Rate limit/mcp Bearer #MCP server 'CodeB' at the clean address /mcp (the address people paste into their AI app). JSON-RPC 2.0 messages: initialize (protocol versions 2025-06-18, 2025-03-26, 2024-11-05), ping, tools/list, tools/call; notifications get 202. No server-sent event stream, no session id, no batches. Also at /mcp.ashx (same server). Bearer = the access token of an app the person allowed with the MCP sign-in (authorization server https://phone.codeb.io/mcp-auth; aud = this server's URL) or of an agent that received it through OpenID CIBA after the person's approval (oidc.ashx?action=bc-authorize, then the token endpoint with grant_type urn:openid:params:grant-type:ciba). No other token is accepted. Agent tokens are accepted only here and by the signing requests API, and stop working within a minute after the person removes the agent. Without a valid token: 401 with WWW-Authenticate resource_metadata (RFC 9728). Messages that cannot be parsed or are not valid JSON-RPC get HTTP 400; JSON-RPC responses sent by the client get 202. Only for hosts this site serves. Tools: inspect_pdf, create_signing_request (documents, level aes|qes, sign_myself, invite, note, signature_fields with rect or position bottom-left|bottom-center|bottom-right, appearance, required_visible; at most 12 MB of PDFs), list_signing_requests, get_signing_request, invite_signers, resend_invitation, withdraw_signing_request, get_document (at most 8 MB), verify_document. The tools use the signing requests API with the same token, so all its rules apply. Agents cannot sign and cannot delete requests. Requests with a foreign Origin are refused. Permissions (scopes) the person ticks when connecting the app: sign_requests (the signing tools above), age_checks (create_age_check {reference, days 1-30}, get_age_check, list_age_checks, cancel_age_check: a link /check?c=<id> for one customer, who confirms 18+ with an EUDI wallet (proof of age eu.europa.ec.av.1); the app gets only age_over_18 true/false, nobody is signed in), meetings (create_meeting {title, start ISO 8601 with time zone, duration_minutes 5-720, note, invite[] up to 20 e-mail addresses}, list_meetings, get_meeting, invite_to_meeting, cancel_meeting: a browser video meeting room.html?room=mt-..., e-mail invitations with invite.ics; at most 100 invitation e-mails per person and day; guest accounts cannot e-mail invitations), cards (administrators only: list_card_templates, issue_card {template_id, member, delivery email_link|sign_in|wallet, days, given_name + family_name for a new guest}, list_card_offers, revoke_card_offer; existing templates only). tools/list shows only the tools of the token's permissions; other tools answer isError. Agents connected with OpenID CIBA keep sign_requests only.
200 — JSON-RPC response202 — Notification or JSON-RPC response accepted401 — Sign-in required: WWW-Authenticate: Bearer resource_metadata="https://<host>/.well-known/oauth-protected-resource/mcp", scope="sign_requests age_checks meetings cards"403 — Origin not allowed405 — GET/DELETE: no event stream, no sessions413 — Larger than 20 MB415 — application/json expected429 — Rate limit400 — Parse error or invalid JSON-RPC message (JSON-RPC error in the body); unsupported MCP-Protocol-Version404 — Unknown host/check?c=<id> Open #Age check page for a customer (created by an AI app with the permission age_checks). HTML page (English or German by browser language). c = the age check id from create_age_check (a bearer link: no-store, no-referrer, noindex). The customer starts a wallet request (POST /check.ashx?api=start&c=<id> -> {link: openid4vp://...}, also shown as a QR code) and the page polls GET /check.ashx?api=status&c=<id> -> {status: open|waiting|done|cancelled|expired, age_over_18 when done}. The site's verifier asks only for age_over_18 of a proof of age (eu.europa.ec.av.1); nobody is signed in; the requester learns only yes or no. 60 requests per minute per address; the verifier's own limits apply to the customer's address.
200 — The page404 — Unknown age check (page with a message)429 — Too many requests/mcp.ashx?resource-metadata Open #OAuth 2.0 Protected Resource Metadata of the MCP server (RFC 9728).
200 — resource, authorization_servers, scopes_supported, bearer_methods_supportedYes, after the person allows it. An AI app: add https://phone.codeb.io/mcp as a connector or MCP server, sign in and choose Allow (MCP sign-in, OAuth 2.1 with PKCE). An agent without a screen: OpenID CIBA (oidc.ashx?action=bc-authorize, then the token endpoint with grant_type urn:openid:params:grant-type:ciba). Both get tokens with scope sign_requests for this API and the MCP server. Every signature is still made by a person in CodeB Wallet.
Yes. api=create takes fields (one box per signer: document, signer position, page, rect in PDF points), appearance (handwritten, id_image, name_only; at least one; the signer chooses one). A signer with a field always signs visibly. The server adds an empty signature field per box before hashing; each signer fills their field in CodeB Wallet with a drawn signature, the signature image from the ID document or their name, plus the PAdES signature. Step-by-step guide: howto-signature-fields.html.
Open sign-request.html, sign in, upload the PDF, choose whether you sign first and enter the e-mail addresses of the people who should sign, in order. Each person gets an e-mail when it is their turn and signs in CodeB Wallet; at the end everyone gets a link to the signed PDF.
Advanced: any signature source in CodeB Wallet, the person's signature card or the CodeB signing service. Qualified: only a signature card whose certificate states a qualified signature. CodeB shows 'qualified' only as stated in the certificate; it does not check the EU trusted lists.
That it is an incremental update of exactly the PDF the signer received, with one CMS signature that verifies and a certificate valid at the signing time, and that no change could hide or replace content. The PAdES level (B-B, B-T, B-LT, B-LTA) is reported.
The request list shows for the invited person whose turn it is whether the e-mail was handed to the mail server or failed, and a 'Send e-mail again' button (at most 3 times, once a minute).
Yes. The viewer on sign-request.html lists every signature on the right, like a desktop PDF reader: whether the signed part is unchanged, whether anything was changed afterwards, who signed, the certificate and any timestamp. The same report is available from the API (api=verify, api=verify-upload, verify=). Certificates are not checked against the EU trusted lists.
Yes, when a time-stamp server answers: CodeB Wallet asks the CodeB time-stamp service (/rqes/csc/v2/signatures/timestamp, then /rqes/csc/v2/signatures/tsa as fallback) and embeds the token, so the signature is PAdES-B-T. If neither answers, the PDF is signed without a time stamp (PAdES-B-B). The signature report shows which one a signature has.
No. A guest account can sign 5 documents per UTC day with the CodeB signing service; signatures given as an invited signer in someone else's request are given back once the request accepts the signed PDF.
Yes, when CodeB Wallet reads the card: the server prepares the PDF signature and sends the phone only the hash to sign (card-prepare), the card signs it after you enter its PIN, and the server finishes the PAdES signature with a time stamp and validation data as far as they can be had (card-finish). The PDF stays on the server. The signature is qualified only when the card's certificate is a qualified certificate.
Machine-readable: /openapi.json (OpenAPI 3.1, also at /.well-known/openapi.json) · All public APIs · Questions