create a project.md

Create a project

Management API · Projects

PUT https://app.mk.io/api/v1/projects/{project_name}

New project.

RBAC Capability Required: core.project.create or core.project.assign

Authentication

Path parameters

Name Type Required Description
project_name string Yes

Request body

Content type: application/json

Example request

curl -X PUT "https://app.mk.io/api/v1/projects/{project_name}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "displayName": "string",
  "locationName": "string",
  "paymentMethodId": "00000000-0000-0000-0000-000000000000"
}'

Responses

201 — Created

Example:

{
  "kind": "string",
  "metadata": {
    "cloud": {
      "displayName": "Azure",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "azure"
    },
    "created": "2024-01-01T00:00:00Z",
    "createdBy": "00000000-0000-0000-0000-000000000000",
    "createdByEmail": "string",
    "createdById": "00000000-0000-0000-0000-000000000000",
    "createdByName": "string",
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "updated": "2024-01-01T00:00:00Z"
  },
  "spec": {
    "assignedPaymentMethodId": "00000000-0000-0000-0000-000000000000",
    "displayName": "string",
    "isActive": true,
    "locationDisplayName": "string",
    "locationId": "00000000-0000-0000-0000-000000000000",
    "locationName": "string",
    "name": "string"
  }
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}