# Organization requests 11 management API operations. - [GET /v1/me/organization-requests](/docs/api/operations/mine_v1_me_organization_requests_get): Mine - [POST /v1/me/organization-requests](/docs/api/operations/create_v1_me_organization_requests_post): Create - [GET /v1/me/organization-requests/{request_id}](/docs/api/operations/mine_one_v1_me_organization_requests__request_id__get): Mine One - [POST /v1/me/organization-requests/{request_id}/resubmit](/docs/api/operations/resubmit_v1_me_organization_requests__request_id__resubmit_post): Resubmit - [POST /v1/me/organization-requests/{request_id}/withdraw](/docs/api/operations/withdraw_v1_me_organization_requests__request_id__withdraw_post): Withdraw - [GET /v1/organization-requests](/docs/api/operations/review_list_v1_organization_requests_get): Review List - [GET /v1/organization-requests/{request_id}](/docs/api/operations/review_one_v1_organization_requests__request_id__get): Review One - [POST /v1/organization-requests/{request_id}/claim](/docs/api/operations/claim_v1_organization_requests__request_id__claim_post): Claim - [POST /v1/organization-requests/{request_id}/request-changes](/docs/api/operations/request_changes_v1_organization_requests__request_id__request_changes_post): Request Changes - [POST /v1/organization-requests/{request_id}/reject](/docs/api/operations/reject_v1_organization_requests__request_id__reject_post): Reject - [POST /v1/organization-requests/{request_id}/approve](/docs/api/operations/approve_v1_organization_requests__request_id__approve_post): Approve ## GET /v1/me/organization-requests Mine Mine 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 | | --- | --- | --- | --- | --- | | `cursor` | query | string \| null | No | | | `limit` | query | integer | No | Validation: minimum 1; maximum 100 | ### 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/me/organization-requests' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/organization-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/me/organization-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/mine_v1_me_organization_requests_get) ## POST /v1/me/organization-requests Create Create 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; RequestFields | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `name` | | string | Yes | Validation: min length 2; max length 200 | | `organization_type` | | string | Yes | Validation: min length 2; max length 100 | | `website` | | string | Yes | Validation: min length 8; max length 2048 | | `domains` | | string[] | Yes | Validation: min items 1; max items 10 | | `purpose` | | string | Yes | Validation: min length 12; max length 4000 | | `contacts` | | Contact[] | Yes | Validation: min items 1; max items 10 | | `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/organization-requests' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "name": "REPLACE_WITH_NAME", "organization_type": "REPLACE_WITH_ORGANIZATION_TYPE", "website": "REPLACE_WITH_WEBSITE", "domains": [], "purpose": "REPLACE_WITH_PURPOSE", "contacts": [], "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/organization-requests', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "name": "REPLACE_WITH_NAME", "organization_type": "REPLACE_WITH_ORGANIZATION_TYPE", "website": "REPLACE_WITH_WEBSITE", "domains": [], "purpose": "REPLACE_WITH_PURPOSE", "contacts": [], "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/organization-requests', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"name":"REPLACE_WITH_NAME","organization_type":"REPLACE_WITH_ORGANIZATION_TYPE","website":"REPLACE_WITH_WEBSITE","domains":[],"purpose":"REPLACE_WITH_PURPOSE","contacts":[],"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/create_v1_me_organization_requests_post) ## GET /v1/me/organization-requests/{request_id} Mine One Mine One 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 | | --- | --- | --- | --- | --- | | `request_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/me/organization-requests/REPLACE_WITH_REQUEST_ID' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/organization-requests/REPLACE_WITH_REQUEST_ID', { 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/organization-requests/REPLACE_WITH_REQUEST_ID', 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/mine_one_v1_me_organization_requests__request_id__get) ## POST /v1/me/organization-requests/{request_id}/resubmit Resubmit Resubmit 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; identity__organization_requests__Resubmit | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `name` | | string | Yes | Validation: min length 2; max length 200 | | `organization_type` | | string | Yes | Validation: min length 2; max length 100 | | `website` | | string | Yes | Validation: min length 8; max length 2048 | | `domains` | | string[] | Yes | Validation: min items 1; max items 10 | | `purpose` | | string | Yes | Validation: min length 12; max length 4000 | | `contacts` | | Contact[] | Yes | Validation: min items 1; max items 10 | | `reason` | | string | Yes | Validation: min length 8; max length 500 | | `expected_version` | | integer | Yes | Validation: minimum 1 | ### 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/me/organization-requests/REPLACE_WITH_REQUEST_ID/resubmit' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "name": "REPLACE_WITH_NAME", "organization_type": "REPLACE_WITH_ORGANIZATION_TYPE", "website": "REPLACE_WITH_WEBSITE", "domains": [], "purpose": "REPLACE_WITH_PURPOSE", "contacts": [], "reason": "REPLACE_WITH_REASON", "expected_version": 0 }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/organization-requests/REPLACE_WITH_REQUEST_ID/resubmit', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "name": "REPLACE_WITH_NAME", "organization_type": "REPLACE_WITH_ORGANIZATION_TYPE", "website": "REPLACE_WITH_WEBSITE", "domains": [], "purpose": "REPLACE_WITH_PURPOSE", "contacts": [], "reason": "REPLACE_WITH_REASON", "expected_version": 0 }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/me/organization-requests/REPLACE_WITH_REQUEST_ID/resubmit', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"name":"REPLACE_WITH_NAME","organization_type":"REPLACE_WITH_ORGANIZATION_TYPE","website":"REPLACE_WITH_WEBSITE","domains":[],"purpose":"REPLACE_WITH_PURPOSE","contacts":[],"reason":"REPLACE_WITH_REASON","expected_version":0}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/resubmit_v1_me_organization_requests__request_id__resubmit_post) ## POST /v1/me/organization-requests/{request_id}/withdraw Withdraw Withdraw 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; Transition | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `expected_version` | | integer | Yes | Validation: minimum 1 | | `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 POST 'https://YOUR_IDENTITY_HOST/v1/me/organization-requests/REPLACE_WITH_REQUEST_ID/withdraw' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "expected_version": 0, "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/me/organization-requests/REPLACE_WITH_REQUEST_ID/withdraw', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_version": 0, "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/organization-requests/REPLACE_WITH_REQUEST_ID/withdraw', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"expected_version":0,"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/withdraw_v1_me_organization_requests__request_id__withdraw_post) ## GET /v1/organization-requests Review List Review List 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 | | --- | --- | --- | --- | --- | | `status` | query | string \| null | No | | | `cursor` | query | string \| null | No | | | `limit` | query | integer | No | Validation: minimum 1; maximum 100 | ### 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/organization-requests' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-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/organization-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/review_list_v1_organization_requests_get) ## GET /v1/organization-requests/{request_id} Review One Review One 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 | | --- | --- | --- | --- | --- | | `request_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/organization-requests/REPLACE_WITH_REQUEST_ID' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID', { 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/organization-requests/REPLACE_WITH_REQUEST_ID', 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/review_one_v1_organization_requests__request_id__get) ## POST /v1/organization-requests/{request_id}/claim Claim Claim 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; Transition | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `expected_version` | | integer | Yes | Validation: minimum 1 | | `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 POST 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/claim' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "expected_version": 0, "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/claim', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_version": 0, "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/organization-requests/REPLACE_WITH_REQUEST_ID/claim', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"expected_version":0,"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/claim_v1_organization_requests__request_id__claim_post) ## POST /v1/organization-requests/{request_id}/request-changes Request Changes Request Changes 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; Decision | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `expected_version` | | integer | Yes | Validation: minimum 1 | | `reason` | | string | Yes | Validation: min length 8; max length 500 | | `decision_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 POST 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/request-changes' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "expected_version": 0, "reason": "REPLACE_WITH_REASON", "decision_reason": "REPLACE_WITH_DECISION_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/request-changes', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_version": 0, "reason": "REPLACE_WITH_REASON", "decision_reason": "REPLACE_WITH_DECISION_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/request-changes', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"expected_version":0,"reason":"REPLACE_WITH_REASON","decision_reason":"REPLACE_WITH_DECISION_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/request_changes_v1_organization_requests__request_id__request_changes_post) ## POST /v1/organization-requests/{request_id}/reject Reject Reject 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; Decision | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `expected_version` | | integer | Yes | Validation: minimum 1 | | `reason` | | string | Yes | Validation: min length 8; max length 500 | | `decision_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 POST 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/reject' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "expected_version": 0, "reason": "REPLACE_WITH_REASON", "decision_reason": "REPLACE_WITH_DECISION_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/reject', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_version": 0, "reason": "REPLACE_WITH_REASON", "decision_reason": "REPLACE_WITH_DECISION_REASON" }) }); const result = await response.json(); ``` #### Python ```python import os import json import requests response = requests.request( 'POST', 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/reject', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"expected_version":0,"reason":"REPLACE_WITH_REASON","decision_reason":"REPLACE_WITH_DECISION_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/reject_v1_organization_requests__request_id__reject_post) ## POST /v1/organization-requests/{request_id}/approve Approve Approve 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 | | --- | --- | --- | --- | --- | | `request_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ### Request body #### application/json Required; Transition | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `expected_version` | | integer | Yes | Validation: minimum 1 | | `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 POST 'https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/approve' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "expected_version": 0, "reason": "REPLACE_WITH_REASON" }' ``` #### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/organization-requests/REPLACE_WITH_REQUEST_ID/approve', { method: 'POST', headers: { Authorization: `Bearer ${process.env.TAIFA_MANAGEMENT_TOKEN}`, 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "expected_version": 0, "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/organization-requests/REPLACE_WITH_REQUEST_ID/approve', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"expected_version":0,"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ### Response example No response example in the current specification. [Request and response examples](/docs/api/operations/approve_v1_organization_requests__request_id__approve_post)