{
  "service": "unipile",
  "displayName": "Unipile",
  "categories": [
    "Communication",
    "Productivity"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Access Token",
      "placeholder": "UNIPILE_ACCESS_TOKEN",
      "description": "Unipile access token sent in the X-API-KEY header. View and manage access tokens in the Unipile Dashboard: https://dashboard.unipile.com/.",
      "extraFields": [
        {
          "key": "dsn",
          "label": "DSN",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "api1.unipile.com:12345",
          "description": "Your Unipile API DSN host. Copy it from the Unipile Dashboard API usage panel: https://dashboard.unipile.com/."
        }
      ]
    }
  ],
  "homepageUrl": "https://www.unipile.com/",
  "actions": [
    {
      "id": "unipile.get_account",
      "service": "unipile",
      "name": "get_account",
      "description": "Retrieve a Unipile account by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "minLength": 1,
            "description": "The Unipile account ID to retrieve.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "accountId"
        ],
        "description": "The input payload for retrieving a Unipile account."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Unipile account identifier."
              },
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Unipile account type when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The account display name when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The account status when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The account creation timestamp when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw object returned by Unipile."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Unipile account."
          }
        },
        "additionalProperties": false,
        "required": [
          "account"
        ],
        "description": "The response returned when retrieving a Unipile account."
      }
    },
    {
      "id": "unipile.get_chat",
      "service": "unipile",
      "name": "get_chat",
      "description": "Retrieve a Unipile chat by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "chatId": {
            "type": "string",
            "minLength": 1,
            "description": "The Unipile or provider chat ID to retrieve.",
            "pattern": "\\S"
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "description": "The Unipile account ID, required when chatId is a provider ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "chatId"
        ],
        "description": "The input payload for retrieving a Unipile chat."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "chat": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Unipile chat identifier."
              },
              "accountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Unipile account identifier associated with the chat."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "accountType": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The messaging provider type associated with the chat."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The upstream provider chat identifier when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The chat display name when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "unreadCount": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "The unread message count when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timestamp": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The latest chat timestamp when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw object returned by Unipile."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Unipile chat."
          }
        },
        "additionalProperties": false,
        "required": [
          "chat"
        ],
        "description": "The response returned when retrieving a Unipile chat."
      }
    },
    {
      "id": "unipile.get_message",
      "service": "unipile",
      "name": "get_message",
      "description": "Retrieve a Unipile message by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "minLength": 1,
            "description": "The Unipile message ID to retrieve.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "messageId"
        ],
        "description": "The input payload for retrieving a Unipile message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Unipile message identifier."
              },
              "providerId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The upstream provider message identifier when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chatId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The chat identifier associated with the message when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "senderId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The sender identifier when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "text": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The message text when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timestamp": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The message timestamp when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw object returned by Unipile."
                },
                "description": "The message attachment metadata returned by Unipile."
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw object returned by Unipile."
              }
            },
            "additionalProperties": false,
            "description": "A normalized Unipile message."
          }
        },
        "additionalProperties": false,
        "required": [
          "message"
        ],
        "description": "The response returned when retrieving a Unipile message."
      }
    },
    {
      "id": "unipile.list_accounts",
      "service": "unipile",
      "name": "list_accounts",
      "description": "List accounts connected to Unipile.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "A Unipile pagination cursor from a previous list response.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The maximum number of items to return, from 1 to 250."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Unipile accounts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pageInfo": {
            "type": "object",
            "properties": {
              "object": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Unipile list object type when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page when available."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "Unipile pagination metadata."
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Unipile account identifier."
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Unipile account type when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The account display name when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The account status when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The account creation timestamp when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw object returned by Unipile."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Unipile account."
            },
            "description": "The accounts returned by Unipile."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw object returned by Unipile."
          }
        },
        "additionalProperties": false,
        "required": [
          "pageInfo",
          "accounts",
          "raw"
        ],
        "description": "The response returned when listing Unipile accounts."
      }
    },
    {
      "id": "unipile.list_chat_messages",
      "service": "unipile",
      "name": "list_chat_messages",
      "description": "List messages from a Unipile chat.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "chatId": {
            "type": "string",
            "minLength": 1,
            "description": "The Unipile chat ID whose messages should be listed.",
            "pattern": "\\S"
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "A Unipile pagination cursor from a previous list response.",
            "pattern": "\\S"
          },
          "before": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 UTC datetime filter such as 2025-12-31T23:59:59.999Z.",
            "pattern": "\\S"
          },
          "after": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 UTC datetime filter such as 2025-12-31T23:59:59.999Z.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The maximum number of items to return, from 1 to 250."
          },
          "senderId": {
            "type": "string",
            "minLength": 1,
            "description": "Only return messages from this sender ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "chatId"
        ],
        "description": "The input payload for listing messages from a Unipile chat."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pageInfo": {
            "type": "object",
            "properties": {
              "object": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Unipile list object type when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page when available."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "Unipile pagination metadata."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Unipile message identifier."
                },
                "providerId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The upstream provider message identifier when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "chatId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The chat identifier associated with the message when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "senderId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The sender identifier when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "text": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The message text when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The message timestamp when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true,
                    "description": "The raw object returned by Unipile."
                  },
                  "description": "The message attachment metadata returned by Unipile."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw object returned by Unipile."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Unipile message."
            },
            "description": "The messages returned by Unipile."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw object returned by Unipile."
          }
        },
        "additionalProperties": false,
        "required": [
          "pageInfo",
          "messages",
          "raw"
        ],
        "description": "The response returned when listing Unipile chat messages."
      }
    },
    {
      "id": "unipile.list_chats",
      "service": "unipile",
      "name": "list_chats",
      "description": "List Unipile messaging chats with optional filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "unread": {
            "type": "boolean",
            "description": "Whether to return only unread or only read chats."
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "A Unipile pagination cursor from a previous list response.",
            "pattern": "\\S"
          },
          "before": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 UTC datetime filter such as 2025-12-31T23:59:59.999Z.",
            "pattern": "\\S"
          },
          "after": {
            "type": "string",
            "minLength": 1,
            "description": "An ISO 8601 UTC datetime filter such as 2025-12-31T23:59:59.999Z.",
            "pattern": "\\S"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The maximum number of items to return, from 1 to 250."
          },
          "accountType": {
            "type": "string",
            "enum": [
              "WHATSAPP",
              "LINKEDIN",
              "SLACK",
              "TWITTER",
              "MESSENGER",
              "INSTAGRAM",
              "TELEGRAM"
            ],
            "description": "The connected messaging provider type to filter by."
          },
          "accountId": {
            "type": "string",
            "minLength": 1,
            "description": "A Unipile account ID or comma-separated account IDs.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Unipile chats."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pageInfo": {
            "type": "object",
            "properties": {
              "object": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Unipile list object type when returned."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page when available."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false,
            "description": "Unipile pagination metadata."
          },
          "chats": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Unipile chat identifier."
                },
                "accountId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The Unipile account identifier associated with the chat."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accountType": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The messaging provider type associated with the chat."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "providerId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The upstream provider chat identifier when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The chat display name when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unreadCount": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "The unread message count when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "timestamp": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The latest chat timestamp when returned."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw object returned by Unipile."
                }
              },
              "additionalProperties": false,
              "description": "A normalized Unipile chat."
            },
            "description": "The chats returned by Unipile."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw object returned by Unipile."
          }
        },
        "additionalProperties": false,
        "required": [
          "pageInfo",
          "chats",
          "raw"
        ],
        "description": "The response returned when listing Unipile chats."
      }
    }
  ]
}
