[GH-ISSUE #984] Heads-up: Task creation via Vikunja API v0.24.x – only PUT works, not POST #6316

Closed
opened 2026-04-20 16:54:02 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @SoolinB8 on GitHub (Jun 19, 2025).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/984

Description

I spent hours debugging this and want to save others the same pain.

Problem:
The official Vikunja API docs state you should use a POST request to /api/v1/projects/<project_id>/tasks (or sometimes /api/v1/tasks) to create a new task.
However, on my installation (Vikunja v0.24.6, no custom config.yml, default Docker setup), POST always returns 404 Not Found — but the web frontend can create tasks just fine.

Solution:
The frontend actually uses a PUT request (not POST!) to /api/v1/projects/<project_id>/tasks to create a new task.

Working example (cURL):

curl -X PUT http://localhost:3456/api/v1/projects/3/tasks \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{"title": "Task via PUT", "description": "Created by script", "project_id": 3}'

	•	POST to the same endpoint returns 404.
	•	PUT as above returns 201 Created and creates the task.

Background:
	•	The Vikunja web frontend uses this route/method as well — always double-check with browser devtools if API docs don’t match real behavior.
	•	This seems to be a version/build-specific quirk. (Tested on v0.24.6.)

Tips:
	•	If you get 404s with POST on /tasks or /projects/<id>/tasks, try PUT instead!
	•	No custom config, just a standard install.
	•	Double-check the API request method and route using the web frontend’s devtools.

Hope this saves someone a lot of head-scratching!
(Mods: Feel free to update the docs accordingly.)

### Vikunja Version

0.24

### Browser and version

_No response_

### Can you reproduce the bug on the Vikunja demo site?

Please select

### Screenshots

_No response_
Originally created by @SoolinB8 on GitHub (Jun 19, 2025). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/984 ### Description I spent hours debugging this and want to save others the same pain. **Problem:** The official Vikunja API docs state you should use a **POST** request to `/api/v1/projects/<project_id>/tasks` (or sometimes `/api/v1/tasks`) to create a new task. However, on my installation (Vikunja v0.24.6, no custom config.yml, default Docker setup), **POST always returns 404 Not Found** — but the web frontend can create tasks just fine. **Solution:** The frontend actually uses a **PUT** request (not POST!) to `/api/v1/projects/<project_id>/tasks` to create a new task. **Working example (cURL):** ```bash curl -X PUT http://localhost:3456/api/v1/projects/3/tasks \ -H "Authorization: Bearer <your_token>" \ -H "Content-Type: application/json" \ -d '{"title": "Task via PUT", "description": "Created by script", "project_id": 3}' • POST to the same endpoint returns 404. • PUT as above returns 201 Created and creates the task. Background: • The Vikunja web frontend uses this route/method as well — always double-check with browser devtools if API docs don’t match real behavior. • This seems to be a version/build-specific quirk. (Tested on v0.24.6.) Tips: • If you get 404s with POST on /tasks or /projects/<id>/tasks, try PUT instead! • No custom config, just a standard install. • Double-check the API request method and route using the web frontend’s devtools. Hope this saves someone a lot of head-scratching! (Mods: Feel free to update the docs accordingly.) ### Vikunja Version 0.24 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Please select ### Screenshots _No response_
GiteaMirror added the waiting for reply label 2026-04-20 16:54:02 -05:00
Author
Owner

@kolaente commented on GitHub (Jun 22, 2025):

Where in the docs have you seen this? The swagger docs correctly say PUT. https://try.vikunja.io/api/v1/docs#tag/task/paths/1projects1%7Bid%7D~1tasks/put

<!-- gh-comment-id:2994403200 --> @kolaente commented on GitHub (Jun 22, 2025): Where in the docs have you seen this? The swagger docs correctly say `PUT`. https://try.vikunja.io/api/v1/docs#tag/task/paths/~1projects~1%7Bid%7D~1tasks/put
Author
Owner

@kolaente commented on GitHub (Jul 23, 2025):

Closing as inactive, please ping or open a new issue with relevant information if you still have this problem.

<!-- gh-comment-id:3106920342 --> @kolaente commented on GitHub (Jul 23, 2025): Closing as inactive, please ping or open a new issue with relevant information if you still have this problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6316