Skip to main content

POST /cards

Description

Creates a new card and returns a json object with a new card ID

The route handles the HTTP POST request made to the /cards path.

Payload

The server expects to receive a json object with the next properties:

NameTypeDescription
labelstringRequired. The name of a new card to be added.
columnnumberRequired. The target column ID.
rownumberRequired. The target row ID.

Example:

{
"label": "New card",
"column": 2,
"row": 1,
}

Response

The route returns a json object with a new card ID.

Example:

{ 
"id": 1
}

The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: Working with server