{
  "opencollection": "1.0.0",
  "info": {
    "name": "Twilio SendGrid Provisioning Account Segmenting Contacts API",
    "version": "1.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Segmenting Contacts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get List of Segments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.sendgrid.com/v3/marketing/segments",
            "params": [
              {
                "name": "ids",
                "value": "",
                "type": "query",
                "description": "A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned."
              },
              {
                "name": "parent_list_ids",
                "value": "",
                "type": "query",
                "description": "A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed"
              },
              {
                "name": "no_parent_list_id",
                "value": "",
                "type": "query",
                "description": "If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter.  If the value is not present it defaults to 'false'."
              }
            ]
          },
          "docs": "**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.  Zero matches will return a response code of 200 with an empty `results` array.\n\n`parent_list_ids` | `no_parent_list_id` | `ids` | `result`\n-----------------:|:--------------------:|:-------------:|:-------------:\nempty | false | empty | all segments values\nlist_ids | false | empty | segments filtered by list_ids values\nlist_ids |true | empty | segm"
        },
        {
          "info": {
            "name": "Get Segment by ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.sendgrid.com/v3/marketing/segments/:segment_id",
            "params": [
              {
                "name": "segment_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "query_json",
                "value": "",
                "type": "query",
                "description": "Defaults to `false`.  Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json`"
              }
            ]
          },
          "docs": "**This endpoint allows you to retrieve a single segment by ID.**"
        },
        {
          "info": {
            "name": "Delete Segment",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.sendgrid.com/v3/marketing/segments/:segment_id",
            "params": [
              {
                "name": "segment_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "**This endpoint allows you to delete a segment by `segment_id`.**\n\nNote that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to."
        }
      ]
    }
  ],
  "bundled": true
}