Skip to main content
POST
/
projects
Create Project
curl --request POST \
  --url https://api.example.com/projects/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "project_id": "<string>",
  "organization_id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "managed_by": "user"
}

Body

application/json

Request body for creating a new project.

Attributes: name: Human-readable project name.

name
string
required
Required string length: 1 - 200

Response

Successful Response

Project record stored in the tenant SurrealDB namespace.

Projects group resources within an organization. Each resource belongs to exactly one project, enabling scoped access control and isolation. Project rows live in the per-tenant SurrealDB namespace alongside resources so that lifecycle operations on a project and its resources execute inside a single tenant-scoped transaction.

Identity fields (frozen): project_id: Unique project identifier, used as SurrealDB record ID. organization_id: Owning organization, set at creation and immutable. Denormalised onto the row so platform callers can reason about the owner without re-deriving it from the namespace binding.

Metadata: name: Display name of the project. managed_by: Ownership tier. "platform" projects are seeded by pragma-os itself (e.g. the platform-default project used by platform agents). User-facing write paths reject mutations to platform-managed projects with HTTP 403. None or "user" indicates an ordinary user-created project.

Inherited from PragmaModel: created_at: Creation timestamp (frozen). updated_at: Last update timestamp (mutable).

project_id
string
required
organization_id
string
required
name
string
required
created_at
string<date-time>
updated_at
string<date-time>
managed_by
enum<string> | null
Available options:
user,
platform