Create a worklog ​
POST/api/v1/workspaces/{slug}/projects/{project_id}/work-items/{issue_id}/worklogs/
Create a new worklog entry
Path Parameters ​
issue_id:requiredstringIssue id.
project_id:requiredstringProject ID
slug:requiredstringWorkspace slug
Body Parameters ​
description:optionalstringDescription.
duration:optionalintegerDuration.
created_by:optionalstringCreated by.
updated_by:optionalstringUpdated by.
Scopes ​
projects.work_items.worklogs:write
Create a worklog
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/worklogs/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Example description",
"duration": 1,
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/worklogs/",
headers={"X-API-Key": "your-api-key"},
json={
"description": "Example description",
"duration": 1,
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000"
}
)
print(response.json())javascript
const response = await fetch(
"https://api.plane.so/api/v1/workspaces/my-workspace/projects/550e8400-e29b-41d4-a716-446655440000/work-items/550e8400-e29b-41d4-a716-446655440001/worklogs/",
{
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Example description",
duration: 1,
created_by: "550e8400-e29b-41d4-a716-446655440000",
updated_by: "550e8400-e29b-41d4-a716-446655440000",
}),
}
);
const data = await response.json();Response201
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"description": "Example description",
"duration": 1,
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000",
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"workspace_id": "550e8400-e29b-41d4-a716-446655440000",
"logged_by": "550e8400-e29b-41d4-a716-446655440000"
}
