Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Listsrequires confirm HTTP API

DELETE/api/v1/projects/{project_id}/lists/{list_id}

delete_list

Deletes a mailing list: it stays readable, takes no change from then on and gets no new subscribers; its subscribers are kept.

Call it
when a list is no longer used.
Needs
an admin key with project_id, or a project key with scope write (its own project; the argument is ignored), and confirm: true; without it the call changes nothing and tells what it would do.
Returns
outcome (would_delete, deleted, already_deleted), effect in words and the list as get_list returns it after the call; the API’s DELETE /api/v1/projects/{project_id}/lists/{list_id} answers 204.

Arguments

  • object
  • list_idstring · uuidrequired

    The list’s id.

  • confirmboolean

    true deletes the list. Without it the call only tells what would happen and changes nothing.

    default false

  • project_idstring · uuid | null

    The list’s project. An admin key must pass it; a project key’s own project is used and this is ignored.

No other arguments are accepted.

Result

The result comes back as structuredContent, with the same JSON as a text block.

  • object · all fields required
  • effectstring

    The outcome in words, for the agent and its user.

  • listList

    The list as it is now.

    9 fields
    • List object · all fields required
    • confirmation_template_idstring · uuid | null

      The template of the confirmation letter; null: none.

    • created_atstring · date-time
    • deleted_atstring · date-time | null

      When the list was deleted; null while it is live. A deleted list can only be read.

    • double_opt_inboolean

      Subscribers confirm by a link before they get campaigns.

    • from_overrideFromOverride | null

      The sender of the list’s own letters; null: the project’s.

      2 fields
      • FromOverride object · all fields required
      • from_emailstring
      • from_namestring | null

        null: the project’s settings.from_name.

    • idstring · uuid
    • namestring
    • project_idstring · uuid

      The list’s project.

    • updated_atstring · date-time

      The latest change: creation, name, options, deletion.

  • outcomeOutcome

    What a call of delete_project or delete_list did.

    would_delete A dry run: nothing changed; a call with confirm: true deletes.

    deleted Deleted now.

    already_deleted Deleted before; nothing changed.

Definitions

FromOverride

The sender of a list’s own letters.

  • object · all fields required
  • from_emailstring
  • from_namestring | null

    null: the project’s settings.from_name.

List

A mailing list of a project (create_list, get_list, update_list; GET /api/v1/projects/{project_id}/lists/{list_id}).

  • object · all fields required
  • confirmation_template_idstring · uuid | null

    The template of the confirmation letter; null: none.

  • created_atstring · date-time
  • deleted_atstring · date-time | null

    When the list was deleted; null while it is live. A deleted list can only be read.

  • double_opt_inboolean

    Subscribers confirm by a link before they get campaigns.

  • from_overrideFromOverride | null

    The sender of the list’s own letters; null: the project’s.

    see FromOverride

  • idstring · uuid
  • namestring
  • project_idstring · uuid

    The list’s project.

  • updated_atstring · date-time

    The latest change: creation, name, options, deletion.

Outcome

What a call of delete_project or delete_list did.

string · enum

would_delete A dry run: nothing changed; a call with confirm: true deletes.

deleted Deleted now.

already_deleted Deleted before; nothing changed.

Errors

A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors

HTTP API

The same operation over HTTP: DELETE /api/v1/projects/{project_id}/lists/{list_id}