Fields

Inbound Mailbox objects have the following fields and links:

Fields

field name description
name the name of the mailbox
enabled indicates if the mailbox is enabled
type one of imap, imaps, google apps, or postmark
hostname mail server hostname
port mail server port
email email address
last_checked_at last time the mailbox was checked for messages
created_at date the mailbox was created
updated_at last time the mailbox was updated
last_error error message recieved when attempting to check for messages
inbound_address_filter comma-delimited list of email addresses (with regular expressions) to filter emails sent to this mailbox
outbound_address_filter comma-delimited list of email addresses (with regular expressions) to filter replies to customers from this mailbox

Links

rel class embeddable? description
self inbound_mailbox no this mailbox
default_group group yes the default group which cases created by this mailbox will be assigned

List

List all inbound mailboxes

GET https://yoursite.desk.com/api/v2/mailboxes/inbound

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/mailboxes/inbound \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  "total_entries": 2,
  "page": 1,
  "_links": {
    "self": {
      "href": "/api/v2/mailboxes/inbound?page=1&per_page=50",
      "class": "page"
    },
    "first": {
      "href": "/api/v2/mailboxes/inbound?page=1&per_page=50",
      "class": "page"
    },
    "last": {
      "href": "/api/v2/mailboxes/inbound?page=1&per_page=50",
      "class": "page"
    },
    "next": null,
    "previous": null
  },
  "_embedded": {
    "entries": [
      {
        "name": "Support Mailbox",
        "enabled": true,
        "type": "imaps",
        "hostname": "mail.example.com",
        "port": 993,
        "email": "support@example.com",
        "last_checked_at": "2017-08-18T22:19:27Z",
        "created_at": "2017-08-18T22:19:27Z",
        "updated_at": "2017-08-18T22:19:27Z",
        "last_error": null,
        "inbound_address_filter": null,
        "outbound_address_filter": null,
        "_links": {
          "self": {
            "href": "/api/v2/mailboxes/inbound/1",
            "class": "inbound_mailbox"
          },
          "default_group": {
            "href": "/api/v2/groups/1",
            "class": "group"
          }
        }
      },
      {
        "name": "Another inbound mailbox",
        "enabled": true,
        "type": "imaps",
        "hostname": "mail.example.com",
        "port": 993,
        "email": "another_support@example.com",
        "last_checked_at": "2017-08-18T22:19:27Z",
        "created_at": "2017-08-18T22:19:27Z",
        "updated_at": "2017-08-18T22:19:27Z",
        "last_error": null,
        "inbound_address_filter": null,
        "outbound_address_filter": null,
        "_links": {
          "self": {
            "href": "/api/v2/mailboxes/inbound/2",
            "class": "inbound_mailbox"
          },
          "default_group": {
            "href": "/api/v2/groups/1",
            "class": "group"
          }
        }
      }
    ]
  }
}

Show

Retrieve a single inbound mailbox

GET https://yoursite.desk.com/api/v2/mailboxes/inbound/:id

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/mailboxes/inbound/1 \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "name": "Support Mailbox",
  "enabled": true,
  "type": "imaps",
  "hostname": "mail.example.com",
  "port": 993,
  "email": "support@example.com",
  "last_checked_at": "2017-08-18T22:19:27Z",
  "created_at": "2017-08-18T22:19:27Z",
  "updated_at": "2017-08-18T22:19:27Z",
  "last_error": null,
  "inbound_address_filter": null,
  "outbound_address_filter": null,
  "_links": {
    "self": {
      "href": "/api/v2/mailboxes/inbound/1",
      "class": "inbound_mailbox"
    },
    "default_group": {
      "href": "/api/v2/groups/1",
      "class": "group"
    }
  }
}