Skip to content

Latest commit

 

History

History
210 lines (146 loc) · 4.24 KB

File metadata and controls

210 lines (146 loc) · 4.24 KB
title Create a module
description Create a module via Plane API. HTTP request format, parameters, scopes, and example responses for create a module.
keywords plane, plane api, rest api, api integration, module, create a module

Create a module

POST /api/v1/workspaces/{workspace_slug}/projects/{project_id}/modules/

Create a new project module with specified name, description, and timeline.

Path Parameters

The unique identifier of the project.

The workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.

Body Parameters

Name.

Description.

Start date.

Target date.

  • backlog - Backlog
  • planned - Planned
  • in-progress - In Progress
  • paused - Paused
  • completed - Completed
  • cancelled - Cancelled

Lead.

Members.

External source.

External id.

Scopes

projects.modules:write

curl -X POST \
  "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/modules/" \
  -H "X-API-Key: $PLANE_API_KEY" \
  # Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Example Name",
  "description": "Example description",
  "start_date": "2024-01-01",
  "end_date": "2024-01-01",
  "external_id": "550e8400-e29b-41d4-a716-446655440000",
  "external_source": "github"
}'
import requests

response = requests.post(
    "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/modules/",
    headers={"X-API-Key": "your-api-key"},
    json={
      "name": "Example Name",
      "description": "Example description",
      "start_date": "2024-01-01",
      "end_date": "2024-01-01",
      "external_id": "550e8400-e29b-41d4-a716-446655440000",
      "external_source": "github"
    }
)
print(response.json())
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/modules/", {
  method: "POST",
  headers: {
    "X-API-Key": "your-api-key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "Example Name",
    description: "Example description",
    start_date: "2024-01-01",
    end_date: "2024-01-01",
    external_id: "550e8400-e29b-41d4-a716-446655440000",
    external_source: "github",
  }),
});
const data = await response.json();
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Example Name",
  "description": "Example description",
  "start_date": "2024-01-01",
  "target_date": "2024-01-01",
  "status": "in-progress",
  "total_issues": 12,
  "completed_issues": 5,
  "cancelled_issues": 0,
  "started_issues": 4,
  "unstarted_issues": 3,
  "backlog_issues": 0,
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}