---
title: "Connect an AI app"
method: POST
path: "/ai-apps/requests/{request_id}/approve/"
tags: ["ai_apps"]
---

# Connect an AI app

`POST /ai-apps/requests/{request_id}/approve/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/ai-apps/requests/{request_id}/approve/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

The person's yes on the consent page: connects the app to the workspace they picked, with the access they chose, and answers where to send them back to the app. Connecting the same app to the same workspace again replaces the earlier connection.

## Path parameters

- `request_id` string, required

## Request body

- AiAppApproveSchema: The person's yes: which workspace, and what the app may do there.
  - `access` 'read' | 'write', required: What a person let one AI app do in their workspace when they connected it. Chosen on the consent page. A workspace that is not on a paid plan reads as READ whatever was chosen, because making changes from an AI app is a paid entitlement; that is checked on every call, not stored here.
  - `workspace_id` string, required

## Response `200`

Successful Response

- AiAppAnswerSchema: Where to send the person once they have answered.
  - `redirect_url` string, required

## Other responses

- `401`: Unauthorized
- `403`: Asked through an AI, not a person.
- `404`: The request expired or was answered.
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Workspaces could not be read.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
