---
title: "Attach a resource to a project"
method: POST
path: "/api/v1/projects/{projectId}/members"
tags: ["Projects"]
---

# Attach a resource to a project

`POST /api/v1/projects/{projectId}/members`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/projects/{projectId}/members`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Attaches an embedded app, pipeline, or database. A resource already attached elsewhere returns 409 until it is detached.

## Path parameters

- `projectId` string, required

## Request body

- object
  - `resourceKind` 'app' | 'pipeline' | 'database' | 'file', required
  - `resourceId` string, required

## Response `201`

The created membership.

- object
  - `id` string, required
  - `resourceKind` string, required
  - `resourceId` string, required
  - `attachedAt` string, required

## Other responses

- `401`: Authentication is missing or invalid.
- `403`: The caller is not permitted to perform this action.
- `404`: The resource was not found.
- `409`: Response.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
