Reference · Lists
Rename a list or set its client
PATCH /api/v1/lists/{id}
Gives the list a new name, puts it under a client, or both. Send at least one of the two. Its rows and results stay as they are, and sending the same value twice changes nothing.
Credits: Free.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
id | integer | yes | The id. |
Body (JSON)
| Name | Type | Required | What it is |
|---|---|---|---|
name | string | The new name. | |
client | string | The client to group this list under, as in the app. Null or an empty text takes it out. |
Example request
curl -X PATCH "https://moleman.io/api/v1/lists/123" \
-H "Authorization: Bearer $MOLEMAN_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"Austin dentists, spring","client":"Example Dental Group"}'Example answer
{
"listId": 381,
"name": "Austin dentists, spring",
"client": "Example Dental Group",
"rowCount": 2,
"livemode": true,
"createdAt": 1762344000000
}Errors
| Status | Code | When |
|---|---|---|
| 401 | missing_api_key | The request has no API key. |
| 401 | invalid_api_key | The API key is not one of ours (a typo, a cut-off copy, or a key from another account that was deleted). |
| 401 | revoked_api_key | The API key was revoked on the API page (at once), or it was rotated and its 24 hours are over. Old test keys (mm_test_) are revoked too. |
| 401 | expired_api_key | The API key reached the expiry date set when it was created. |
| 429 | rate_limited | More than 120 requests in one minute with this key. |
| 500 | server_error | Something broke on our side. Nothing was charged for it. |
| 400 | invalid_request | A parameter is missing, has the wrong type or is out of range. details lists every problem with its path. |
| 404 | not_found | The job or list does not exist, belongs to another account, or was deleted. |