{
  "service": "segment",
  "displayName": "Segment",
  "categories": [
    "Data",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "Write Key",
      "placeholder": "SEGMENT_WRITE_KEY",
      "description": "Segment source write key sent as the writeKey JSON body field. Open the Segment app, select a source, then copy its write key from the source settings: https://segment.com/docs/connections/find-writekey/."
    }
  ],
  "homepageUrl": "https://segment.com",
  "actions": [
    {
      "id": "segment.alias",
      "service": "segment",
      "name": "alias",
      "description": "Send a Segment Alias call to associate one user identity with another.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "previousId": {
            "type": "string",
            "minLength": 1,
            "description": "Previous unique identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          }
        },
        "additionalProperties": false,
        "required": [
          "userId",
          "previousId"
        ],
        "description": "The input payload for a Segment Alias call."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.batch",
      "service": "segment",
      "name": "batch",
      "description": "Send a Segment Batch call containing Identify, Group, Track, Page, or Screen items.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "batch": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "identify",
                    "track",
                    "page",
                    "screen",
                    "group"
                  ],
                  "description": "Segment event type for this batch item."
                }
              },
              "additionalProperties": true,
              "description": "One Segment batch event."
            },
            "description": "Segment event items to send in this batch.",
            "minItems": 1,
            "maxItems": 2500
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          }
        },
        "additionalProperties": false,
        "required": [
          "batch"
        ],
        "description": "The input payload for a Segment Batch call."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.group",
      "service": "segment",
      "name": "group",
      "description": "Send a Segment Group call to associate a user with a group.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "anonymousId": {
            "type": "string",
            "minLength": 1,
            "description": "Pseudo-unique anonymous identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          },
          "groupId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the group in your database."
          },
          "traits": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Free-form traits associated with the group."
          }
        },
        "additionalProperties": false,
        "required": [
          "groupId"
        ],
        "description": "The input payload for a Segment Group call.",
        "anyOf": [
          {
            "required": [
              "userId"
            ]
          },
          {
            "required": [
              "anonymousId"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.identify",
      "service": "segment",
      "name": "identify",
      "description": "Send a Segment Identify call to record user traits.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "anonymousId": {
            "type": "string",
            "minLength": 1,
            "description": "Pseudo-unique anonymous identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          },
          "traits": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Free-form traits associated with the user."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for a Segment Identify call.",
        "anyOf": [
          {
            "required": [
              "userId"
            ]
          },
          {
            "required": [
              "anonymousId"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.page",
      "service": "segment",
      "name": "page",
      "description": "Send a Segment Page call to record a website page view.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "anonymousId": {
            "type": "string",
            "minLength": 1,
            "description": "Pseudo-unique anonymous identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Optional page name."
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Free-form properties associated with the page."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for a Segment Page call.",
        "anyOf": [
          {
            "required": [
              "userId"
            ]
          },
          {
            "required": [
              "anonymousId"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.screen",
      "service": "segment",
      "name": "screen",
      "description": "Send a Segment Screen call to record a mobile app screen view.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "anonymousId": {
            "type": "string",
            "minLength": 1,
            "description": "Pseudo-unique anonymous identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Optional screen name."
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Free-form properties associated with the screen."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for a Segment Screen call.",
        "anyOf": [
          {
            "required": [
              "userId"
            ]
          },
          {
            "required": [
              "anonymousId"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    },
    {
      "id": "segment.track",
      "service": "segment",
      "name": "track",
      "description": "Send a Segment Track call to record one user event.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "Unique identifier for the user in your database."
          },
          "anonymousId": {
            "type": "string",
            "minLength": 1,
            "description": "Pseudo-unique anonymous identifier for the user."
          },
          "context": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment context object with extra information about the event."
          },
          "integrations": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Segment destination flags keyed by destination name."
          },
          "timestamp": {
            "type": "string",
            "description": "Timestamp when the message took place, in ISO 8601 format.",
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "description": "Timestamp when the message was sent to Segment, in ISO 8601 format.",
            "format": "date-time"
          },
          "messageId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Unique message identifier used by Segment for deduplication."
          },
          "event": {
            "type": "string",
            "minLength": 1,
            "description": "Name of the action the user performed."
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "description": "A JSON-compatible Segment field value."
            },
            "description": "Free-form properties associated with the event."
          }
        },
        "additionalProperties": false,
        "required": [
          "event"
        ],
        "description": "The input payload for a Segment Track call.",
        "anyOf": [
          {
            "required": [
              "userId"
            ]
          },
          {
            "required": [
              "anonymousId"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean",
            "description": "Whether Segment accepted the HTTP request."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status returned by Segment."
          },
          "raw": {
            "description": "Raw response payload returned by Segment, or null when the body is empty."
          }
        },
        "additionalProperties": false,
        "required": [
          "accepted",
          "status",
          "raw"
        ],
        "description": "Normalized Segment HTTP API acceptance response."
      }
    }
  ]
}
