auto_write
cs

Connect an IMAP support mailbox and its outgoing mail server, or — with mailbox_id — replace the username and password (

Changed on

Connect an IMAP support mailbox and its outgoing mail server, or — with mailbox_id — replace the username and password (and optionally the server settings) of one that is refused. The connection is tested at once; the mailbox is kept either way and connection_error says what to fix. Gmail and Microsoft 365 need an app password here, or the one-use consent link instead. The password is write-only: it is never stored in the conversation or returned. An app may connect a mailbox only for an owner or admin of the store (403 otherwise). A mailbox an app connects starts with IMAP write-back off and is not the default outbox; a signature is refused here and proposed after connecting. Requires an idempotency_key.

post/api/v1/tools/cs_mailbox_connect_imap

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopescs:write

Headers

Idempotency-Key, string

Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
mailbox_id, string uuid

Replace this mailbox's credentials instead of connecting a new one.

display_name, string
email_address, string email
imap_host, string
imap_port, integer

Default 993.

imap_ssl, boolean

Default true.

smtp_host, string
smtp_port, integer

Default 587.

smtp_starttls, boolean

Required on a port other than 465, 587 or 25.

username, string required
password, string required

Never stored in the conversation or returned.

signature_text, string nullable

Refused from an app (a signature is a proposal).

idempotency_key, string required

Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision