Email Accounts

List Email Accounts

POST/v1/email-accounts
POST
/v1/email-accounts

Fetch all Email accounts

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

searchstring

Search term for filtering email accounts based on email or firstName or lastName

Example: "[email protected]"

pageSizenumber

Number of items per page. Maximum pageSize is 100.

Example: 25Default: 25

pagenumber

Page number for pagination. Defaults to the first page.

Example: 1Default: 1

sortByKeystring

Sort key to order the email accounts list. Defaults to creation date.

Example: "health-score"Value in: "created-date" | "health-score" | "remaining-quota" | "clientFirstName"

sortstring

Sort order for the results, either ascending or descending.

Example: "DESC"Value in: "ASC" | "DESC"

sequenceIdsarray<string>

List of sequence IDs to filter the email accounts.

Example: ["JA5YdAr9wy"]

clientIdsarray<string>

Array of email account IDs associated with the user.

Example: ["JA5YdAr9wy"]

addedByarray<string>

List of user IDs who added the email accounts.

Example: ["JA5YdAr9wy"]

statusnumber

Filter email accounts by status. 0 for Inactive, 1 for Active, 2 for Suspended.

Example: 1

emailServiceProviderarray<string>

List of email service providers associated with the email accounts.

Example: ["gsuite","microsoft"]

Responses

200
Successfully fetched all email account list
{
  "emails": [
    {
      "id": "XdPd8p1PVo",
      "fromName": "John Doe",
      "fromEmail": "[email protected]",
      "type": 3,
      "status": 1,
      "isDefault": false,
      "createdAt": "2024-08-28T04:42:10.131Z",
      "healthScore": 55,
      "user": {
        "firstName": "John",
        "lastName": "Doe"
      },
      "sequences": [
        {
          "id": "JA5YdAr9wy",
          "title": "Sample Sequence",
          "active": true,
          "steps": [
            {
              "id": "bwOLEx4l8G",
              "name": "Step 1"
            }
          ],
          "client": {
            "id": "g9bzZq4aMd",
            "companyName": "Demo",
            "firstName": "John",
            "lastName": "Doe"
          },
          "user": {
            "id": 1,
            "firstName": "John",
            "lastName": "Doe",
            "email": "[email protected]"
          }
        }
      ],
      "settings": [
        {
          "id": "OqwmgYpLaj",
          "code": "available-quota",
          "value": "6",
          "modifiedAt": "2024-10-01T13:00:01.187Z"
        }
      ],
      "client": {
        "id": "g9bzZq4aMd",
        "firstName": "john",
        "lastName": "doe",
        "email": "[email protected]",
        "status": "active",
        "companyName": "Demo"
      },
      "hashId": "XdPd8p1PVo"
    }
  ],
  "meta": {
    "totalItems": 1,
    "currentPage": 1,
    "itemsPerPage": 25,
    "totalPages": 1,
    "itemCount": 1
  },
  "connectedEmailsCount": 1,
  "disconnectedEmailsCount": 0
}

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/email-accounts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "search": "[email protected]",
  "pageSize": 25,
  "page": 1,
  "sortByKey": "health-score",
  "sort": "DESC",
  "sequenceIds": [
    "JA5YdAr9wy"
  ],
  "clientIds": [
    "JA5YdAr9wy"
  ],
  "addedBy": [
    "JA5YdAr9wy"
  ],
  "status": 1,
  "emailServiceProvider": [
    "gsuite",
    "microsoft"
  ]
}'

Response

No response body