{"revision":"9f11a31dd2951db0","language":"en","entry":{"id":"oidc-client-update","kind":"endpoint","group":"developer","title":"Change an app","method":"PATCH","path":"/v1/developer/accounts/{n}/oidc-clients/{id}","paths":[],"summary":"Name, site, redirect URIs, logout URIs, ID token algorithm and logo. The type and authentication stay.","response":"The app.","parameters":[{"name":"n","in":"path","required":true,"description":"The card that owns the apps: a person, or an organisation through an accepted owner."},{"name":"id","in":"path","required":true,"description":"The app's client_id, `veil_app_` and 32 hex characters."}],"sample":"/v1/developer/accounts/{n}/oidc-clients/{id}","access":"signed","base":"directory","notes":[],"errors":["400 invalid_json","400 invalid_nonce","400 invalid_parameter","400 invalid_signature_alg","400 invalid_timestamp","401 invalid_signature","401 missing_signature","401 stale_timestamp","403 identity_banned","403 key_banned","403 key_mismatch","404 not_found","409 replayed_nonce","413 payload_too_large","422 invalid_client_metadata","422 invalid_logo","422 invalid_redirect_uri","429 rate_limited","500 internal_error","503 busy"],"related":["sign-in-with-veil"],"sections":[{"kind":"code","language":"shell","code":"curl -fsS -X PATCH \\\n  -H \"X-Public-Key: $PUBLIC_KEY\" -H \"X-Signature: $REQUEST_SIGNATURE\" \\\n  --json @request.json \"https://veil.rip/v1/developer/accounts/1/oidc-clients/veil_app_0123456789abcdef0123456789abcdef\""}],"live":false,"responses":[{"status":200,"contentType":"application/json","description":"The app.","fields":[{"name":"id","type":"string","description":"client_id."},{"name":"name","type":"string","description":"The name the consent page shows."},{"name":"site","type":"string | null","description":"The app's https site."},{"name":"redirectUris","type":"array<string>","description":"Exact redirect URIs."},{"name":"postLogoutRedirectUris","type":"array<string>","description":"Where /oidc/logout may send the browser."},{"name":"type","type":"string","description":"public or confidential."},{"name":"authMethod","type":"string","description":"none, client_secret_basic or private_key_jwt."},{"name":"idTokenAlg","type":"string","description":"EdDSA or ES256."},{"name":"refresh","type":"boolean","description":"Whether the app gets refresh tokens."},{"name":"logo","type":"string | null","description":"The logo's address, with ?v= its hash."},{"name":"verified","type":"object | null","description":"{domain}: the owner card proves the domain of the site and of every https redirect URI."},{"name":"owner","type":"object | null","description":"{n, name, type, url} of the owner card; null for an app registered without a card."},{"name":"dynamic","type":"boolean","description":"Registered through POST /oidc/register."},{"name":"createdAt","type":"string","description":"ISO 8601 UTC."},{"name":"expiresAt","type":"string | null","description":"A dynamic app's end, 30 days after registration."},{"name":"lastUsedAt","type":"string | null","description":"Last sign-in or token."},{"name":"jwks","type":"object | null","description":"The public keys of a private_key_jwt app."}]}],"responseObjects":[],"errorFormat":"json","errorDetails":[{"status":400,"code":"invalid_json","description":"The body is not a JSON object, contains duplicate keys or has trailing data.","action":"Send one valid JSON object with `Content-Type` application/json.","scope":"endpoint"},{"status":400,"code":"invalid_nonce","description":"The signed-request nonce has an invalid format.","action":"Generate a fresh 16 to 128-character nonce using letters, digits, _ or -.","scope":"common"},{"status":400,"code":"invalid_parameter","description":"A path, query or body field is missing, malformed or outside its accepted range.","action":"Correct the field named in `error.message` before sending again.","scope":"endpoint"},{"status":400,"code":"invalid_signature_alg","description":"`X-Signature-Alg` is unsupported.","action":"Use a supported signing algorithm and matching key/signature encoding.","scope":"common"},{"status":400,"code":"invalid_timestamp","description":"The signed-request timestamp is not Unix milliseconds.","action":"Use an integer Unix timestamp in milliseconds and sign the corrected request.","scope":"common"},{"status":401,"code":"invalid_signature","description":"The HTTP request signature does not verify.","action":"Sign the exact method, path and body bytes, without changing them afterwards.","scope":"common"},{"status":401,"code":"missing_signature","description":"The request requires a device signature and its headers are missing or unreadable.","action":"Send `X-Public-Key`, `X-Signature` and the signed-request metadata. An API key does not replace a device signature.","scope":"common"},{"status":401,"code":"stale_timestamp","description":"The signed timestamp is outside the accepted clock window.","action":"Compare the server Date header with your clock, then generate a fresh nonce, timestamp and signature.","scope":"common"},{"status":403,"code":"identity_banned","description":"The acting identity is suspended by Veil staff.","action":"Wait for the restriction to end or ask staff to review it.","scope":"endpoint"},{"status":403,"code":"key_banned","description":"The device signing key is suspended by Veil staff.","action":"Use an authorised active key or ask staff to review the restriction.","scope":"common"},{"status":403,"code":"key_mismatch","description":"The signing key does not have authority over this card or operation.","action":"Use an active device key with the required owner or member role.","scope":"endpoint"},{"status":404,"code":"not_found","description":"The requested card, key, alias, code or resource was not found.","action":"Check the identifier. Temporary codes and previews may already have expired or been used.","scope":"endpoint"},{"status":409,"code":"replayed_nonce","description":"The signing key already used this nonce.","action":"Check whether the previous request succeeded before making a fresh signed request.","scope":"common"},{"status":413,"code":"payload_too_large","description":"The request body exceeds this endpoint’s byte limit.","action":"Reduce the encoded body. API-key management accepts at most 8 KiB.","scope":"endpoint"},{"status":422,"code":"invalid_client_metadata","description":"An app's field on /developers is missing or not allowed.","action":"Fix the field named in `error.message`.","scope":"endpoint"},{"status":422,"code":"invalid_logo","description":"The image fails type, size, dimensions or content validation.","action":"Correct the image according to `error.message` before uploading again.","scope":"endpoint"},{"status":422,"code":"invalid_redirect_uri","description":"A redirect URI on /developers is not https, or http outside the loopback interface.","action":"Fix the URI named in `error.message`.","scope":"endpoint"},{"status":429,"code":"rate_limited","description":"An anonymous, signed-request or API-key allowance was exceeded.","action":"Wait at least `Retry-After` seconds. Share a queue and retry budget across your workers.","scope":"common"},{"status":500,"code":"internal_error","description":"An unexpected server error occurred. Internal details are not returned.","action":"Retry reads with bounded backoff. Check write results before sending a new signed operation.","scope":"common"},{"status":503,"code":"busy","description":"The application has reached a temporary concurrency or database limit.","action":"Wait `Retry-After` seconds and retry with bounded backoff.","scope":"common"}],"responseHeaders":[{"name":"Content-Type","value":"application/json","description":"JSON, also for errors."},{"name":"Cache-Control","value":"no-store","description":"Private: never cached."}],"bodyFields":[{"name":"name","in":"body","required":false,"description":"1 to 60 visible characters."},{"name":"site","in":"body","required":false,"description":"https URL, at most 300 characters."},{"name":"redirectUris","in":"body","required":false,"description":"1 to 10 exact URIs: https, or http on 127.0.0.1, [::1] or localhost (any port)."},{"name":"postLogoutRedirectUris","in":"body","required":false,"description":"Up to 10 URIs, same rules."},{"name":"idTokenAlg","in":"body","required":false,"description":"EdDSA (default) or ES256."},{"name":"logo","in":"body","required":false,"description":"{type, data}: a PNG or GIF in standard base64, at most 256 KiB and 512 px; null removes it."}],"documentationUrl":"https://veil.rip/docs/oidc-client-update","supportsBrowserFetch":false,"browserMode":"local-or-server"}}