Skip to main content
This endpoint creates a new project and registers the authenticated user as its administrator. The project name is required; description and domain are optional. After creation the caller is automatically recorded in a UserProjectMapping with privilege=1 (Admin), granting them full control over the project including SDK key management.
The caller becomes the sole Admin of the project at creation time. Additional members can be added separately via the project membership endpoints.

Request

Method: POST
URL: http://localhost:8000/api/project/v1/create/
Authentication: X-OTAS-USER-TOKEN header

Headers

X-OTAS-USER-TOKEN
string
required
Signed JWT returned by /api/user/v1/login/ or /api/user/v1/create/.

Body parameters

project_name
string
required
Human-readable name for the project (max 255 characters).
project_description
string
Optional short description of the project (max 300 characters).
project_domain
string
Optional URL of the project’s primary domain (e.g. https://myapp.example.com).

Response

status
integer
required
1 on success, 0 on failure.
status_description
string
required
project_created on success.
response_body
object

Example

curl --request POST \
  --url http://localhost:8000/api/project/v1/create/ \
  --header 'Content-Type: application/json' \
  --header 'X-OTAS-USER-TOKEN: <your-token>' \
  --data '{
    "project_name": "My Agent App",
    "project_description": "Production project for the recommendation agent",
    "project_domain": "https://myapp.example.com"
  }'
{
  "status": 1,
  "status_description": "project_created",
  "response_body": {
    "project": {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "My Agent App",
      "description": "Production project for the recommendation agent",
      "domain": "https://myapp.example.com"
    }
  }
}

Error responses

status_descriptionHTTP statusCause
missing_token400The X-OTAS-USER-TOKEN header was absent.
invalid_token401The token is malformed, expired, or not associated with a user.
project_creation_failed400Payload validation failed or project_name was missing.
project_creation_failed500Unexpected server-side error during project creation.

Build docs developers (and LLMs) love