# Attest POST /v1/link-challenges/{challenge_id}/attest Attest Authentication: bearer access token with audience `taifa-management`. Endpoint roles and eligibility are reviewed separately from the OpenAPI bearer scheme. No operation-specific scopes are declared in the OpenAPI document. Bearer authentication and endpoint authorization requirements still apply. ## Parameters | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `challenge_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ## Request body ### application/json Required; Attestation | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `reason` | | string | Yes | Validation: min length 8; max length 500 | | `local_account_id` | | string | Yes | Validation: min length 1; max length 200 | | `local_auth_time` | | integer | Yes | | | `local_auth_method` | | string | Yes | Validation: min length 1; max length 100 | | `local_session_digest` | | string | Yes | Validation: pattern ^[0-9a-f]{64}$ | | `central_issuer` | | string | Yes | | | `central_subject` | | string | Yes | | | `central_auth_time` | | integer | Yes | | | `central_acr` | | taifa-mfa \| taifa-phishing-resistant | Yes | | | `central_sid_digest` | | string | Yes | Validation: pattern ^[0-9a-f]{64}$ | ## Responses ### 201 Successful Response No fields declared in the current specification. ### 422 Validation Error | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `detail` | | ValidationError[] | No | | ## Request examples Illustrative only. Replace placeholders and keep management tokens on the server. ### cURL ```sh curl -X POST 'https://YOUR_IDENTITY_HOST/v1/link-challenges/REPLACE_WITH_CHALLENGE_ID/attest' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "reason": "REPLACE_WITH_REASON", "local_account_id": "REPLACE_WITH_LOCAL_ACCOUNT_ID", "local_auth_time": 0, "local_auth_method": "REPLACE_WITH_LOCAL_AUTH_METHOD", "local_session_digest": "REPLACE_WITH_LOCAL_SESSION_DIGEST", "central_issuer": "REPLACE_WITH_CENTRAL_ISSUER", "central_subject": "REPLACE_WITH_CENTRAL_SUBJECT", "central_auth_time": 0, "central_acr": "REPLACE_WITH_CENTRAL_ACR", "central_sid_digest": "REPLACE_WITH_CENTRAL_SID_DIGEST" }' ``` ### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/link-challenges/REPLACE_WITH_CHALLENGE_ID/attest', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "reason": "REPLACE_WITH_REASON", "local_account_id": "REPLACE_WITH_LOCAL_ACCOUNT_ID", "local_auth_time": 0, "local_auth_method": "REPLACE_WITH_LOCAL_AUTH_METHOD", "local_session_digest": "REPLACE_WITH_LOCAL_SESSION_DIGEST", "central_issuer": "REPLACE_WITH_CENTRAL_ISSUER", "central_subject": "REPLACE_WITH_CENTRAL_SUBJECT", "central_auth_time": 0, "central_acr": "REPLACE_WITH_CENTRAL_ACR", "central_sid_digest": "REPLACE_WITH_CENTRAL_SID_DIGEST" }) }); const result = await response.json(); ``` ### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/link-challenges/REPLACE_WITH_CHALLENGE_ID/attest', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"reason":"REPLACE_WITH_REASON","local_account_id":"REPLACE_WITH_LOCAL_ACCOUNT_ID","local_auth_time":0,"local_auth_method":"REPLACE_WITH_LOCAL_AUTH_METHOD","local_session_digest":"REPLACE_WITH_LOCAL_SESSION_DIGEST","central_issuer":"REPLACE_WITH_CENTRAL_ISSUER","central_subject":"REPLACE_WITH_CENTRAL_SUBJECT","central_auth_time":0,"central_acr":"REPLACE_WITH_CENTRAL_ACR","central_sid_digest":"REPLACE_WITH_CENTRAL_SID_DIGEST"}') ) response.raise_for_status() ``` ## Response example No response example in the current specification.