Fluxmail

List accounts

List the email accounts available to the API key.

GET /api/v1/accounts

List the email accounts available to the API key.

Authentication

Pass a Fluxmail member session or API key as a bearer token. API keys apply their mailbox scope and permissions to the request.

Request

curl 'http://localhost:8977/api/v1/accounts' \
  -H "Authorization: Bearer $FLUXMAIL_API_KEY"

This endpoint has no parameters or request body.

Responses

StatusDescriptionContent type
200Accountsapplication/json
400Invalid requestapplication/json
401Authentication requiredapplication/json
403Permission or plan deniedapplication/json
404Resource not foundapplication/json
409Request conflictapplication/json
422Unsupported capabilityapplication/json
429Provider rate limitapplication/json
500Internal errorapplication/json
503Provider unavailableapplication/json

200 response

{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "outlook",
              "imap"
            ]
          },
          "email": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "auth_error",
              "disabled"
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "labels": {
                "type": "boolean"
              },
              "serverThreads": {
                "type": "boolean"
              },
              "serverSearch": {
                "type": "string",
                "enum": [
                  "rich",
                  "basic"
                ]
              },
              "search": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "folder",
                        "text",
                        "from",
                        "to",
                        "subject",
                        "read",
                        "starred",
                        "hasAttachment",
                        "after",
                        "before"
                      ]
                    }
                  },
                  "folderRoles": {
                    "type": "object",
                    "properties": {
                      "inbox": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "sent": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "drafts": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "archive": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "spam": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "trash": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "all": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      }
                    },
                    "required": [
                      "inbox",
                      "sent",
                      "drafts",
                      "archive",
                      "spam",
                      "trash",
                      "all"
                    ],
                    "additionalProperties": false
                  },
                  "nativeQuery": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "syntax": {
                        "type": "string",
                        "enum": [
                          "gmail",
                          "outlook-kql"
                        ]
                      },
                      "availability": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unknown"
                        ]
                      },
                      "unavailableReason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "syntax",
                      "availability"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "filters",
                  "folderRoles",
                  "nativeQuery"
                ],
                "additionalProperties": false
              },
              "snippets": {
                "type": "boolean"
              }
            },
            "required": [
              "labels",
              "serverThreads",
              "serverSearch",
              "search",
              "snippets"
            ],
            "additionalProperties": false
          },
          "ownerMemberId": {
            "type": "string"
          },
          "sharedWithAll": {
            "type": "boolean"
          },
          "grantedMemberIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "provider",
          "email",
          "status",
          "capabilities",
          "ownerMemberId",
          "sharedWithAll",
          "grantedMemberIds"
        ],
        "additionalProperties": false
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Last updated