Projects
Create a project
Create a project; its slug is derived from the name and must be unique in the organization.
Updated
https://cloud.cahaves.com/api/projects
Authorization
cahaves.cloud.sessionstringcookierequired
The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.
Headers
X-Cloud-Organizationstring<uuid>
The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.
Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"
Body
application/jsonrequired
namestringrequired
Responses
application/json
The created project.
projectobjectrequired
The project is made in the organization the request works in, and stays there. A name is 1 to 60 characters after surrounding spaces are trimmed. The answer carries the slug the project is addressed by from now on, derived from the name.
Uniqueness is checked on the slug, not the name, among the organization's projects. Shop! and Shop derive the same slug, so the second answers 422 naming name with "You already have a project with that name." Another of your organizations may have a project with the same slug. A workspace that is not ready answers 409.