Trello API: Add List
The Add List endpoint allows you to create a new list on an existing board. You need to provide the board ID and the list name to use this endpoint.
Endpoint Details
- Method:
POST
- Endpoint URL:
https://api.trello.com/1/lists
- Authentication: Requires
key
and token
as query parameters.
Required Parameters
Parameter |
Type |
Description |
name |
String |
The name of the list. |
idBoard |
String |
The ID of the board where the list will be created. |
Optional Parameters
Parameter |
Type |
Description |
pos |
String |
Position of the list in the board (e.g., "top" or "bottom"). |
Example API Request
POST https://api.trello.com/1/lists
Content-Type: application/json
{
"name": "New List Example",
"idBoard": "12345abcdef",
"pos": "top",
"key": "YOUR_API_KEY",
"token": "YOUR_ACCESS_TOKEN"
}
Example API Response
{
"id": "60d21b4967d0d810b8f8b456",
"name": "New List Example",
"idBoard": "12345abcdef",
"pos": "top",
"subscribed": false,
"closed": false
}
Common Errors & Solutions
Error Code |
Possible Cause |
Solution |
400 Bad Request |
Missing required parameters |
Ensure name and idBoard are provided. |
401 Unauthorized |
Invalid API key or token |
Check API credentials and re-authenticate. |
404 Not Found |
Invalid board ID |
Verify that the idBoard corresponds to an existing Trello board. |