# Personal profile 12 management API operations. - [GET /v1/me/profile](/docs/api/operations/read_v1_me_profile_get): Read - [PUT /v1/me/profile](/docs/api/operations/update_v1_me_profile_put): Update - [PUT /v1/me/profile/national-id](/docs/api/operations/set_national_id_v1_me_profile_national_id_put): Set National Id - [DELETE /v1/me/profile/national-id](/docs/api/operations/clear_national_id_v1_me_profile_national_id_delete): Clear National Id - [PUT /v1/me/profile/phone](/docs/api/operations/set_phone_v1_me_profile_phone_put): Set Phone - [DELETE /v1/me/profile/phone](/docs/api/operations/clear_phone_v1_me_profile_phone_delete): Clear Phone - [PUT /v1/me/profile/photo](/docs/api/operations/set_photo_v1_me_profile_photo_put): Set Photo - [DELETE /v1/me/profile/photo](/docs/api/operations/clear_photo_v1_me_profile_photo_delete): Clear Photo - [GET /v1/me/profile/photo](/docs/api/operations/read_photo_v1_me_profile_photo_get): Read Photo - [POST /v1/me/profile/correction-request](/docs/api/operations/request_correction_v1_me_profile_correction_request_post): Request Correction - [GET /v1/institutions/{institution_id}/profile-correction-requests](/docs/api/operations/pending_requests_v1_institutions__institution_id__profile_correction_requests_get): Pending Requests - [POST /v1/institutions/{institution_id}/people/{person_id}/profile-correction](/docs/api/operations/correct_v1_institutions__institution_id__people__person_id__profile_correction_post): Correct ## GET /v1/me/profile Read Read 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 No path or query parameters declared. ### Request body This operation has no request body. ### Responses #### 200 Successful Response No fields declared in the current specification. ### Request examples Illustrative only. Replace placeholders and keep management tokens on the server. #### cURL ```sh curl -X GET 'https://YOUR_IDENTITY_HOST/v1/me/profile' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile', { method: 'GET', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}` } }); const result = await response.json(); ``` #### Python ```python import os import requests response = requests.request( 'GET', 'https://YOUR_IDENTITY_HOST/v1/me/profile', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN']} ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/read_v1_me_profile_get) ## PUT /v1/me/profile Update Update 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; DisplayNameUpdate | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `display_name` | | string | Yes | | | `reason` | | string \| null | No | | ### Responses #### 200 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 PUT 'https://YOUR_IDENTITY_HOST/v1/me/profile' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "display_name": "REPLACE_WITH_DISPLAY_NAME" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "display_name": "REPLACE_WITH_DISPLAY_NAME" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'PUT', 'https://YOUR_IDENTITY_HOST/v1/me/profile', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"display_name":"REPLACE_WITH_DISPLAY_NAME"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/update_v1_me_profile_put) ## PUT /v1/me/profile/national-id Set National Id Set National Id 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; object | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `national_id` | | string | Yes | Validation: pattern ^[A-Za-z0-9-]{6,20}$ | | `reason` | | string | Yes | Validation: min length 8; max length 500 | ### Responses #### 200 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 PUT 'https://YOUR_IDENTITY_HOST/v1/me/profile/national-id' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "national_id": "REPLACE_WITH_NATIONAL_ID", "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/national-id', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "national_id": "REPLACE_WITH_NATIONAL_ID", "reason": "REPLACE_WITH_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'PUT', 'https://YOUR_IDENTITY_HOST/v1/me/profile/national-id', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"national_id":"REPLACE_WITH_NATIONAL_ID","reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/set_national_id_v1_me_profile_national_id_put) ## DELETE /v1/me/profile/national-id Clear National Id Clear National Id 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; object | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `reason` | | string | Yes | Validation: min length 8; max length 500 | ### Responses #### 200 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 DELETE 'https://YOUR_IDENTITY_HOST/v1/me/profile/national-id' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/national-id', { method: 'DELETE', 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" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'DELETE', 'https://YOUR_IDENTITY_HOST/v1/me/profile/national-id', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/clear_national_id_v1_me_profile_national_id_delete) ## PUT /v1/me/profile/phone Set Phone Set Phone 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; object | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `phone` | | string | Yes | E.164, or a Kenyan 07/01/254 number normalized to +254 Validation: max length 32 | | `reason` | | string | Yes | Validation: min length 8; max length 500 | ### Responses #### 200 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 PUT 'https://YOUR_IDENTITY_HOST/v1/me/profile/phone' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "phone": "REPLACE_WITH_PHONE", "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/phone', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "phone": "REPLACE_WITH_PHONE", "reason": "REPLACE_WITH_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'PUT', 'https://YOUR_IDENTITY_HOST/v1/me/profile/phone', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"phone":"REPLACE_WITH_PHONE","reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/set_phone_v1_me_profile_phone_put) ## DELETE /v1/me/profile/phone Clear Phone Clear Phone 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; object | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `reason` | | string | Yes | Validation: min length 8; max length 500 | ### Responses #### 200 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 DELETE 'https://YOUR_IDENTITY_HOST/v1/me/profile/phone' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/phone', { method: 'DELETE', 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" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'DELETE', 'https://YOUR_IDENTITY_HOST/v1/me/profile/phone', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/clear_phone_v1_me_profile_phone_delete) ## PUT /v1/me/profile/photo Set Photo Set Photo 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | | `content-type` | header | string \| null | No | | | `x-audit-reason` | header | string \| null | No | | ### Request body #### image/png Required; string · binary No fields declared in the current specification. #### image/jpeg Required; string · binary No fields declared in the current specification. #### image/webp Required; string · binary No fields declared in the current specification. ### Responses #### 200 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 PUT 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: image/png' \ --data '"REPLACE_WITH_BODY"' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/photo', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'image/png' }, body: JSON.stringify("REPLACE_WITH_BODY") }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'PUT', 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('"REPLACE_WITH_BODY"') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/set_photo_v1_me_profile_photo_put) ## DELETE /v1/me/profile/photo Clear Photo Clear Photo 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | | `x-audit-reason` | header | string \| null | No | | ### Request body This operation has no request body. ### Responses #### 200 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 DELETE 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/photo', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY' } }); const result = await response.json(); ``` #### Python ```python import os import requests response = requests.request( 'DELETE', 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'} ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/clear_photo_v1_me_profile_photo_delete) ## GET /v1/me/profile/photo Read Photo Read Photo 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 No path or query parameters declared. ### Request body This operation has no request body. ### Responses #### 200 Successful Response No fields declared in the current specification. ### Request examples Illustrative only. Replace placeholders and keep management tokens on the server. #### cURL ```sh curl -X GET 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/photo', { method: 'GET', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}` } }); const result = await response.json(); ``` #### Python ```python import os import requests response = requests.request( 'GET', 'https://YOUR_IDENTITY_HOST/v1/me/profile/photo', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN']} ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/read_photo_v1_me_profile_photo_get) ## POST /v1/me/profile/correction-request Request Correction Request Correction 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 | | --- | --- | --- | --- | --- | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; CorrectionRequestCreate | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `field` | | display_name \| photo \| phone \| national_id | Yes | | | `reason` | | string | Yes | Validation: min length 8; max length 500 | ### 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/me/profile/correction-request' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "field": "REPLACE_WITH_FIELD", "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/profile/correction-request', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "field": "REPLACE_WITH_FIELD", "reason": "REPLACE_WITH_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/me/profile/correction-request', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"field":"REPLACE_WITH_FIELD","reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/request_correction_v1_me_profile_correction_request_post) ## GET /v1/institutions/{institution_id}/profile-correction-requests Pending Requests Pending Requests 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 | | --- | --- | --- | --- | --- | | `institution_id` | path | string | Yes | | ### Request body This operation has no request body. ### Responses #### 200 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 GET 'https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/profile-correction-requests' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/profile-correction-requests', { method: 'GET', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}` } }); const result = await response.json(); ``` #### Python ```python import os import requests response = requests.request( 'GET', 'https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/profile-correction-requests', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN']} ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/pending_requests_v1_institutions__institution_id__profile_correction_requests_get) ## POST /v1/institutions/{institution_id}/people/{person_id}/profile-correction Correct Correct 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 | | --- | --- | --- | --- | --- | | `institution_id` | path | string | Yes | | | `person_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; ProfileCorrection | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `field` | | display_name \| photo \| phone \| national_id | Yes | | | `action` | | clear \| set \| decline | Yes | | | `reason` | | string | Yes | Validation: min length 8; max length 500 | | `display_name` | | string \| null | No | | ### Responses #### 200 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/institutions/REPLACE_WITH_INSTITUTION_ID/people/REPLACE_WITH_PERSON_ID/profile-correction' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "field": "REPLACE_WITH_FIELD", "action": "REPLACE_WITH_ACTION", "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/people/REPLACE_WITH_PERSON_ID/profile-correction', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "field": "REPLACE_WITH_FIELD", "action": "REPLACE_WITH_ACTION", "reason": "REPLACE_WITH_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/people/REPLACE_WITH_PERSON_ID/profile-correction', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"field":"REPLACE_WITH_FIELD","action":"REPLACE_WITH_ACTION","reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/correct_v1_institutions__institution_id__people__person_id__profile_correction_post)