Skip to content

Create Project Task

POST https://api-mwm.datallog.com/api/create-project

Creates a new project for the authenticated user.
This endpoint validates all required fields, region availability, image version support, project naming rules, user plan limits and creates a new project instance.


Authentication

This endpoint requires both of the following headers.


Authorization: Token <your_token>

x-api-key: <your_x_api_key>

Request Body (JSON)

Required Fields

FieldTypeDescription
regionstringAWS region where the project will be created.
docker_versionstringSupported runtime version.
namestringUnique project name.

Example:

json
{
  "region": "us-east-1",
  "docker_version": "python-3.10",
  "name": "my-new-project"
}

Validation Rules

The request will fail if any of the following conditions occur:

  • Missing required fields (region, docker_version, name)
  • Unsupported region
  • Unsupported runtime version
  • Project name already exists for the user
  • Project name has invalid characters (must match: ^[a-z0-9][a-z0-9_-]*$)
  • User exceeds plan project limit

Project Name Rules

A valid project name must:

  • start with a lowercase letter or number

  • contain only:

    • lowercase letters
    • numbers
    • hyphens (-)
    • underscores (_)
  • not allow uppercase chars or special characters

Example of valid names:

  • my-project
  • service_01
  • app1

Example of invalid names:

  • MyProject
  • project!
  • _startproject

Success Response (200)

json
{
  "message": "Deploy created successfully"
}

Error Responses

400 — Missing required fields

json
{
  "error": "Missing required field(s): region, docker_version"
}

400 — Unsupported region

json
{
  "message": "The selected region isn't supported"
}

400 — Unsupported docker version

json
{
  "message": "This container image isn't supported"
}

400 — Project already exists

json
{
  "message": "A project with the name 'my-project' already exists."
}

400 — Invalid project name

json
{
  "message": "Invalid project name. It must start with a lowercase letter or number, and can only contain lowercase letters, numbers, hyphens (-), or underscores (_). Uppercase letters and special characters are not allowed."
}

400 — User reached project limit

json
{
  "message": "You've reached your plan's maximum project count, please update your plan"
}

Example Request

bash
curl -X POST \
  https://api-mwm.datallog.com/api/create-project \
  -H "Authorization: Token <YOUR_TOKEN>" \
  -H "x-api-key: <YOUR_X_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
        "region": "us-east-1",
        "docker_version": "python-3.10",
        "name": "my-new-project"
      }'