{
  "service": "userflow",
  "displayName": "Userflow",
  "categories": [
    "Data",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "ak_us1_xxxx",
      "description": "Userflow API key used as a bearer token. Create or view API keys in Userflow workspace settings.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://userflow.com",
  "actions": [
    {
      "id": "userflow.delete_group",
      "service": "userflow",
      "name": "delete_group",
      "description": "Delete one Userflow group by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "group_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow group ID to delete."
          }
        },
        "additionalProperties": false,
        "description": "Path parameters for deleting one Userflow group."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "Whether the Userflow group was deleted."
          },
          "group_id": {
            "type": "string",
            "description": "The deleted Userflow group ID."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A raw object returned by Userflow."
          }
        },
        "additionalProperties": false,
        "description": "The Userflow group deletion acknowledgement."
      }
    },
    {
      "id": "userflow.delete_user",
      "service": "userflow",
      "name": "delete_user",
      "description": "Delete one Userflow user by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow user ID to delete."
          }
        },
        "additionalProperties": false,
        "description": "Path parameters for deleting one Userflow user."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "Whether the Userflow user was deleted."
          },
          "user_id": {
            "type": "string",
            "description": "The deleted Userflow user ID."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "A raw object returned by Userflow."
          }
        },
        "additionalProperties": false,
        "description": "The Userflow user deletion acknowledgement."
      }
    },
    {
      "id": "userflow.get_group",
      "service": "userflow",
      "name": "get_group",
      "description": "Fetch one Userflow group by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "group_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow group ID to retrieve."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One expandable Userflow field name."
            },
            "description": "Expandable Userflow fields to include in the response."
          }
        },
        "additionalProperties": false,
        "required": [
          "group_id"
        ],
        "description": "Path and query parameters for reading one Userflow group."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "group": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Userflow group ID."
              },
              "object": {
                "type": "string",
                "description": "The Userflow object type."
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The group's display name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attributes": {
                "type": "object",
                "additionalProperties": {
                  "description": "One Userflow custom attribute value."
                },
                "description": "Userflow custom attributes keyed by attribute name."
              }
            },
            "additionalProperties": true,
            "description": "A Userflow group object."
          }
        },
        "additionalProperties": false,
        "description": "The Userflow group lookup result."
      }
    },
    {
      "id": "userflow.get_user",
      "service": "userflow",
      "name": "get_user",
      "description": "Fetch one Userflow user by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow user ID to retrieve."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One expandable Userflow field name."
            },
            "description": "Expandable Userflow fields to include in the response."
          }
        },
        "additionalProperties": false,
        "required": [
          "user_id"
        ],
        "description": "Path and query parameters for reading one Userflow user."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Userflow user ID."
              },
              "object": {
                "type": "string",
                "description": "The Userflow object type."
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The user's display name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The user's email address."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attributes": {
                "type": "object",
                "additionalProperties": {
                  "description": "One Userflow custom attribute value."
                },
                "description": "Userflow custom attributes keyed by attribute name."
              },
              "signed_up_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the user signed up."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "A Userflow user object."
          }
        },
        "additionalProperties": false,
        "description": "The Userflow user lookup result."
      }
    },
    {
      "id": "userflow.list_users",
      "service": "userflow",
      "name": "list_users",
      "description": "List Userflow users with optional cursor pagination and filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Maximum number of items to return."
          },
          "starting_after": {
            "type": "string",
            "minLength": 1,
            "description": "Object ID after which the page should start."
          },
          "ending_before": {
            "type": "string",
            "minLength": 1,
            "description": "Object ID before which the page should end."
          },
          "email": {
            "type": "string",
            "description": "Filter users by email address."
          },
          "user_id": {
            "type": "string",
            "minLength": 1,
            "description": "Filter users by external user ID."
          },
          "expand": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One expandable Userflow field name."
            },
            "description": "Expandable Userflow fields to include in the response."
          },
          "order_by": {
            "type": "string",
            "minLength": 1,
            "description": "Sort order accepted by Userflow."
          }
        },
        "additionalProperties": false,
        "description": "Optional filters for listing Userflow users."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The Userflow list object type."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Userflow user ID."
                },
                "object": {
                  "type": "string",
                  "description": "The Userflow object type."
                },
                "name": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The user's display name."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "email": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The user's email address."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "attributes": {
                  "type": "object",
                  "additionalProperties": {
                    "description": "One Userflow custom attribute value."
                  },
                  "description": "Userflow custom attributes keyed by attribute name."
                },
                "signed_up_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Timestamp when the user signed up."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": true,
              "description": "A Userflow user object."
            },
            "description": "Users returned by Userflow."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether another page is available."
          },
          "url": {
            "type": "string",
            "description": "The API path represented by the list."
          }
        },
        "additionalProperties": true,
        "description": "A paginated Userflow user list."
      }
    },
    {
      "id": "userflow.track_event",
      "service": "userflow",
      "name": "track_event",
      "description": "Track one Userflow event for a user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The event name to track."
          },
          "user_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow user ID associated with the event."
          },
          "group_id": {
            "type": "string",
            "minLength": 1,
            "description": "The Userflow group ID associated with the event."
          },
          "occurred_at": {
            "type": "string",
            "description": "Timestamp when the event occurred.",
            "format": "date-time"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "description": "One Userflow custom attribute value."
            },
            "description": "Userflow custom attributes keyed by attribute name."
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "user_id"
        ],
        "description": "Payload for tracking a Userflow event."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Userflow object ID."
              },
              "object": {
                "type": "string",
                "description": "The Userflow object type."
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the object was created."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the object was last updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "A Userflow API object."
          }
        },
        "additionalProperties": false,
        "description": "The Userflow event tracking result."
      }
    },
    {
      "id": "userflow.upsert_group",
      "service": "userflow",
      "name": "upsert_group",
      "description": "Create or update one Userflow group.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "group_id": {
            "type": "string",
            "minLength": 1,
            "description": "The external group ID to create or update in Userflow."
          },
          "name": {
            "type": "string",
            "description": "The group's display name."
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "description": "One Userflow custom attribute value."
            },
            "description": "Userflow custom attributes keyed by attribute name."
          }
        },
        "additionalProperties": false,
        "required": [
          "group_id"
        ],
        "description": "Payload for creating or updating one Userflow group."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "group": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Userflow group ID."
              },
              "object": {
                "type": "string",
                "description": "The Userflow object type."
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The group's display name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attributes": {
                "type": "object",
                "additionalProperties": {
                  "description": "One Userflow custom attribute value."
                },
                "description": "Userflow custom attributes keyed by attribute name."
              }
            },
            "additionalProperties": true,
            "description": "A Userflow group object."
          }
        },
        "additionalProperties": false,
        "description": "The created or updated Userflow group."
      }
    },
    {
      "id": "userflow.upsert_user",
      "service": "userflow",
      "name": "upsert_user",
      "description": "Create or update one Userflow user.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string",
            "minLength": 1,
            "description": "The external user ID to create or update in Userflow."
          },
          "name": {
            "type": "string",
            "description": "The user's display name."
          },
          "email": {
            "type": "string",
            "description": "The user's email address.",
            "format": "email"
          },
          "signed_up_at": {
            "type": "string",
            "description": "Timestamp when the user signed up.",
            "format": "date-time"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": {
              "description": "One Userflow custom attribute value."
            },
            "description": "Userflow custom attributes keyed by attribute name."
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One group ID."
            },
            "description": "Group IDs the user belongs to."
          }
        },
        "additionalProperties": false,
        "required": [
          "user_id"
        ],
        "description": "Payload for creating or updating one Userflow user."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Userflow user ID."
              },
              "object": {
                "type": "string",
                "description": "The Userflow object type."
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The user's display name."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The user's email address."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "attributes": {
                "type": "object",
                "additionalProperties": {
                  "description": "One Userflow custom attribute value."
                },
                "description": "Userflow custom attributes keyed by attribute name."
              },
              "signed_up_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "Timestamp when the user signed up."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": true,
            "description": "A Userflow user object."
          }
        },
        "additionalProperties": false,
        "description": "The created or updated Userflow user."
      }
    }
  ]
}
