Generated from Postwind commit a19b2e4 OpenAPI 0.1.0 synced

Lists HTTP API

POST/api/v1/projects/{project_id}/lists

create_list

Creates a mailing list in a project, the audience campaigns go to.

Call it
before adding subscribers.
Needs
an admin key with project_id, or a project key with scope write (its own project; the argument is ignored), and, with double_opt_in, a confirmation_template_id naming a message template of the project (create_template). Names need not be unique.
Returns
the list, the same as POST /api/v1/projects/{project_id}/lists. There is no Idempotency-Key: if a call gets no answer, check list_lists before calling again, or a second list is made.

Arguments

  • object
  • namestringrequired

    What people call the list: 1 to 128 characters. Two lists may share a name.

    example Weekly news

  • confirmation_template_idstring · uuid | null

    The template of the confirmation letter: the id of a message template of the project; required with double_opt_in. Null or left out: none.

  • double_opt_inboolean

    Subscribers confirm by a link before they get campaigns; default false. Needs confirmation_template_id.

  • from_overrideFromOverrideArguments | null

    The sender of the list’s own letters (confirmations) in place of the project’s; null or left out: the project’s.

    2 fields
    • FromOverrideArguments object
    • from_emailstringrequired

      The sender address.

      example news@acme.example

    • from_namestring | null

      The sender name, 1 to 128 characters, no line breaks; null or left out: the project’s settings.from_name.

  • project_idstring · uuid | null

    The project to create the list in. 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
  • 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.

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.

FromOverrideArguments

The sender of a list’s own letters.

  • object
  • from_emailstringrequired

    The sender address.

    example news@acme.example

  • from_namestring | null

    The sender name, 1 to 128 characters, no line breaks; null or left out: the project’s settings.from_name.

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: POST /api/v1/projects/{project_id}/lists