action sendgrid_get_marketing_segments { label: "Get List of Segments" description: "**This endpoint allows you to retrieve a list of segments.**\n\nThe query param `parent_list_ids` is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty `results` array.\n\n`parent_list_ids` | `no_parent_list_id` | `result`\n-----------------:|:--------------------:|:-------------\nempty | false | all segments\nvalues | false | segments filtered by list_ids\nvalues | true | segments filtered by list_ids and segments with no parent list_ids\nempty | true | segments with no parent list_ids" provider: sendgrid method: GET path: "/marketing/segments" encoding: json input: { type: "object" properties: { no_parent_list_id: { type: "boolean" } parent_list_ids: { type: "string" } } additionalProperties: false } output: { type: "object" required: ["results"] properties: { results: { type: "array" items: { type: "object" required: ["id", "contacts_count", "created_at", "sample_updated_at", "updated_at"] properties: { contacts_count: { type: "integer" } created_at: { type: "string" format: "date-time" description: "ISO8601 of created timestamp\n" } id: { type: "string" format: "uuid" } name: { type: "string" } next_sample_update: { type: "string" description: "ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples." } parent_list_id: { type: "string" format: "uuid" description: "The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})`" } sample_updated_at: { type: "string" format: "date-time" description: "ISO8601 timestamp the sample was last updated" } updated_at: { type: "string" format: "date-time" description: "ISO8601 timestamp the object was last updated" } } } } } } }