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

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
source_target_kindquery
target_branch_idquery

Request body

FieldTypeRequiredDescription
idstringYesResource ID, unique among the project resources.
patternstringYesURI pattern the resource answers, such as /users/:userId/profile.
descriptionstringYesWhat the resource returns.
titlestring,nullDisplay title. Omit it or send null for no title.

Responses

StatusDescription
201Created resource document
400Bad request
401Unauthorized
403Forbidden
409Conflict