# Create project resource

```http
POST /projects/{project_reference}/resources
```

Create a project resource, an MCP resource definition under resources/, in the project source or a preview branch; returns the project resource source document. Requires project.files.write.

## Parameters

| Name                 | In    | Required | Description                                                |
| -------------------- | ----- | -------- | ---------------------------------------------------------- |
| `project_reference`  | path  | Yes      | Project slug, UUID, or domain that identifies the project. |
| `source_target_kind` | query |          |                                                            |
| `target_branch_id`   | query |          |                                                            |

## Request body

| Field         | Type        | Required | Description                                                       |
| ------------- | ----------- | -------- | ----------------------------------------------------------------- |
| `id`          | string      | Yes      | Resource ID, unique among the project resources.                  |
| `pattern`     | string      | Yes      | URI pattern the resource answers, such as /users/:userId/profile. |
| `description` | string      | Yes      | What the resource returns.                                        |
| `title`       | string,null |          | Display title. Omit it or send null for no title.                 |

## Responses

| Status | Description               |
| ------ | ------------------------- |
| 201    | Created resource document |
| 400    | Bad request               |
| 401    | Unauthorized              |
| 403    | Forbidden                 |
| 409    | Conflict                  |
