Lists
Lists
A list represents one batch of leads (from a single generate or generate-batch request). You can list lists, get a list's status (to poll until completed), rename, delete, and reprocess. To download processed results, see Export.
List lists
GET /api/v1/lists · scope lists:read
Returns lead lists in the API key's workspace, with optional filters.
Headers
Authorization: Bearer <API_KEY> or X-API-Key: <API_KEY>.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaign_id | string (UUID) | No | Filter by campaign. |
status | string | No | Filter by processing_status: e.g. pending, processing, in_progress, completed, failed. |
limit | number | No | Max results (default 50, max 100). |
offset | number | No | Pagination offset (default 0). |
Example request
curl -X GET "https://app.machfive.io/api/v1/lists?status=completed&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200 OK)
{
"lists": [
{
"id": "uuid",
"campaign_id": "uuid",
"custom_name": "API Batch Q1",
"processing_status": "completed",
"created_at": "2025-01-15T12:00:00.000Z",
"completed_at": "2025-01-15T12:15:00.000Z"
}
],
"has_more": false,
"total": 1
}| Field | Type | Description |
|---|---|---|
lists[].id | string (UUID) | List ID (use for status and export). |
lists[].campaign_id | string | null | Campaign ID. |
lists[].custom_name | string | null | Display name. |
lists[].processing_status | string | pending, processing, in_progress, completed, or failed. (in_progress is an active processing state, equivalent to processing for polling purposes.) |
lists[].created_at | string | null | Creation time (ISO 8601). |
lists[].completed_at | string | null | When processing completed (if done). |
Get list status
GET /api/v1/lists/:id · scope lists:read
Returns status and metadata for one list. Use this to poll until processing_status is completed or failed after a generate-batch request.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | List ID (e.g. list_id from generate-batch response). |
Example request
curl -X GET "https://app.machfive.io/api/v1/lists/LIST_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200 OK)
Base fields (always present):
{
"id": "uuid",
"campaign_id": "uuid",
"custom_name": "API Batch Q1",
"processing_status": "completed",
"created_at": "2025-01-15T12:00:00.000Z",
"updated_at": "2025-01-15T12:15:00.000Z"
}When processing_status is completed:
| Field | Type | Description |
|---|---|---|
leads_count | number | null | Number of leads processed. |
emails_created | number | null | Total emails generated. |
processed_file_path | string | null | Internal path; use export endpoint to download. |
completed_at | string | null | When processing completed (ISO 8601). |
When processing_status is failed:
| Field | Type | Description |
|---|---|---|
failed_at | string | null | When processing failed (ISO 8601). |
Error responses
| Status | Error | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 404 | NOT_FOUND | List not found or not in this workspace. |
| 500 | INTERNAL_ERROR | Server error. |
Rename a list
PATCH /api/v1/lists/:id · scope lists:write
Renames a list (updates its custom_name).
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | List ID. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
custom_name | string | Yes | New display name (1–200 characters, trimmed). |
Example request
curl -X PATCH "https://app.machfive.io/api/v1/lists/LIST_ID" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "custom_name": "Q1 Enterprise Outreach" }'Response (200 OK)
{
"id": "uuid",
"campaign_id": "uuid",
"custom_name": "Q1 Enterprise Outreach",
"processing_status": "completed",
"created_at": "2025-01-15T12:00:00.000Z",
"updated_at": "2025-01-16T09:00:00.000Z"
}Error responses
| Status | Error | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing or invalid custom_name. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the lists:write scope. |
| 404 | NOT_FOUND | List not found or not in this workspace. |
| 500 | INTERNAL_ERROR | Server error. |
Delete a list
DELETE /api/v1/lists/:id · scope lists:write
Permanently deletes a list and cleans up its uploaded/processed CSV files in storage. A list that is currently processing (processing or in_progress) cannot be deleted (409 CONFLICT); wait until it completes or fails.
Deleting a list also removes its processing batches. Credit usage history is retained for auditing.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | List ID. |
Example request
curl -X DELETE "https://app.machfive.io/api/v1/lists/LIST_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200 OK)
{ "id": "uuid", "deleted": true }Error responses
| Status | Error | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the lists:write scope. |
| 404 | NOT_FOUND | List not found or not in this workspace. |
| 409 | CONFLICT | List is currently processing (processing or in_progress). detail.processing_status shows the current status. |
| 500 | INTERNAL_ERROR | Server error. |
Reprocess a list
POST /api/v1/lists/:id · scope lists:write
Re-triggers processing for a list's pending batches via the same pipeline used in-app. Use this to resume a list that stalled with some batches still pending.
Pending-only: Only batches still in the
pendingstate are re-triggered. Batches that alreadyfailedorcompletedare not reset by this endpoint. This is an async operation — pollGET /api/v1/lists/:idto follow progress.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string (UUID) | List ID. |
Example request
curl -X POST "https://app.machfive.io/api/v1/lists/LIST_ID" \
-H "Authorization: Bearer YOUR_API_KEY"Response (202 Accepted)
{
"list_id": "uuid",
"status": "processing",
"pending_batches": 3,
"batches_total": 10,
"message": "Triggered reprocessing for 3 pending batch(es)."
}| Field | Type | Description |
|---|---|---|
list_id | string (UUID) | The list being reprocessed. |
status | string | Always processing once accepted. |
pending_batches | number | Number of pending batches re-triggered. |
batches_total | number | Total batches for the list. |
message | string | Human-readable summary. |
Error responses
| Status | Error | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the lists:write scope. |
| 404 | NOT_FOUND | List not found or not in this workspace. |
| 422 | UNPROCESSABLE | The processing pipeline rejected the request. |
| 429 | RATE_LIMITED | Rate limit exceeded (this write fails closed when the limiter is unavailable). |
| 500 | INTERNAL_ERROR | Server error. |