Create callback

URL

Method

POST

request URL

/api/v1/envelope/callback/add

Headers

content-type

application/json

authorization

Bearer {token} where {token} is authorization token which user received after successful authorization on platform

mailbox

UUID of mailbox to which you configured callbacks

REQUEST BODY

 {
  "filter": {
      "label": ["string"],
      "status": ["COMPLETED"],
      "subject": "string",
      "receiveDateFrom": "2023-02-16T12:34:26.606Z",
      "receiveDateTo": "2023-02-16T12:34:26.606Z",
      "expireDateFrom": "2023-02-16T12:34:26.606Z",
      "expireDateTo": "2023-02-16T12:34:26.606Z",
      "template": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
      "sender": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
      "scope": ["inbox"]
  },
  "url": "string",
  "retries": 10,
  "timeout": 60000,
  "successCode": 200,
  "login": "string",
  "password": "string"
}

Request body parameters described below:

* - defines attribute as required

RESPONSE

In response you get 201 status code (in case of successful callback creation) and JSON data of the callback

Response example (JSON):

{
  "id": "f8c97405-9185-4998-a3c0-2c4d0edaf43b",
  "filter": {
      "label": ["string"],
      "status": ["COMPLETED"],
      "subject": "string",
      "receiveDateFrom": null,
      "receiveDateTo": null,
      "expireDateFrom": null,
      "expireDateTo": null,
      "template": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
      "sender": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
      "scope": ["inbox"]
  },
  "url": "string",
  "retries": 10,
  "timeout": 60000,
  "successCode": 200,
  "authType": "BASIC"
}