Label added through API with status 201 not appearing in frontend

All indications seem to point to it worked. This is what the log says:
PUT 201 /api/v1/tasks/181/labels 35.411884ms -

PHP confirms that I’m getting a 201 back with the following data:

Array
(
    [label_id] => 0
    [created] => 2025-04-09T00:46:06.902028236Z
)

Should I be concerned that it’s returning label_id == 0? In every other respect it appears to have worked, but it’s not showing up in browser.

It’s the latest version of stable (The frontend says Version: v0.24.6).

Many thanks!

It looks like I may have misunderstood the documentation. As I recall, it accepted a label ID and nothing else. I looked at the request in the browser and the request resembled the following:

                        $labelArr = [
                            'id' => 0,
                            'label_id' => $newLabelId,
                            'max_right' => null,
                            'task_id' => $newTask['id'],
                        ];

I altered the code to send those four values and now it’s working.

1 Like