---
title: "Link an existing project to an application"
method: POST
path: "/ai/applications/{application_public_id}/projects/link"
tags: ["AI Applications"]
---

# Link an existing project to an application

`POST /ai/applications/{application_public_id}/projects/link`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/applications/{application_public_id}/projects/link`
- Auth: HTTP bearer

## Path parameters

- `application_public_id` string, required

## Request body

- LinkApplicationProjectRequest
  - `project_id` integer, required

## Response `200`

- ApplicationResponse
  - `created_at` string, required
  - `description` string, nullable
  - `name` string, required
  - `projects` ApplicationProjectResponse[], required
    - `automatic_deploy` boolean, required
    - `environments` ApplicationProjectEnvironmentResponse[], required
      - `deployment_state` string, nullable
      - `name` string, required
      - `sleeping` boolean, required
      - `slug` string, required
    - `id` integer, required
    - `is_primary` boolean, required
    - `is_private` boolean, required
    - `last_deployment_at` string, nullable
    - `main_branch` string, required
    - `name` string, required
    - `repository` string, nullable
    - `slug` string, required
  - `public_id` string, required
  - `status` string, required
  - `updated_at` string, required

## Other responses

- `401`
- `403`
- `404`
- `409`

## Changes

- **2026-09-07** `c2a1f69745e7`: 2 breaking
  - the response property `projects/items/repository` became nullable for the status `200`
  - the response property `projects/items/repository` became optional for the status `200`
- **2026-09-07** `7a3103561bd0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/applications/:application_public_id/projects/link/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
