{
  "service": "moosend",
  "displayName": "Moosend",
  "categories": [
    "Communication",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "MOOSEND_API_KEY",
      "description": "Moosend API key sent as the apikey query parameter. Copy it from More > Settings > API key in your Moosend account: https://docs.moosend.com/api-documentation/articles/KnowledgeBase/54552-Authenticate-a-Moosend-API-request"
    }
  ],
  "homepageUrl": "https://www.moosend.com/",
  "actions": [
    {
      "id": "moosend.add_subscriber",
      "service": "moosend",
      "name": "add_subscriber",
      "description": "Add or update one subscriber in a Moosend mailing list.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "MailingListID": {
            "type": "string",
            "minLength": 1,
            "description": "The ID of the email list where Moosend should add the subscriber."
          },
          "Email": {
            "type": "string",
            "description": "The email address of the subscriber.",
            "format": "email"
          },
          "Format": {
            "const": "json",
            "type": "string",
            "description": "Moosend response format. Connector actions always request JSON."
          },
          "Name": {
            "type": "string",
            "minLength": 1,
            "description": "The subscriber name."
          },
          "HasExternalDoubleOptIn": {
            "type": "boolean",
            "description": "Whether the subscriber has given subscription consent by other means."
          },
          "CustomFields": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One custom field value in FieldName=Value format."
            },
            "description": "Custom field values in Moosend FieldName=Value format."
          },
          "Tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One subscriber tag."
            },
            "description": "Tags to assign to the subscriber."
          },
          "Preferences": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One preference value."
            },
            "description": "Preference values to assign to the subscriber."
          }
        },
        "additionalProperties": false,
        "required": [
          "MailingListID",
          "Email"
        ],
        "description": "Path, query, and JSON body parameters for adding or updating a Moosend subscriber."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "integer",
            "description": "The Moosend response code. A value of 0 indicates success."
          },
          "Error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Moosend error message, or null when successful."
              },
              {
                "type": "null"
              }
            ]
          },
          "Context": {
            "type": "object",
            "properties": {
              "ID": {
                "type": "string",
                "description": "The Moosend subscriber identifier."
              },
              "Name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The subscriber name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "Email": {
                "type": "string",
                "description": "The subscriber email address.",
                "format": "email"
              },
              "CreatedOn": {
                "type": "string",
                "description": "The Moosend date string when the subscriber was created."
              },
              "UpdatedOn": {
                "type": "string",
                "description": "The Moosend date string when the subscriber was updated."
              },
              "UnsubscribedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Moosend date string when the subscriber unsubscribed from the list."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "UnsubscribedFromID": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The identifier that the subscriber unsubscribed from."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "SubscribeType": {
                "type": "integer",
                "description": "The Moosend numeric subscriber status."
              },
              "SubscribeMethod": {
                "type": "integer",
                "description": "The Moosend numeric subscription method."
              },
              "CustomFields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "CustomFieldID": {
                      "type": "string",
                      "description": "The Moosend custom field identifier."
                    },
                    "Name": {
                      "type": "string",
                      "description": "The Moosend custom field name."
                    },
                    "Value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Moosend custom field value."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": true,
                  "description": "A Moosend custom field returned for a subscriber."
                },
                "description": "The custom fields associated with the subscriber."
              },
              "RemovedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Moosend date string when the subscriber was removed."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "Tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "One subscriber tag."
                },
                "description": "The tags associated with the subscriber."
              },
              "Preferences": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "One preference value."
                },
                "description": "The preference values associated with the subscriber."
              }
            },
            "additionalProperties": true,
            "description": "A Moosend subscriber object."
          }
        },
        "additionalProperties": false,
        "required": [
          "Code",
          "Error",
          "Context"
        ],
        "description": "Moosend single subscriber response."
      }
    },
    {
      "id": "moosend.get_subscriber_by_email",
      "service": "moosend",
      "name": "get_subscriber_by_email",
      "description": "Fetch one Moosend subscriber from a mailing list by email address.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "MailingListID": {
            "type": "string",
            "minLength": 1,
            "description": "The ID of the email list that contains the subscriber."
          },
          "Email": {
            "type": "string",
            "description": "The email address of the subscriber to retrieve.",
            "format": "email"
          },
          "Format": {
            "const": "json",
            "type": "string",
            "description": "Moosend response format. Connector actions always request JSON."
          }
        },
        "additionalProperties": false,
        "required": [
          "MailingListID",
          "Email"
        ],
        "description": "Path and query parameters for retrieving one Moosend subscriber by email address."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "integer",
            "description": "The Moosend response code. A value of 0 indicates success."
          },
          "Error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Moosend error message, or null when successful."
              },
              {
                "type": "null"
              }
            ]
          },
          "Context": {
            "type": "object",
            "properties": {
              "ID": {
                "type": "string",
                "description": "The Moosend subscriber identifier."
              },
              "Name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The subscriber name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "Email": {
                "type": "string",
                "description": "The subscriber email address.",
                "format": "email"
              },
              "CreatedOn": {
                "type": "string",
                "description": "The Moosend date string when the subscriber was created."
              },
              "UpdatedOn": {
                "type": "string",
                "description": "The Moosend date string when the subscriber was updated."
              },
              "UnsubscribedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Moosend date string when the subscriber unsubscribed from the list."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "UnsubscribedFromID": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The identifier that the subscriber unsubscribed from."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "SubscribeType": {
                "type": "integer",
                "description": "The Moosend numeric subscriber status."
              },
              "SubscribeMethod": {
                "type": "integer",
                "description": "The Moosend numeric subscription method."
              },
              "CustomFields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "CustomFieldID": {
                      "type": "string",
                      "description": "The Moosend custom field identifier."
                    },
                    "Name": {
                      "type": "string",
                      "description": "The Moosend custom field name."
                    },
                    "Value": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Moosend custom field value."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "additionalProperties": true,
                  "description": "A Moosend custom field returned for a subscriber."
                },
                "description": "The custom fields associated with the subscriber."
              },
              "RemovedOn": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Moosend date string when the subscriber was removed."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "Tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "One subscriber tag."
                },
                "description": "The tags associated with the subscriber."
              },
              "Preferences": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "One preference value."
                },
                "description": "The preference values associated with the subscriber."
              }
            },
            "additionalProperties": true,
            "description": "A Moosend subscriber object."
          }
        },
        "additionalProperties": false,
        "required": [
          "Code",
          "Error",
          "Context"
        ],
        "description": "Moosend single subscriber response."
      }
    },
    {
      "id": "moosend.list_mailing_lists",
      "service": "moosend",
      "name": "list_mailing_lists",
      "description": "List active mailing lists in the current Moosend account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "Format": {
            "const": "json",
            "type": "string",
            "description": "Moosend response format. Connector actions always request JSON."
          },
          "WithStatistics": {
            "type": "boolean",
            "description": "Whether Moosend should include subscriber statistics."
          },
          "SortBy": {
            "type": "string",
            "enum": [
              "Name",
              "Subject",
              "Status",
              "DeliveredOn",
              "CreatedOn"
            ],
            "description": "Moosend mailing list property used to sort results."
          },
          "SortMethod": {
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ],
            "description": "Moosend sorting direction."
          }
        },
        "additionalProperties": false,
        "description": "Query parameters for retrieving Moosend active mailing lists."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "integer",
            "description": "The Moosend response code. A value of 0 indicates success."
          },
          "Error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Moosend error message, or null when successful."
              },
              {
                "type": "null"
              }
            ]
          },
          "Context": {
            "type": "object",
            "properties": {
              "Paging": {
                "type": "object",
                "properties": {
                  "PageSize": {
                    "type": "integer",
                    "description": "The page size of the results."
                  },
                  "CurrentPage": {
                    "type": "integer",
                    "description": "The current page number."
                  },
                  "TotalResults": {
                    "type": "integer",
                    "description": "The total number of matching results."
                  },
                  "TotalPageCount": {
                    "type": "integer",
                    "description": "The total number of available pages."
                  },
                  "SortExpression": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The sort expression used by Moosend."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "SortIsAscending": {
                    "type": "boolean",
                    "description": "Whether Moosend sorted the results in ascending order."
                  }
                },
                "additionalProperties": true,
                "description": "Moosend paging metadata."
              },
              "MailingLists": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ID": {
                      "type": "string",
                      "description": "The Moosend mailing list identifier."
                    },
                    "Name": {
                      "type": "string",
                      "description": "The mailing list name."
                    },
                    "ActiveMemberCount": {
                      "type": "integer",
                      "description": "The number of active members in the mailing list."
                    },
                    "BouncedMemberCount": {
                      "type": "integer",
                      "description": "The number of bounced members in the mailing list."
                    },
                    "RemovedMemberCount": {
                      "type": "integer",
                      "description": "The number of removed members in the mailing list."
                    },
                    "UnsubscribedMemberCount": {
                      "type": "integer",
                      "description": "The number of unsubscribed members in the mailing list."
                    },
                    "Status": {
                      "type": "integer",
                      "description": "The Moosend numeric mailing list status."
                    },
                    "CustomFieldsDefinition": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": true,
                        "description": "A Moosend custom field definition."
                      },
                      "description": "The custom field definitions configured for the mailing list."
                    },
                    "CreatedOn": {
                      "type": "string",
                      "description": "The Moosend date string when the mailing list was created."
                    },
                    "UpdatedOn": {
                      "type": "string",
                      "description": "The Moosend date string when the mailing list was updated."
                    }
                  },
                  "additionalProperties": true,
                  "description": "A Moosend mailing list object."
                },
                "description": "The active mailing lists returned by Moosend."
              }
            },
            "additionalProperties": true,
            "required": [
              "Paging",
              "MailingLists"
            ],
            "description": "The Moosend mailing list response context."
          }
        },
        "additionalProperties": false,
        "required": [
          "Code",
          "Error",
          "Context"
        ],
        "description": "Moosend active mailing lists response."
      }
    },
    {
      "id": "moosend.list_subscribers",
      "service": "moosend",
      "name": "list_subscribers",
      "description": "List subscribers in a Moosend mailing list filtered by subscriber status.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "MailingListID": {
            "type": "string",
            "minLength": 1,
            "description": "The ID of the email list containing the subscribers."
          },
          "Status": {
            "type": "string",
            "enum": [
              "Subscribed",
              "Unsubscribed",
              "Bounced",
              "Removed"
            ],
            "description": "Moosend subscriber status filter."
          },
          "Format": {
            "const": "json",
            "type": "string",
            "description": "Moosend response format. Connector actions always request JSON."
          },
          "Page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page of subscriber results to return."
          },
          "PageSize": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of subscriber results to return per page."
          }
        },
        "additionalProperties": false,
        "required": [
          "MailingListID",
          "Status"
        ],
        "description": "Path and query parameters for retrieving subscribers in a Moosend mailing list."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "integer",
            "description": "The Moosend response code. A value of 0 indicates success."
          },
          "Error": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Moosend error message, or null when successful."
              },
              {
                "type": "null"
              }
            ]
          },
          "Context": {
            "type": "object",
            "properties": {
              "Paging": {
                "type": "object",
                "properties": {
                  "PageSize": {
                    "type": "integer",
                    "description": "The page size of the results."
                  },
                  "CurrentPage": {
                    "type": "integer",
                    "description": "The current page number."
                  },
                  "TotalResults": {
                    "type": "integer",
                    "description": "The total number of matching results."
                  },
                  "TotalPageCount": {
                    "type": "integer",
                    "description": "The total number of available pages."
                  },
                  "SortExpression": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The sort expression used by Moosend."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "SortIsAscending": {
                    "type": "boolean",
                    "description": "Whether Moosend sorted the results in ascending order."
                  }
                },
                "additionalProperties": true,
                "description": "Moosend paging metadata."
              },
              "Subscribers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ID": {
                      "type": "string",
                      "description": "The Moosend subscriber identifier."
                    },
                    "Name": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The subscriber name."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "Email": {
                      "type": "string",
                      "description": "The subscriber email address.",
                      "format": "email"
                    },
                    "CreatedOn": {
                      "type": "string",
                      "description": "The Moosend date string when the subscriber was created."
                    },
                    "UpdatedOn": {
                      "type": "string",
                      "description": "The Moosend date string when the subscriber was updated."
                    },
                    "UnsubscribedOn": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Moosend date string when the subscriber unsubscribed from the list."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "UnsubscribedFromID": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The identifier that the subscriber unsubscribed from."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "SubscribeType": {
                      "type": "integer",
                      "description": "The Moosend numeric subscriber status."
                    },
                    "SubscribeMethod": {
                      "type": "integer",
                      "description": "The Moosend numeric subscription method."
                    },
                    "CustomFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "CustomFieldID": {
                            "type": "string",
                            "description": "The Moosend custom field identifier."
                          },
                          "Name": {
                            "type": "string",
                            "description": "The Moosend custom field name."
                          },
                          "Value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "The Moosend custom field value."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": true,
                        "description": "A Moosend custom field returned for a subscriber."
                      },
                      "description": "The custom fields associated with the subscriber."
                    },
                    "RemovedOn": {
                      "anyOf": [
                        {
                          "type": "string",
                          "description": "The Moosend date string when the subscriber was removed."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "Tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "One subscriber tag."
                      },
                      "description": "The tags associated with the subscriber."
                    },
                    "Preferences": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "One preference value."
                      },
                      "description": "The preference values associated with the subscriber."
                    }
                  },
                  "additionalProperties": true,
                  "description": "A Moosend subscriber object."
                },
                "description": "The subscribers returned by Moosend."
              }
            },
            "additionalProperties": true,
            "required": [
              "Paging",
              "Subscribers"
            ],
            "description": "The Moosend subscribers response context."
          }
        },
        "additionalProperties": false,
        "required": [
          "Code",
          "Error",
          "Context"
        ],
        "description": "Moosend subscriber list response."
      }
    }
  ]
}
