# Create POST /v1/institutions/{institution_id}/websites 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 | | --- | --- | --- | --- | --- | | `institution_id` | path | string | Yes | | | `idempotency-key` | header | string | Yes | | ## Request body ### application/json Required; Fields | Field | Variant | Type | Required | Description | | --- | --- | --- | --- | --- | | `name` | | string | Yes | Validation: min length 2; max length 200 | | `website` | | string | Yes | Validation: min length 8; max length 2048 | | `connector_kind` | | string | No | Validation: pattern ^(taifa_connector\|standard_oidc)$ | | `connector_product` | | string \| null | No | | | `preview_digest` | | string \| null | No | | | `owner_person_id` | | string | Yes | Validation: min length 1 | | `environment` | | string | Yes | Validation: pattern ^(staging\|production)$ | | `redirect_uris` | | string[] | No | Validation: max items 16 | | `post_logout_redirect_uris` | | string[] | No | Validation: max items 16 | | `backchannel_logout_uri` | | string \| null | No | | | `requested_scopes` | | string[] | Yes | Validation: min items 1; max items 3 | | `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/institutions/REPLACE_WITH_INSTITUTION_ID/websites' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'idempotency-key: REPLACE_WITH_IDEMPOTENCY_KEY' \ -H 'Content-Type: application/json' \ --data '{ "name": "REPLACE_WITH_NAME", "website": "REPLACE_WITH_WEBSITE", "owner_person_id": "REPLACE_WITH_OWNER_PERSON_ID", "environment": "REPLACE_WITH_ENVIRONMENT", "requested_scopes": [], "reason": "REPLACE_WITH_REASON" }' ``` ### TypeScript (Node.js/server-side) ```typescript const response = await fetch('https://YOUR_IDENTITY_HOST/v1/institutions/REPLACE_WITH_INSTITUTION_ID/websites', { 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", "website": "REPLACE_WITH_WEBSITE", "owner_person_id": "REPLACE_WITH_OWNER_PERSON_ID", "environment": "REPLACE_WITH_ENVIRONMENT", "requested_scopes": [], "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/websites', headers={'Authorization': 'Bearer ' + os.environ['TAIFA_MANAGEMENT_TOKEN'], 'idempotency-key': 'REPLACE_WITH_IDEMPOTENCY_KEY'}, json=json.loads('{"name":"REPLACE_WITH_NAME","website":"REPLACE_WITH_WEBSITE","owner_person_id":"REPLACE_WITH_OWNER_PERSON_ID","environment":"REPLACE_WITH_ENVIRONMENT","requested_scopes":[],"reason":"REPLACE_WITH_REASON"}') ) response.raise_for_status() ``` ## Response example No response example in the current specification.