[POST] projects

POST /api/v1/projects

Creates or updates a project using project_app_id as the key identifier.

Required Parameters:

  • project_app_id (string)
  • name (string)
  • organization_id (integer)
  • active (integer: 1 or 0)
  • created_at (string in UTC format)

Example Request:

{
  "project_app_id": "PROJ-001",
  "name": "Inventory Management System",
  "organization_id": 123,
  "active": 1,
  "created_at": "2024-01-15 10:30:00"
}

Example Response:

{
"status": "success",
"message": "Project created successfully",
"data": {
"project_id": 456,
"project_app_id": "PROJ-001"
}
}

Validations:

  • ✅ Organization must exist
  • ✅ Organization must match token scope
  • ✅ Date format must be valid (UTC)
  • ✅ All required fields must be present

Error Codes:

  • 400: Invalid input
  • 401: Invalid or missing token
  • 403: Organization not in token scope
  • 404: Organization not found
  • 500: Internal server error