v1

latestOpenAPI 3.1.02026-08-061,5107704.5 MB
Email

EmailMailboxRelations.update

Modifies EmailMailboxRelation or EmailMailboxRelations with given id(s)

patch/entities/EmailMailboxRelations/{id}

Path parameters

idstring uuid required

ID of EmailMailboxRelation to update

Query parameters

validation-levelinteger

Specify validation level of EmailMailboxRelation on update. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.

Request body

direction1 | 2

Field whose values are strictly defined with an enumeration of values.

Integer enum value: 1 - OutgoingEmail, 2 - IncomingEmail

email_idstring uuid

Id of the email that belongs to the mailbox.

email_is_deletedboolean

Denormalized flag indicating that the related email has been deleted from this mailbox; such relations are hidden from the inbox view.

error_codeinteger

Error code for the email in this mailbox; 0 means the email was processed without error.

event_typesstring

Field whose values are strictly defined with an enumeration of values.

is_scheduledboolean

Whether the email is scheduled to be sent at a future time and has not been sent yet.

mailbox_idstring uuid

Id of the mailbox (connected email account) the email belongs to.

sent_or_scheduled_atstring date-time

Time when the email was sent, or its scheduled send time if it has not been sent yet.

thread_or_idstring uuid

Id of the email thread, or the id of the email itself when it does not belong to a thread.

type1 | 2

Field whose values are strictly defined with an enumeration of values.

Integer enum value: 1 - Standard, 2 - Mass

Example request

{
  "direction": 1,
  "email_id": "01234567-abcd-dcba-ffff-000000000000",
  "error_code": 1,
  "mailbox_id": "01234567-abcd-dcba-ffff-000000000000",
  "sent_or_scheduled_at": "2019-01-01T00:00:00",
  "thread_or_id": "01234567-abcd-dcba-ffff-000000000000",
  "type": 1
}

Response

Modification confirmation. Returns resulting EmailMailboxRelation

successboolean

True when response succeeded, false on error.

Example response

{
  "success": true,
  "data": {
    "id": "01234567-abcd-dcba-ffff-000000000000",
    "modified": "2019-01-01T00:00:00",
    "created": "2019-01-01T00:00:00",
    "direction": 1,
    "email_created": "2019-01-01T00:00:00",
    "email_id": "01234567-abcd-dcba-ffff-000000000000",
    "error_code": 1,
    "mailbox_id": "01234567-abcd-dcba-ffff-000000000000",
    "sent_or_scheduled_at": "2019-01-01T00:00:00",
    "thread_or_id": "01234567-abcd-dcba-ffff-000000000000",
    "type": 1
  }
}