Create project

http
POST /projects

Create a project.

Servers

JSON
[  {    "url": "https://api.veryfront.com"  }]

Authentication

JSON
[  {    "bearerAuth": []  },  {    "apiKeyAuth": []  }]
JSON
{  "bearerAuth": {    "type": "http",    "scheme": "bearer",    "bearerFormat": "JWT or API Key",    "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."  },  "apiKeyAuth": {    "type": "apiKey",    "in": "header",    "name": "X-API-Key",    "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."  }}

Request body

JSON
{  "content": {    "application/json": {      "schema": {        "type": "object",        "properties": {          "accountId": {            "type": "string",            "format": "uuid"          },          "name": {            "type": "string",            "minLength": 1,            "description": "Required project name. Creates an owned project. A project-scoped API key cannot create projects; use a user session or account-wide API key."          },          "slug": {            "type": "string",            "minLength": 1,            "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",            "description": "Project slug; generated when omitted."          },          "description": {            "type": "string",            "description": "Project description."          },          "templateSlug": {            "type": "string",            "description": "Starter slug or accessible template project slug. Omit or use blank for an empty project."          },          "templateProjectId": {            "type": "string",            "format": "uuid",            "description": "Template project UUID. Without a template, the project starts with no source files."          },          "account_id": {            "type": "string",            "format": "uuid",            "description": "Destination account UUID. Defaults to the signed-in user’s default account."          }        },        "required": [          "name"        ],        "additionalProperties": false      },      "example": {        "name": "My Project",        "description": "A sample project description",        "templateSlug": "minimal"      }    }  }}

Responses

201

Project created.

JSON
{  "description": "Project created.",  "content": {    "application/json": {      "schema": {        "$ref": "#/components/schemas/Project"      }    }  }}

400

Invalid input

JSON
{  "description": "Invalid input",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

401

Authentication required

JSON
{  "description": "Authentication required",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

403

Project-scoped tokens cannot create projects

JSON
{  "description": "Project-scoped tokens cannot create projects",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

404

Template project not found

JSON
{  "description": "Template project not found",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

409

Project slug already exists

JSON
{  "description": "Project slug already exists",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

500

Server error

JSON
{  "description": "Server error",  "content": {    "application/problem+json": {      "schema": {        "$ref": "#/components/schemas/Problem"      }    }  }}

Referenced contracts

components/schemas/Project

JSON
{  "type": "object",  "properties": {    "account_id": {      "type": [        "string",        "null"      ],      "format": "uuid"    },    "account_name": {      "type": [        "string",        "null"      ]    },    "id": {      "type": "string",      "format": "uuid",      "example": "550e8400-e29b-41d4-a716-446655440000"    },    "slug": {      "type": "string",      "example": "my-project"    },    "name": {      "type": "string",      "example": "My Project"    },    "description": {      "type": "string",      "example": "A sample project description"    },    "is_claimed": {      "type": "boolean"    },    "features": {      "type": "array",      "items": {        "type": "string"      }    },    "environments": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string",            "format": "uuid"          },          "name": {            "type": "string"          },          "protected": {            "type": "boolean"          },          "domains": {            "type": "array",            "items": {              "type": "string"            }          },          "environment_variables": {            "type": "array",            "items": {}          },          "active_release_id": {            "type": [              "string",              "null"            ],            "format": "uuid"          },          "server_hostname": {            "type": [              "string",              "null"            ]          }        },        "required": [          "id",          "name"        ]      }    },    "releases": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string",            "format": "uuid"          },          "name": {            "type": "string"          },          "export_status": {            "type": "string"          },          "build_status": {            "type": "string"          },          "deploy_status": {            "type": "string"          }        },        "required": [          "id",          "name"        ]      }    },    "created_at": {      "type": "string",      "example": "2024-01-15T10:30:00Z"    },    "updated_at": {      "type": "string",      "example": "2024-01-15T10:30:00Z"    },    "published_at": {      "type": "string"    },    "prompt_count": {      "type": "number"    },    "config": {      "$ref": "#/components/schemas/ProjectConfig"    },    "provider": {      "type": [        "string",        "null"      ]    },    "layout": {      "type": [        "string",        "null"      ]    },    "type": {      "type": "string",      "enum": [        "regular",        "default",        "template"      ]    },    "system_managed": {      "type": "boolean"    },    "users": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string"          },          "email": {            "type": "string"          },          "name": {            "type": "string"          },          "role": {            "type": "string"          },          "avatar_src": {            "type": "string"          }        },        "required": [          "id"        ]      }    },    "capabilities": {      "type": "array",      "items": {        "type": "string",        "enum": [          "project.read",          "project.settings.manage",          "project.delete",          "project.members.read",          "project.members.manage",          "project.invites.read",          "project.invites.manage",          "project.files.read",          "project.files.write",          "project.realtime.connect",          "project.realtime.write",          "project.files.admin",          "project.uploads.read",          "project.uploads.write",          "project.uploads.admin",          "project.knowledge.read",          "project.knowledge.write",          "project.releases.read",          "project.releases.write",          "project.deployments.read",          "project.deployments.write",          "project.deploy.execute",          "project.runtime.manage",          "project.channels.read",          "project.channels.write",          "project.sandboxes.manage",          "project.domains.write",          "project.environments.manage",          "project.env_vars.write",          "project.runs.read",          "project.runs.write",          "project.runs.admin",          "project.approvals.decide",          "project.agents.read",          "project.agents.write",          "project.evals.read",          "project.evals.write",          "project.evals.run",          "project.conversations.read",          "project.conversations.write",          "project.conversations.create",          "project.integrations.read",          "project.integrations.connect",          "project.integrations.configure",          "project.api_keys.read",          "project.api_keys.manage",          "project.cache.read",          "project.cache.write",          "project.logs.read",          "project.metrics.read",          "project.resources.read"        ]      }    },    "capabilities_version": {      "type": "integer"    },    "labels": {      "type": "array",      "items": {        "type": "object",        "properties": {          "id": {            "type": "string",            "format": "uuid"          },          "namespace": {            "type": "string"          },          "key": {            "type": "string"          },          "value": {            "type": [              "string",              "null"            ]          },          "color": {            "type": [              "string",              "null"            ]          }        },        "required": [          "id",          "namespace",          "key",          "value"        ]      }    }  },  "required": [    "id",    "slug",    "name"  ]}

components/schemas/ProjectConfig

JSON
{  "type": "object",  "properties": {    "disable_meta_robots": {      "type": "boolean",      "description": "When true, the rendered site asks crawlers not to index it (noindex robots meta tag)."    },    "provider_id": {      "type": [        "string",        "null"      ],      "description": "Identifier of the provider backing the project, or null when none is configured. Not necessarily a UUID."    },    "layout_id": {      "type": [        "string",        "null"      ],      "description": "Identifier of the layout applied to the project, or null when none is configured."    },    "is_template": {      "type": "boolean",      "description": "Whether the project is offered in the template gallery."    },    "coming_soon": {      "type": "boolean",      "description": "Whether the template is listed as coming soon in the gallery."    },    "category": {      "type": [        "string",        "null"      ],      "description": "Template gallery category, or null when uncategorised."    },    "description": {      "type": [        "string",        "null"      ],      "description": "Template gallery description, or null when none is set."    },    "disableMetaRobots": {      "type": "boolean",      "description": "Legacy camelCase spelling of `disable_meta_robots`; carries the same value. Prefer `disable_meta_robots`."    },    "providerId": {      "type": [        "string",        "null"      ],      "description": "Legacy camelCase spelling of `provider_id`; carries the same value. Prefer `provider_id`."    },    "layoutId": {      "type": [        "string",        "null"      ],      "description": "Legacy camelCase spelling of `layout_id`; carries the same value. Prefer `layout_id`."    },    "isTemplate": {      "type": "boolean",      "description": "Legacy camelCase spelling of `is_template`; carries the same value. Prefer `is_template`."    },    "comingSoon": {      "type": "boolean",      "description": "Legacy camelCase spelling of `coming_soon`; carries the same value. Prefer `coming_soon`."    }  },  "additionalProperties": false,  "description": "Project configuration. Field names use snake_case. Legacy camelCase aliases contain the same values."}

components/schemas/Problem

JSON
{  "type": "object",  "properties": {    "cause": {      "type": "string",      "enum": [        "schedule_concurrency_forbidden",        "schedule_fire_in_progress",        "schedule_run_limit_reached"      ],      "description": "Schedule admission refusal."    },    "idempotency": {      "type": "object",      "properties": {        "state": {          "type": "string",          "enum": [            "in_progress",            "payload_mismatch",            "outcome_unknown"          ]        },        "operation": {          "type": "string",          "minLength": 1        },        "retryable": {          "type": "boolean"        },        "retry_after_seconds": {          "type": [            "integer",            "null"          ],          "minimum": 0        },        "expires_at": {          "type": [            "string",            "null"          ]        },        "recovery": {          "type": "object",          "properties": {            "available": {              "type": "boolean"            },            "description": {              "type": "string"            },            "resource_url": {              "type": "string"            }          },          "required": [            "available",            "description"          ]        }      },      "required": [        "state",        "operation",        "retryable",        "retry_after_seconds",        "expires_at"      ],      "description": "Replay status, retry timing, and recovery lookup."    },    "type": {      "type": "string",      "description": "URI reference identifying the problem type",      "example": "https://api.veryfront.com/errors/validation-failed"    },    "title": {      "type": "string",      "description": "Short human-readable summary of the problem",      "example": "Validation Failed"    },    "status": {      "type": "integer",      "minimum": 100,      "maximum": 599,      "description": "HTTP status code",      "example": 400    },    "code": {      "type": "string",      "description": "Stable machine-readable error code",      "example": "RUN_INVALID_INPUT"    },    "detail": {      "type": "string",      "description": "Human-readable explanation specific to this occurrence",      "example": "The 'email' field must be a valid email address"    },    "instance": {      "type": "string",      "description": "URI reference identifying the specific occurrence",      "example": "/projects/my-project/members"    },    "slug": {      "type": "string",      "description": "Stable identifier for the problem type",      "example": "validation-failed"    },    "category": {      "type": "string",      "enum": [        "AUTH",        "RESOURCE",        "VALIDATION",        "DATABASE",        "SUBSCRIPTION",        "INTEGRATION",        "INTERNAL"      ],      "description": "API error category",      "example": "VALIDATION"    },    "suggestion": {      "type": "string",      "description": "Suggested action to resolve the problem",      "example": "Check the request body and query parameters against the API documentation."    },    "errors": {      "type": "array",      "items": {        "type": "object",        "properties": {          "field": {            "type": "string",            "description": "Field path that caused the error",            "example": "email"          },          "message": {            "type": "string",            "description": "Error message for this field",            "example": "Invalid email format"          },          "code": {            "type": "string",            "description": "Error code for this field",            "example": "INVALID_FORMAT"          }        },        "required": [          "field",          "message"        ]      },      "description": "Detailed field-level errors for validation failures"    }  },  "required": [    "type",    "title",    "status"  ]}

Operation contract

JSON
{  "operationId": "createProject",  "tags": [    "projects/Projects/Projects"  ],  "summary": "Create project",  "description": "Create a project.",  "requestBody": {    "content": {      "application/json": {        "schema": {          "type": "object",          "properties": {            "accountId": {              "type": "string",              "format": "uuid"            },            "name": {              "type": "string",              "minLength": 1,              "description": "Required project name. Creates an owned project. A project-scoped API key cannot create projects; use a user session or account-wide API key."            },            "slug": {              "type": "string",              "minLength": 1,              "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",              "description": "Project slug; generated when omitted."            },            "description": {              "type": "string",              "description": "Project description."            },            "templateSlug": {              "type": "string",              "description": "Starter slug or accessible template project slug. Omit or use blank for an empty project."            },            "templateProjectId": {              "type": "string",              "format": "uuid",              "description": "Template project UUID. Without a template, the project starts with no source files."            },            "account_id": {              "type": "string",              "format": "uuid",              "description": "Destination account UUID. Defaults to the signed-in user’s default account."            }          },          "required": [            "name"          ],          "additionalProperties": false        },        "example": {          "name": "My Project",          "description": "A sample project description",          "templateSlug": "minimal"        }      }    }  },  "responses": {    "201": {      "description": "Project created.",      "content": {        "application/json": {          "schema": {            "$ref": "#/components/schemas/Project"          }        }      }    },    "400": {      "description": "Invalid input",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "401": {      "description": "Authentication required",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "403": {      "description": "Project-scoped tokens cannot create projects",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "404": {      "description": "Template project not found",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "409": {      "description": "Project slug already exists",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    },    "500": {      "description": "Server error",      "content": {        "application/problem+json": {          "schema": {            "$ref": "#/components/schemas/Problem"          }        }      }    }  },  "x-documentation-source-tag": "Projects",  "x-canonical-documentation": {    "domain": "projects",    "resource": "Projects",    "subgroup": "Projects",    "name": "Create project",    "description": "Create a project.",    "operationId": "createProject"  },  "x-mint": {    "href": "/cloud/rest/api-reference/projects-projects-projects/create-project"  }}