{
  "service": "chatarmin",
  "displayName": "Chatarmin",
  "categories": [
    "Marketing",
    "Communication"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "CHATARMIN_API_KEY",
      "description": "Chatarmin API key sent as a Bearer token. Find it in your Chatarmin dashboard profile settings: https://chatarmin.com/dashboard/profile"
    }
  ],
  "homepageUrl": "https://chatarmin.com/",
  "actions": [
    {
      "id": "chatarmin.add_or_replace_voucher_codes",
      "service": "chatarmin",
      "name": "add_or_replace_voucher_codes",
      "description": "Add new voucher codes to a Chatarmin pool or replace one unused code.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin voucher pool ID."
          },
          "codes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A voucher code string."
            },
            "description": "Voucher code strings to add to the pool.",
            "minItems": 1
          },
          "replaceCode": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "The ID of the existing voucher code to replace."
              },
              "newCode": {
                "type": "string",
                "minLength": 1,
                "description": "The replacement voucher code string."
              }
            },
            "additionalProperties": false,
            "description": "An unused voucher code replacement."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolId"
        ],
        "description": "Input for adding voucher codes or replacing an unused voucher code.",
        "anyOf": [
          {
            "required": [
              "codes"
            ]
          },
          {
            "required": [
              "replaceCode"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "added": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin voucher code object."
            },
            "description": "Voucher codes added by Chatarmin."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Chatarmin voucher code update response."
          }
        },
        "additionalProperties": false,
        "description": "The Chatarmin voucher code update result."
      }
    },
    {
      "id": "chatarmin.create_contact",
      "service": "chatarmin",
      "name": "create_contact",
      "description": "Create a new Chatarmin contact.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "The contact phone number in international format."
          },
          "email": {
            "type": "string",
            "description": "The contact email address.",
            "format": "email"
          },
          "firstname": {
            "type": "string",
            "minLength": 1,
            "description": "The contact first name."
          },
          "lastname": {
            "type": "string",
            "minLength": 1,
            "description": "The contact last name."
          },
          "consent": {
            "type": "string",
            "enum": [
              "none",
              "optedOut",
              "transactional",
              "single",
              "double"
            ],
            "description": "The Chatarmin consent state for the contact."
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "description": "An external identifier to store on the contact."
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "description": "A custom property value accepted by Chatarmin."
            },
            "description": "Custom contact properties keyed by Chatarmin property name."
          }
        },
        "additionalProperties": false,
        "required": [
          "phone",
          "firstname",
          "consent"
        ],
        "description": "Input for creating a Chatarmin contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Chatarmin contact ID."
              },
              "phone": {
                "type": "string",
                "description": "The contact phone number."
              },
              "email": {
                "type": "string",
                "description": "The contact email address."
              },
              "firstname": {
                "type": "string",
                "description": "The contact first name."
              },
              "lastname": {
                "type": "string",
                "description": "The contact last name."
              },
              "consent": {
                "type": "string",
                "description": "The contact consent state."
              },
              "externalId": {
                "type": "string",
                "description": "The contact external identifier."
              }
            },
            "additionalProperties": true,
            "description": "A Chatarmin contact object."
          }
        },
        "additionalProperties": false,
        "description": "The created Chatarmin contact."
      }
    },
    {
      "id": "chatarmin.create_voucher_pool",
      "service": "chatarmin",
      "name": "create_voucher_pool",
      "description": "Create a Chatarmin voucher pool with an initial list of voucher codes.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolName": {
            "type": "string",
            "minLength": 1,
            "description": "The display name of the voucher pool."
          },
          "vouchers": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A voucher code string."
            },
            "description": "Voucher code strings to add to the pool.",
            "minItems": 1
          },
          "reuseCodes": {
            "type": "boolean",
            "description": "Whether contacts who already received a code should get the same code again."
          },
          "reminder": {
            "type": "object",
            "properties": {
              "reminderThreshold": {
                "type": "integer",
                "minimum": 1,
                "description": "The remaining voucher count that triggers reminder emails."
              },
              "reminderEmailAdresses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "An email address to notify.",
                  "format": "email"
                },
                "description": "Email addresses to notify when the reminder threshold is reached.",
                "minItems": 1
              }
            },
            "additionalProperties": false,
            "description": "Low-voucher email reminder settings."
          },
          "emptyOptions": {
            "type": "object",
            "properties": {
              "emptyMessage": {
                "type": "string",
                "minLength": 1,
                "description": "Fallback text sent when the voucher pool is empty."
              },
              "doNotSendWhenEmpty": {
                "type": "boolean",
                "description": "Whether Chatarmin should skip sending when the pool is empty."
              }
            },
            "additionalProperties": false,
            "description": "Behavior settings for an empty voucher pool."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolName",
          "vouchers"
        ],
        "description": "Input for creating a Chatarmin voucher pool."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "voucherPool": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin voucher pool object."
          }
        },
        "additionalProperties": false,
        "description": "The created Chatarmin voucher pool."
      }
    },
    {
      "id": "chatarmin.create_webhook",
      "service": "chatarmin",
      "name": "create_webhook",
      "description": "Create a Chatarmin webhook for one supported topic.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The webhook target URL.",
            "format": "uri"
          },
          "topic": {
            "type": "string",
            "enum": [
              "contact/updated",
              "contact/created",
              "flow/enrolled",
              "contact/deleted",
              "message/updated",
              "error/occurred"
            ],
            "description": "The Chatarmin webhook topic."
          }
        },
        "additionalProperties": false,
        "description": "Input for creating a Chatarmin webhook."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "webhook": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin webhook object."
          }
        },
        "additionalProperties": false,
        "description": "The created Chatarmin webhook."
      }
    },
    {
      "id": "chatarmin.delete_contact",
      "service": "chatarmin",
      "name": "delete_contact",
      "description": "Delete a Chatarmin contact by contact ID or externalId.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin contact ID or externalId."
          }
        },
        "additionalProperties": false,
        "required": [
          "contactId"
        ],
        "description": "Input for deleting a Chatarmin contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the delete request succeeded."
          }
        },
        "additionalProperties": false,
        "description": "The result of a successful Chatarmin deletion request."
      }
    },
    {
      "id": "chatarmin.delete_voucher_pool",
      "service": "chatarmin",
      "name": "delete_voucher_pool",
      "description": "Delete a Chatarmin voucher pool and its unused voucher codes.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin voucher pool ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolId"
        ],
        "description": "Input for deleting a Chatarmin voucher pool."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the delete request succeeded."
          }
        },
        "additionalProperties": false,
        "description": "The result of a successful Chatarmin deletion request."
      }
    },
    {
      "id": "chatarmin.delete_webhook",
      "service": "chatarmin",
      "name": "delete_webhook",
      "description": "Delete a Chatarmin webhook by webhook ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin webhook ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "webhookId"
        ],
        "description": "Input for deleting a Chatarmin webhook."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the delete request succeeded."
          }
        },
        "additionalProperties": false,
        "description": "The result of a successful Chatarmin deletion request."
      }
    },
    {
      "id": "chatarmin.get_campaign",
      "service": "chatarmin",
      "name": "get_campaign",
      "description": "Retrieve one Chatarmin campaign by campaign ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin campaign ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "campaignId"
        ],
        "description": "Input for retrieving one Chatarmin campaign."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin campaign analytics object."
          }
        },
        "additionalProperties": false,
        "description": "The retrieved Chatarmin campaign."
      }
    },
    {
      "id": "chatarmin.get_contact",
      "service": "chatarmin",
      "name": "get_contact",
      "description": "Retrieve one Chatarmin contact by contact ID or externalId.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin contact ID or externalId."
          }
        },
        "additionalProperties": false,
        "required": [
          "contactId"
        ],
        "description": "Input for retrieving one Chatarmin contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Chatarmin contact ID."
              },
              "phone": {
                "type": "string",
                "description": "The contact phone number."
              },
              "email": {
                "type": "string",
                "description": "The contact email address."
              },
              "firstname": {
                "type": "string",
                "description": "The contact first name."
              },
              "lastname": {
                "type": "string",
                "description": "The contact last name."
              },
              "consent": {
                "type": "string",
                "description": "The contact consent state."
              },
              "externalId": {
                "type": "string",
                "description": "The contact external identifier."
              }
            },
            "additionalProperties": true,
            "description": "A Chatarmin contact object."
          }
        },
        "additionalProperties": false,
        "description": "The retrieved Chatarmin contact."
      }
    },
    {
      "id": "chatarmin.get_flow",
      "service": "chatarmin",
      "name": "get_flow",
      "description": "Retrieve one Chatarmin flow by flow ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "flowId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin flow ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "flowId"
        ],
        "description": "Input for retrieving one Chatarmin flow."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "flow": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin flow analytics object."
          }
        },
        "additionalProperties": false,
        "description": "The retrieved Chatarmin flow."
      }
    },
    {
      "id": "chatarmin.get_flow_analytics",
      "service": "chatarmin",
      "name": "get_flow_analytics",
      "description": "Retrieve paginated Chatarmin flow analytics for a flow.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "flowId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin flow ID."
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number for pagination."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of items to return per page."
          },
          "start": {
            "type": "string",
            "description": "The analytics start timestamp in ISO 8601 format.",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "The analytics end timestamp in ISO 8601 format.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "flowId"
        ],
        "description": "Input for retrieving paginated Chatarmin flow analytics."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin flow analytics record."
            },
            "description": "The flow analytics records returned by Chatarmin."
          },
          "pagination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "The current page number returned by Chatarmin."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The page size returned by Chatarmin."
                  },
                  "total": {
                    "type": "integer",
                    "description": "The total number of matching records returned by Chatarmin."
                  },
                  "totalPages": {
                    "type": "integer",
                    "description": "The total number of pages returned by Chatarmin."
                  }
                },
                "additionalProperties": true,
                "description": "Pagination metadata returned by Chatarmin."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "A page of Chatarmin flow analytics."
      }
    },
    {
      "id": "chatarmin.get_flow_contact_analytics",
      "service": "chatarmin",
      "name": "get_flow_contact_analytics",
      "description": "Retrieve Chatarmin flow analytics for specific contacts.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "flowId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin flow ID."
          },
          "contactIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A Chatarmin contact ID."
            },
            "description": "Contact IDs to fetch analytics for.",
            "minItems": 1
          },
          "start": {
            "type": "string",
            "description": "The analytics start timestamp in ISO 8601 format.",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "description": "The analytics end timestamp in ISO 8601 format.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "required": [
          "flowId",
          "contactIds"
        ],
        "description": "Input for retrieving Chatarmin flow analytics for specific contacts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "Analytics for one Chatarmin contact in the flow."
            },
            "description": "Flow analytics keyed by Chatarmin contact ID."
          }
        },
        "additionalProperties": false,
        "description": "Chatarmin flow analytics keyed by contact ID."
      }
    },
    {
      "id": "chatarmin.get_voucher_pool",
      "service": "chatarmin",
      "name": "get_voucher_pool",
      "description": "Retrieve one Chatarmin voucher pool by voucher pool ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin voucher pool ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolId"
        ],
        "description": "Input for retrieving one Chatarmin voucher pool."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "voucherPool": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin voucher pool object."
          }
        },
        "additionalProperties": false,
        "description": "The retrieved Chatarmin voucher pool."
      }
    },
    {
      "id": "chatarmin.list_campaigns",
      "service": "chatarmin",
      "name": "list_campaigns",
      "description": "Retrieve a paginated list of Chatarmin campaigns with optional day or month metrics.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number for pagination."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of items to return per page."
          },
          "groupBy": {
            "type": "string",
            "enum": [
              "day",
              "month"
            ],
            "description": "The analytics grouping period."
          },
          "startDate": {
            "type": "string",
            "description": "The start date for grouped campaign metrics.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "The end date for grouped campaign metrics.",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Chatarmin campaigns."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin campaign analytics object."
            },
            "description": "The campaigns returned by Chatarmin."
          },
          "pagination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "The current page number returned by Chatarmin."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The page size returned by Chatarmin."
                  },
                  "total": {
                    "type": "integer",
                    "description": "The total number of matching records returned by Chatarmin."
                  },
                  "totalPages": {
                    "type": "integer",
                    "description": "The total number of pages returned by Chatarmin."
                  }
                },
                "additionalProperties": true,
                "description": "Pagination metadata returned by Chatarmin."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "A page of Chatarmin campaigns."
      }
    },
    {
      "id": "chatarmin.list_contacts",
      "service": "chatarmin",
      "name": "list_contacts",
      "description": "Retrieve a paginated list of Chatarmin contacts with optional text search.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number for pagination."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of items to return per page."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Optional search text matched by Chatarmin against firstname, lastname, email, and phone."
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Chatarmin contacts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Chatarmin contact ID."
                },
                "phone": {
                  "type": "string",
                  "description": "The contact phone number."
                },
                "email": {
                  "type": "string",
                  "description": "The contact email address."
                },
                "firstname": {
                  "type": "string",
                  "description": "The contact first name."
                },
                "lastname": {
                  "type": "string",
                  "description": "The contact last name."
                },
                "consent": {
                  "type": "string",
                  "description": "The contact consent state."
                },
                "externalId": {
                  "type": "string",
                  "description": "The contact external identifier."
                }
              },
              "additionalProperties": true,
              "description": "A Chatarmin contact object."
            },
            "description": "The contacts returned by Chatarmin."
          },
          "pagination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "The current page number returned by Chatarmin."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The page size returned by Chatarmin."
                  },
                  "total": {
                    "type": "integer",
                    "description": "The total number of matching records returned by Chatarmin."
                  },
                  "totalPages": {
                    "type": "integer",
                    "description": "The total number of pages returned by Chatarmin."
                  }
                },
                "additionalProperties": true,
                "description": "Pagination metadata returned by Chatarmin."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "A page of Chatarmin contacts."
      }
    },
    {
      "id": "chatarmin.list_flows",
      "service": "chatarmin",
      "name": "list_flows",
      "description": "Retrieve a paginated list of Chatarmin flows with optional day or month metrics.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number for pagination."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of items to return per page."
          },
          "groupBy": {
            "type": "string",
            "enum": [
              "day",
              "month"
            ],
            "description": "The analytics grouping period."
          },
          "startDate": {
            "type": "string",
            "description": "The start date for grouped flow metrics.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "The end date for grouped flow metrics.",
            "format": "date"
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Chatarmin flows."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin flow analytics object."
            },
            "description": "The flows returned by Chatarmin."
          },
          "pagination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "The current page number returned by Chatarmin."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The page size returned by Chatarmin."
                  },
                  "total": {
                    "type": "integer",
                    "description": "The total number of matching records returned by Chatarmin."
                  },
                  "totalPages": {
                    "type": "integer",
                    "description": "The total number of pages returned by Chatarmin."
                  }
                },
                "additionalProperties": true,
                "description": "Pagination metadata returned by Chatarmin."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "A page of Chatarmin flows."
      }
    },
    {
      "id": "chatarmin.list_voucher_pools",
      "service": "chatarmin",
      "name": "list_voucher_pools",
      "description": "Retrieve a paginated list of Chatarmin voucher pools with voucher codes.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "The page number for pagination."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "description": "The number of items to return per page."
          }
        },
        "additionalProperties": false,
        "description": "Input for listing Chatarmin voucher pools."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin voucher pool object."
            },
            "description": "The voucher pools returned by Chatarmin."
          },
          "pagination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "page": {
                    "type": "integer",
                    "description": "The current page number returned by Chatarmin."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "The page size returned by Chatarmin."
                  },
                  "total": {
                    "type": "integer",
                    "description": "The total number of matching records returned by Chatarmin."
                  },
                  "totalPages": {
                    "type": "integer",
                    "description": "The total number of pages returned by Chatarmin."
                  }
                },
                "additionalProperties": true,
                "description": "Pagination metadata returned by Chatarmin."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "A page of Chatarmin voucher pools."
      }
    },
    {
      "id": "chatarmin.list_webhooks",
      "service": "chatarmin",
      "name": "list_webhooks",
      "description": "Retrieve all Chatarmin webhooks for the authenticated user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "Input for listing Chatarmin webhooks."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "webhooks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "A Chatarmin webhook object."
            },
            "description": "The webhooks returned by Chatarmin."
          }
        },
        "additionalProperties": false,
        "description": "Chatarmin webhooks for the authenticated user."
      }
    },
    {
      "id": "chatarmin.remove_voucher_code",
      "service": "chatarmin",
      "name": "remove_voucher_code",
      "description": "Remove one unused voucher code from a Chatarmin voucher pool.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin voucher pool ID."
          },
          "code": {
            "type": "string",
            "minLength": 1,
            "description": "The voucher code string to remove."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolId",
          "code"
        ],
        "description": "Input for removing one Chatarmin voucher code."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Whether the delete request succeeded."
          }
        },
        "additionalProperties": false,
        "description": "The result of a successful Chatarmin deletion request."
      }
    },
    {
      "id": "chatarmin.send_message",
      "service": "chatarmin",
      "name": "send_message",
      "description": "Send a WhatsApp text, media, document, or template message to a Chatarmin contact.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "The recipient phone number in international format."
          },
          "email": {
            "type": "string",
            "description": "The recipient email address used to look up the contact.",
            "format": "email"
          },
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin contact ID or externalId of the recipient."
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "document",
              "template"
            ],
            "description": "The WhatsApp message type to send."
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "The message body text. Required when type is text."
          },
          "mediaUrl": {
            "type": "string",
            "description": "The publicly accessible media URL. Required for image, video, and document messages.",
            "format": "uri"
          },
          "caption": {
            "type": "string",
            "minLength": 1,
            "description": "An optional media caption. Chatarmin supports captions up to 1024 characters."
          },
          "fileName": {
            "type": "string",
            "minLength": 1,
            "description": "An optional file name for document messages."
          },
          "templateName": {
            "type": "string",
            "minLength": 1,
            "description": "The exact approved WhatsApp template name."
          },
          "language": {
            "type": "string",
            "minLength": 1,
            "description": "The WhatsApp template language code approved for the template."
          },
          "components": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "header",
                    "body",
                    "button"
                  ],
                  "description": "The template component section."
                },
                "sub_type": {
                  "type": "string",
                  "enum": [
                    "url",
                    "quick_reply"
                  ],
                  "description": "The button subtype when the component type is button."
                },
                "index": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The zero-based template button index when type is button."
                },
                "parameters": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "text",
                          "image",
                          "video",
                          "document"
                        ],
                        "description": "The template parameter type."
                      },
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "description": "The text value for a text parameter."
                      },
                      "image": {
                        "type": "object",
                        "properties": {
                          "link": {
                            "type": "string",
                            "description": "The public URL of the template header media.",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false,
                        "description": "Template header media object."
                      },
                      "video": {
                        "type": "object",
                        "properties": {
                          "link": {
                            "type": "string",
                            "description": "The public URL of the template header media.",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false,
                        "description": "Template header media object."
                      },
                      "document": {
                        "type": "object",
                        "properties": {
                          "link": {
                            "type": "string",
                            "description": "The public URL of the template header media.",
                            "format": "uri"
                          }
                        },
                        "additionalProperties": false,
                        "description": "Template header media object."
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "type"
                    ],
                    "description": "A single WhatsApp template parameter value."
                  },
                  "description": "The runtime values to substitute into the template component.",
                  "minItems": 1
                }
              },
              "additionalProperties": false,
              "required": [
                "type",
                "parameters"
              ],
              "description": "A WhatsApp template component with runtime parameters."
            },
            "description": "Template components used to fill dynamic template placeholders.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "description": "Input for sending a WhatsApp message through Chatarmin. Provide exactly one of phone, email, or contactId.",
        "oneOf": [
          {
            "required": [
              "phone"
            ]
          },
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "contactId"
            ]
          }
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "type": {
                  "const": "text"
                }
              },
              "required": [
                "type"
              ]
            },
            "then": {
              "required": [
                "text"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "enum": [
                    "image",
                    "video",
                    "document"
                  ]
                }
              },
              "required": [
                "type"
              ]
            },
            "then": {
              "required": [
                "mediaUrl"
              ]
            }
          },
          {
            "if": {
              "properties": {
                "type": {
                  "const": "template"
                }
              },
              "required": [
                "type"
              ]
            },
            "then": {
              "required": [
                "templateName",
                "language"
              ]
            }
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Chatarmin send message response."
          }
        },
        "additionalProperties": false,
        "description": "The Chatarmin message send result."
      }
    },
    {
      "id": "chatarmin.update_contact",
      "service": "chatarmin",
      "name": "update_contact",
      "description": "Update an existing Chatarmin contact by contact ID or externalId.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin contact ID or externalId."
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "The contact phone number in international format."
          },
          "email": {
            "type": "string",
            "description": "The contact email address.",
            "format": "email"
          },
          "firstname": {
            "type": "string",
            "minLength": 1,
            "description": "The contact first name."
          },
          "lastname": {
            "type": "string",
            "minLength": 1,
            "description": "The contact last name."
          },
          "consent": {
            "type": "string",
            "enum": [
              "none",
              "optedOut",
              "transactional",
              "single",
              "double"
            ],
            "description": "The Chatarmin consent state for the contact."
          },
          "externalId": {
            "type": "string",
            "minLength": 1,
            "description": "An external identifier to store on the contact."
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "description": "A custom property value accepted by Chatarmin."
            },
            "description": "Custom contact properties keyed by Chatarmin property name."
          }
        },
        "additionalProperties": false,
        "required": [
          "contactId"
        ],
        "description": "Input for updating a Chatarmin contact.",
        "anyOf": [
          {
            "required": [
              "phone"
            ]
          },
          {
            "required": [
              "email"
            ]
          },
          {
            "required": [
              "firstname"
            ]
          },
          {
            "required": [
              "lastname"
            ]
          },
          {
            "required": [
              "consent"
            ]
          },
          {
            "required": [
              "externalId"
            ]
          },
          {
            "required": [
              "properties"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Chatarmin contact ID."
              },
              "phone": {
                "type": "string",
                "description": "The contact phone number."
              },
              "email": {
                "type": "string",
                "description": "The contact email address."
              },
              "firstname": {
                "type": "string",
                "description": "The contact first name."
              },
              "lastname": {
                "type": "string",
                "description": "The contact last name."
              },
              "consent": {
                "type": "string",
                "description": "The contact consent state."
              },
              "externalId": {
                "type": "string",
                "description": "The contact external identifier."
              }
            },
            "additionalProperties": true,
            "description": "A Chatarmin contact object."
          }
        },
        "additionalProperties": false,
        "description": "The updated Chatarmin contact."
      }
    },
    {
      "id": "chatarmin.update_voucher_pool",
      "service": "chatarmin",
      "name": "update_voucher_pool",
      "description": "Update a Chatarmin voucher pool's name, settings, or unused voucher codes.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "poolId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin voucher pool ID."
          },
          "poolName": {
            "type": "string",
            "minLength": 1,
            "description": "The display name of the voucher pool."
          },
          "vouchers": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A voucher code string."
            },
            "description": "Voucher code strings to add to the pool.",
            "minItems": 1
          },
          "reuseCodes": {
            "type": "boolean",
            "description": "Whether contacts who already received a code should get the same code again."
          },
          "reminder": {
            "type": "object",
            "properties": {
              "reminderThreshold": {
                "type": "integer",
                "minimum": 1,
                "description": "The remaining voucher count that triggers reminder emails."
              },
              "reminderEmailAdresses": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "An email address to notify.",
                  "format": "email"
                },
                "description": "Email addresses to notify when the reminder threshold is reached.",
                "minItems": 1
              }
            },
            "additionalProperties": false,
            "description": "Low-voucher email reminder settings."
          },
          "emptyOptions": {
            "type": "object",
            "properties": {
              "emptyMessage": {
                "type": "string",
                "minLength": 1,
                "description": "Fallback text sent when the voucher pool is empty."
              },
              "doNotSendWhenEmpty": {
                "type": "boolean",
                "description": "Whether Chatarmin should skip sending when the pool is empty."
              }
            },
            "additionalProperties": false,
            "description": "Behavior settings for an empty voucher pool."
          }
        },
        "additionalProperties": false,
        "required": [
          "poolId"
        ],
        "description": "Input for updating an existing Chatarmin voucher pool.",
        "anyOf": [
          {
            "required": [
              "poolName"
            ]
          },
          {
            "required": [
              "vouchers"
            ]
          },
          {
            "required": [
              "reuseCodes"
            ]
          },
          {
            "required": [
              "reminder"
            ]
          },
          {
            "required": [
              "emptyOptions"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "voucherPool": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin voucher pool object."
          }
        },
        "additionalProperties": false,
        "description": "The updated Chatarmin voucher pool."
      }
    },
    {
      "id": "chatarmin.update_webhook",
      "service": "chatarmin",
      "name": "update_webhook",
      "description": "Update a Chatarmin webhook URL or topic.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "webhookId": {
            "type": "string",
            "minLength": 1,
            "description": "The Chatarmin webhook ID."
          },
          "url": {
            "type": "string",
            "description": "The webhook target URL.",
            "format": "uri"
          },
          "topic": {
            "type": "string",
            "enum": [
              "contact/updated",
              "contact/created",
              "flow/enrolled",
              "contact/deleted",
              "message/updated",
              "error/occurred"
            ],
            "description": "The Chatarmin webhook topic."
          }
        },
        "additionalProperties": false,
        "required": [
          "webhookId"
        ],
        "description": "Input for updating an existing Chatarmin webhook.",
        "anyOf": [
          {
            "required": [
              "url"
            ]
          },
          {
            "required": [
              "topic"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "webhook": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A Chatarmin webhook object."
          }
        },
        "additionalProperties": false,
        "description": "The updated Chatarmin webhook."
      }
    }
  ]
}
