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 scopewrite(its own project; the argument is ignored), andconfirm: true; without it the call changes nothing and tells what it would do. - Returns
outcome(would_delete,deleted,already_deleted),effectin words and the list asget_listreturns it after the call; the API’sDELETE /api/v1/projects/{project_id}/lists/{list_id}answers 204.
Arguments
- object
-
list_idstring · uuidrequiredThe list’s id.
-
confirmbooleantruedeletes the list. Without it the call only tells what would happen and changes nothing.default
false -
project_idstring · uuid | nullThe 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
-
effectstringThe outcome in words, for the agent and its user.
-
listListThe list as it is now.
9 fields
- List object · all fields required
-
confirmation_template_idstring · uuid | nullThe template of the confirmation letter;
null: none. -
created_atstring · date-time -
deleted_atstring · date-time | nullWhen the list was deleted;
nullwhile it is live. A deleted list can only be read. -
double_opt_inbooleanSubscribers confirm by a link before they get campaigns.
-
from_overrideFromOverride | nullThe sender of the list’s own letters;
null: the project’s.2 fields
- FromOverride object · all fields required
-
from_emailstring -
from_namestring | nullnull: the project’ssettings.from_name.
-
idstring · uuid -
namestring -
project_idstring · uuidThe list’s project.
-
updated_atstring · date-timeThe latest change: creation, name, options, deletion.
-
outcomeOutcomeWhat a call of
delete_projectordelete_listdid.would_deleteA dry run: nothing changed; a call withconfirm: truedeletes.deletedDeleted now.already_deletedDeleted before; nothing changed.
Definitions
FromOverride
The sender of a list’s own letters.
- object · all fields required
-
from_emailstring -
from_namestring | nullnull: the project’ssettings.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 | nullThe template of the confirmation letter;
null: none. -
created_atstring · date-time -
deleted_atstring · date-time | nullWhen the list was deleted;
nullwhile it is live. A deleted list can only be read. -
double_opt_inbooleanSubscribers confirm by a link before they get campaigns.
-
from_overrideFromOverride | nullThe sender of the list’s own letters;
null: the project’s.see FromOverride
-
idstring · uuid -
namestring -
project_idstring · uuidThe list’s project.
-
updated_atstring · date-timeThe 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}