oauth
OAuth (MCP)
The Nest-routed, bearer-authed half of the OAuth 2.1 authorization flow (consent context + decision) — see the MCP & OAuth guide for the full flow including the raw RFC endpoints.
2 endpoints
GET /api/v1/oauth/authorize/context
Client name, scope description, and mcp.access-eligible tenants for the consent screen.
Path & query parameters
| Name | In | Type | Constraints |
|---|---|---|---|
clientIdrequired | query | string | ≥1 chars |
redirectUrirequired | query | string | ≥1 chars |
scoperequired | query | string | ≥1 chars |
curl example
curl -X GET "https://api.yourdomain.com/api/v1/oauth/authorize/context?clientId=institflow-cli-a1b2c3&redirectUri=string&scope=string" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY"Responses
| Name | Type | Constraints |
|---|---|---|
clientNamerequired | string | — |
scoperequired | string | — |
membershipsrequired | array<object> | — |
{
"clientName": "string",
"scope": "string",
"memberships": [
{
"tenantId": "4332af8b-4332-7332-832a-4332af8b4332",
"tenantSlug": "string",
"tenantName": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c"
}
]
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
POST /api/v1/oauth/authorize/decision
Approve or deny an MCP client authorization request.
Request body
| Name | Type | Constraints |
|---|---|---|
clientIdrequired | string | ≥1 chars |
redirectUrirequired | string | ≥1 chars |
staterequired | string | — |
codeChallengerequired | string | ≥1 chars |
codeChallengeMethodrequired | enum: "S256" | — |
scoperequired | string | ≥1 chars |
membershipId | string (uuid) | — |
approverequired | boolean | — |
Example
{
"clientId": "institflow-cli-a1b2c3",
"redirectUri": "string",
"state": "string",
"codeChallenge": "string",
"codeChallengeMethod": "S256",
"scope": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c",
"approve": true
}curl example
curl -X POST "https://api.yourdomain.com/api/v1/oauth/authorize/decision" \
-H "Authorization: Bearer $INSTITFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"clientId": "institflow-cli-a1b2c3",
"redirectUri": "string",
"state": "string",
"codeChallenge": "string",
"codeChallengeMethod": "S256",
"scope": "string",
"membershipId": "e34c26d7-e34c-734c-84c2-e34c26d7e34c",
"approve": true
}'Responses
| Name | Type | Constraints |
|---|---|---|
redirectTorequired | string | — |
{
"redirectTo": "string"
}Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.
Returns the shared `ErrorEnvelope` — `{ error: { code, message, requestId, details? } }`. Every code is listed in the Conventions guide.