View as Markdown

Delete List

DELETE/v2/lists/{id}

Moves a list to Trash, restorable for 90 days, and takes its records out of it; with with_records=true the records themselves also move to Trash. Answers a list_delete job: 200 with the done job when the work ran inline, else 202 with the running job and Location: /v2/jobs/{id} (poll it after Retry-After). One bulk action runs per workspace at a time. Without an Idempotency-Key, a retry after the delete answers 404; with one, it answers the same job. Uses 1 unit of the jobs rate limit. Free: costs no credits.

Path parameters

  • idstringrequired

    The list id (24 hex characters).

    Example: "66f1a2b3c4d5e6f7a8b9c0d1"

Query parameters

  • with_recordsenumoptionaldefault: "false"

    true also moves every record of the list to Trash.

    Allowed values: true false

Responses

  • 200 Done inline: the done job.
  • 202 Queued: the running job; poll Location.
  • 400 Invalid query or Idempotency-Key (VALIDATION_ERROR with payload.code).
  • 401 Missing, unknown or inactive credentials (UNAUTHORIZED).
  • 404 No such list in this workspace (NOT_FOUND).
  • 409 Another bulk action of the workspace is still running (CONFLICT, payload.code: bulk_action_running with its job_id; poll it, then retry); or the Idempotency-Key was used for another request (idempotency_key_reused), or its first request is still running inline (idempotency_in_progress, with Retry-After).
  • 422 The list holds more than 500,000 records (LIST_TOO_LARGE); nothing was changed.
  • 429 Over the jobs rate limit (RATE_LIMIT); wait Retry-After seconds. Sent only where rate limits are enforced.
  • 500 Unexpected server error.

For error handling see Errors. The list fields are described in List object.