http
POST /projectsCreate a project.
Servers
JSON
1[2 {3 "url": "https://api.veryfront.com"4 }5]Authentication
JSON
1[2 {3 "bearerAuth": []4 },5 {6 "apiKeyAuth": []7 }8]JSON
1{2 "bearerAuth": {3 "type": "http",4 "scheme": "bearer",5 "bearerFormat": "JWT or API Key",6 "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."7 },8 "apiKeyAuth": {9 "type": "apiKey",10 "in": "header",11 "name": "X-API-Key",12 "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."13 }14}Request body
JSON
1{2 "content": {3 "application/json": {4 "schema": {5 "type": "object",6 "properties": {7 "accountId": {8 "type": "string",9 "format": "uuid"10 },11 "name": {12 "type": "string",13 "minLength": 1,14 "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."15 },16 "slug": {17 "type": "string",18 "minLength": 1,19 "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",20 "description": "Project slug; generated when omitted."21 },22 "description": {23 "type": "string",24 "description": "Project description."25 },26 "templateSlug": {27 "type": "string",28 "description": "Starter slug or accessible template project slug. Omit or use blank for an empty project."29 },30 "templateProjectId": {31 "type": "string",32 "format": "uuid",33 "description": "Template project UUID. Without a template, the project starts with no source files."34 },35 "account_id": {36 "type": "string",37 "format": "uuid",38 "description": "Destination account UUID. Defaults to the signed-in user’s default account."39 }40 },41 "required": [42 "name"43 ],44 "additionalProperties": false45 },46 "example": {47 "name": "My Project",48 "description": "A sample project description",49 "templateSlug": "minimal"50 }51 }52 }53}Responses
201
Project created.
JSON
1{2 "description": "Project created.",3 "content": {4 "application/json": {5 "schema": {6 "$ref": "#/components/schemas/Project"7 }8 }9 }10}400
Invalid input
JSON
1{2 "description": "Invalid input",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}401
Authentication required
JSON
1{2 "description": "Authentication required",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}403
Project-scoped tokens cannot create projects
JSON
1{2 "description": "Project-scoped tokens cannot create projects",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}404
Template project not found
JSON
1{2 "description": "Template project not found",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}409
Project slug already exists
JSON
1{2 "description": "Project slug already exists",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}500
Server error
JSON
1{2 "description": "Server error",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}Referenced contracts
components/schemas/Project
JSON
1{2 "type": "object",3 "properties": {4 "account_id": {5 "type": [6 "string",7 "null"8 ],9 "format": "uuid"10 },11 "account_name": {12 "type": [13 "string",14 "null"15 ]16 },17 "id": {18 "type": "string",19 "format": "uuid",20 "example": "550e8400-e29b-41d4-a716-446655440000"21 },22 "slug": {23 "type": "string",24 "example": "my-project"25 },26 "name": {27 "type": "string",28 "example": "My Project"29 },30 "description": {31 "type": "string",32 "example": "A sample project description"33 },34 "is_claimed": {35 "type": "boolean"36 },37 "features": {38 "type": "array",39 "items": {40 "type": "string"41 }42 },43 "environments": {44 "type": "array",45 "items": {46 "type": "object",47 "properties": {48 "id": {49 "type": "string",50 "format": "uuid"51 },52 "name": {53 "type": "string"54 },55 "protected": {56 "type": "boolean"57 },58 "domains": {59 "type": "array",60 "items": {61 "type": "string"62 }63 },64 "environment_variables": {65 "type": "array",66 "items": {}67 },68 "active_release_id": {69 "type": [70 "string",71 "null"72 ],73 "format": "uuid"74 },75 "server_hostname": {76 "type": [77 "string",78 "null"79 ]80 }81 },82 "required": [83 "id",84 "name"85 ]86 }87 },88 "releases": {89 "type": "array",90 "items": {91 "type": "object",92 "properties": {93 "id": {94 "type": "string",95 "format": "uuid"96 },97 "name": {98 "type": "string"99 },100 "export_status": {101 "type": "string"102 },103 "build_status": {104 "type": "string"105 },106 "deploy_status": {107 "type": "string"108 }109 },110 "required": [111 "id",112 "name"113 ]114 }115 },116 "created_at": {117 "type": "string",118 "example": "2024-01-15T10:30:00Z"119 },120 "updated_at": {121 "type": "string",122 "example": "2024-01-15T10:30:00Z"123 },124 "published_at": {125 "type": "string"126 },127 "prompt_count": {128 "type": "number"129 },130 "config": {131 "$ref": "#/components/schemas/ProjectConfig"132 },133 "provider": {134 "type": [135 "string",136 "null"137 ]138 },139 "layout": {140 "type": [141 "string",142 "null"143 ]144 },145 "type": {146 "type": "string",147 "enum": [148 "regular",149 "default",150 "template"151 ]152 },153 "system_managed": {154 "type": "boolean"155 },156 "users": {157 "type": "array",158 "items": {159 "type": "object",160 "properties": {161 "id": {162 "type": "string"163 },164 "email": {165 "type": "string"166 },167 "name": {168 "type": "string"169 },170 "role": {171 "type": "string"172 },173 "avatar_src": {174 "type": "string"175 }176 },177 "required": [178 "id"179 ]180 }181 },182 "capabilities": {183 "type": "array",184 "items": {185 "type": "string",186 "enum": [187 "project.read",188 "project.settings.manage",189 "project.delete",190 "project.members.read",191 "project.members.manage",192 "project.invites.read",193 "project.invites.manage",194 "project.files.read",195 "project.files.write",196 "project.realtime.connect",197 "project.realtime.write",198 "project.files.admin",199 "project.uploads.read",200 "project.uploads.write",201 "project.uploads.admin",202 "project.knowledge.read",203 "project.knowledge.write",204 "project.releases.read",205 "project.releases.write",206 "project.deployments.read",207 "project.deployments.write",208 "project.deploy.execute",209 "project.runtime.manage",210 "project.channels.read",211 "project.channels.write",212 "project.sandboxes.manage",213 "project.domains.write",214 "project.environments.manage",215 "project.env_vars.write",216 "project.runs.read",217 "project.runs.write",218 "project.runs.admin",219 "project.approvals.decide",220 "project.agents.read",221 "project.agents.write",222 "project.evals.read",223 "project.evals.write",224 "project.evals.run",225 "project.conversations.read",226 "project.conversations.write",227 "project.conversations.create",228 "project.integrations.read",229 "project.integrations.connect",230 "project.integrations.configure",231 "project.api_keys.read",232 "project.api_keys.manage",233 "project.cache.read",234 "project.cache.write",235 "project.logs.read",236 "project.metrics.read",237 "project.resources.read"238 ]239 }240 },241 "capabilities_version": {242 "type": "integer"243 },244 "labels": {245 "type": "array",246 "items": {247 "type": "object",248 "properties": {249 "id": {250 "type": "string",251 "format": "uuid"252 },253 "namespace": {254 "type": "string"255 },256 "key": {257 "type": "string"258 },259 "value": {260 "type": [261 "string",262 "null"263 ]264 },265 "color": {266 "type": [267 "string",268 "null"269 ]270 }271 },272 "required": [273 "id",274 "namespace",275 "key",276 "value"277 ]278 }279 }280 },281 "required": [282 "id",283 "slug",284 "name"285 ]286}components/schemas/ProjectConfig
JSON
1{2 "type": "object",3 "properties": {4 "disable_meta_robots": {5 "type": "boolean",6 "description": "When true, the rendered site asks crawlers not to index it (noindex robots meta tag)."7 },8 "provider_id": {9 "type": [10 "string",11 "null"12 ],13 "description": "Identifier of the provider backing the project, or null when none is configured. Not necessarily a UUID."14 },15 "layout_id": {16 "type": [17 "string",18 "null"19 ],20 "description": "Identifier of the layout applied to the project, or null when none is configured."21 },22 "is_template": {23 "type": "boolean",24 "description": "Whether the project is offered in the template gallery."25 },26 "coming_soon": {27 "type": "boolean",28 "description": "Whether the template is listed as coming soon in the gallery."29 },30 "category": {31 "type": [32 "string",33 "null"34 ],35 "description": "Template gallery category, or null when uncategorised."36 },37 "description": {38 "type": [39 "string",40 "null"41 ],42 "description": "Template gallery description, or null when none is set."43 },44 "disableMetaRobots": {45 "type": "boolean",46 "description": "Legacy camelCase spelling of `disable_meta_robots`; carries the same value. Prefer `disable_meta_robots`."47 },48 "providerId": {49 "type": [50 "string",51 "null"52 ],53 "description": "Legacy camelCase spelling of `provider_id`; carries the same value. Prefer `provider_id`."54 },55 "layoutId": {56 "type": [57 "string",58 "null"59 ],60 "description": "Legacy camelCase spelling of `layout_id`; carries the same value. Prefer `layout_id`."61 },62 "isTemplate": {63 "type": "boolean",64 "description": "Legacy camelCase spelling of `is_template`; carries the same value. Prefer `is_template`."65 },66 "comingSoon": {67 "type": "boolean",68 "description": "Legacy camelCase spelling of `coming_soon`; carries the same value. Prefer `coming_soon`."69 }70 },71 "additionalProperties": false,72 "description": "Project configuration. Field names use snake_case. Legacy camelCase aliases contain the same values."73}components/schemas/Problem
JSON
1{2 "type": "object",3 "properties": {4 "cause": {5 "type": "string",6 "enum": [7 "schedule_concurrency_forbidden",8 "schedule_fire_in_progress",9 "schedule_run_limit_reached"10 ],11 "description": "Schedule admission refusal."12 },13 "idempotency": {14 "type": "object",15 "properties": {16 "state": {17 "type": "string",18 "enum": [19 "in_progress",20 "payload_mismatch",21 "outcome_unknown"22 ]23 },24 "operation": {25 "type": "string",26 "minLength": 127 },28 "retryable": {29 "type": "boolean"30 },31 "retry_after_seconds": {32 "type": [33 "integer",34 "null"35 ],36 "minimum": 037 },38 "expires_at": {39 "type": [40 "string",41 "null"42 ]43 },44 "recovery": {45 "type": "object",46 "properties": {47 "available": {48 "type": "boolean"49 },50 "description": {51 "type": "string"52 },53 "resource_url": {54 "type": "string"55 }56 },57 "required": [58 "available",59 "description"60 ]61 }62 },63 "required": [64 "state",65 "operation",66 "retryable",67 "retry_after_seconds",68 "expires_at"69 ],70 "description": "Replay status, retry timing, and recovery lookup."71 },72 "type": {73 "type": "string",74 "description": "URI reference identifying the problem type",75 "example": "https://api.veryfront.com/errors/validation-failed"76 },77 "title": {78 "type": "string",79 "description": "Short human-readable summary of the problem",80 "example": "Validation Failed"81 },82 "status": {83 "type": "integer",84 "minimum": 100,85 "maximum": 599,86 "description": "HTTP status code",87 "example": 40088 },89 "code": {90 "type": "string",91 "description": "Stable machine-readable error code",92 "example": "RUN_INVALID_INPUT"93 },94 "detail": {95 "type": "string",96 "description": "Human-readable explanation specific to this occurrence",97 "example": "The 'email' field must be a valid email address"98 },99 "instance": {100 "type": "string",101 "description": "URI reference identifying the specific occurrence",102 "example": "/projects/my-project/members"103 },104 "slug": {105 "type": "string",106 "description": "Stable identifier for the problem type",107 "example": "validation-failed"108 },109 "category": {110 "type": "string",111 "enum": [112 "AUTH",113 "RESOURCE",114 "VALIDATION",115 "DATABASE",116 "SUBSCRIPTION",117 "INTEGRATION",118 "INTERNAL"119 ],120 "description": "API error category",121 "example": "VALIDATION"122 },123 "suggestion": {124 "type": "string",125 "description": "Suggested action to resolve the problem",126 "example": "Check the request body and query parameters against the API documentation."127 },128 "errors": {129 "type": "array",130 "items": {131 "type": "object",132 "properties": {133 "field": {134 "type": "string",135 "description": "Field path that caused the error",136 "example": "email"137 },138 "message": {139 "type": "string",140 "description": "Error message for this field",141 "example": "Invalid email format"142 },143 "code": {144 "type": "string",145 "description": "Error code for this field",146 "example": "INVALID_FORMAT"147 }148 },149 "required": [150 "field",151 "message"152 ]153 },154 "description": "Detailed field-level errors for validation failures"155 }156 },157 "required": [158 "type",159 "title",160 "status"161 ]162}Operation contract
JSON
1{2 "operationId": "createProject",3 "tags": [4 "projects/Projects/Projects"5 ],6 "summary": "Create project",7 "description": "Create a project.",8 "requestBody": {9 "content": {10 "application/json": {11 "schema": {12 "type": "object",13 "properties": {14 "accountId": {15 "type": "string",16 "format": "uuid"17 },18 "name": {19 "type": "string",20 "minLength": 1,21 "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."22 },23 "slug": {24 "type": "string",25 "minLength": 1,26 "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",27 "description": "Project slug; generated when omitted."28 },29 "description": {30 "type": "string",31 "description": "Project description."32 },33 "templateSlug": {34 "type": "string",35 "description": "Starter slug or accessible template project slug. Omit or use blank for an empty project."36 },37 "templateProjectId": {38 "type": "string",39 "format": "uuid",40 "description": "Template project UUID. Without a template, the project starts with no source files."41 },42 "account_id": {43 "type": "string",44 "format": "uuid",45 "description": "Destination account UUID. Defaults to the signed-in user’s default account."46 }47 },48 "required": [49 "name"50 ],51 "additionalProperties": false52 },53 "example": {54 "name": "My Project",55 "description": "A sample project description",56 "templateSlug": "minimal"57 }58 }59 }60 },61 "responses": {62 "201": {63 "description": "Project created.",64 "content": {65 "application/json": {66 "schema": {67 "$ref": "#/components/schemas/Project"68 }69 }70 }71 },72 "400": {73 "description": "Invalid input",74 "content": {75 "application/problem+json": {76 "schema": {77 "$ref": "#/components/schemas/Problem"78 }79 }80 }81 },82 "401": {83 "description": "Authentication required",84 "content": {85 "application/problem+json": {86 "schema": {87 "$ref": "#/components/schemas/Problem"88 }89 }90 }91 },92 "403": {93 "description": "Project-scoped tokens cannot create projects",94 "content": {95 "application/problem+json": {96 "schema": {97 "$ref": "#/components/schemas/Problem"98 }99 }100 }101 },102 "404": {103 "description": "Template project not found",104 "content": {105 "application/problem+json": {106 "schema": {107 "$ref": "#/components/schemas/Problem"108 }109 }110 }111 },112 "409": {113 "description": "Project slug already exists",114 "content": {115 "application/problem+json": {116 "schema": {117 "$ref": "#/components/schemas/Problem"118 }119 }120 }121 },122 "500": {123 "description": "Server error",124 "content": {125 "application/problem+json": {126 "schema": {127 "$ref": "#/components/schemas/Problem"128 }129 }130 }131 }132 },133 "x-documentation-source-tag": "Projects",134 "x-canonical-documentation": {135 "domain": "projects",136 "resource": "Projects",137 "subgroup": "Projects",138 "name": "Create project",139 "description": "Create a project.",140 "operationId": "createProject"141 },142 "x-mint": {143 "href": "/cloud/rest/api-reference/projects-projects-projects/create-project"144 }145}