Skip to content

fix(card): pass required type field to createCard#89

Merged
JustSamuel merged 1 commit into
mainfrom
fix/card-type-required
May 7, 2026
Merged

fix(card): pass required type field to createCard#89
JustSamuel merged 1 commit into
mainfrom
fix/card-type-required

Conversation

@JustSamuel

Copy link
Copy Markdown
Collaborator

Why

Trace logs after the v3 client bump show every `createCard` call returning 400:

```
[TRACE] Planka - created card 178 status 400
[TRACE] Planka - created card 177 status 400
...
```

Planka v2 split cards into two kinds and `type` is now a required body field on `POST /api/lists/{listId}/cards`:

```json
"required": ["type", "name"],
"properties": {
"type": { "enum": ["project", "story"] },
...
}
```

I missed this in #85 — the migration kept the v1 body shape (`name`/`position` only) which is now rejected.

Fix

Add `type: 'project'` to the request body. The email-to-card flow corresponds to plain "project" cards (the spec's example default); `story` is for user-story workflows with sub-issues which we don't use.

Planka v2 split cards into two kinds — `project` and `story` — and
the `type` field is now required on `POST /api/lists/{listId}/cards`.
Without it, every createCard returned 400 (visible in the trace logs:
"created card NNN status 400" for every card).

Existing email-to-card flow corresponds to the regular `project`
kind (the spec's example default). `story` cards are for user-story
workflows with sub-issues, which we don't use.
@JustSamuel JustSamuel merged commit edd114e into main May 7, 2026
3 checks passed
@JustSamuel JustSamuel deleted the fix/card-type-required branch May 7, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant