---
updatedAt: 2026-09-01T20:42:06.000Z
---

# Duplicate a segment

Creates a duplicate of the segment under a new name. The `duplicate` list selects what is copied and must always include `resource` (the segment's own fields). Adding `categories` also copies the segment's category associations. Requesting an entity the segment has nothing to duplicate for returns a validation error — call GET on this endpoint first to see which entities are available.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Reference Resources",
    "version": "2.0.0",
    "description": "Buzz API v2"
  },
  "paths": {
    "/segments/{id}/duplicate": {
      "post": {
        "operationId": "segments_duplicate_create",
        "description": "Creates a duplicate of the segment under a new name. The `duplicate` list selects what is copied and must always include `resource` (the segment's own fields). Adding `categories` also copies the segment's category associations. Requesting an entity the segment has nothing to duplicate for returns a validation error — call GET on this endpoint first to see which entities are available.",
        "summary": "Duplicate a segment",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "integer",
              "description": "The unique ID of the segment"
            },
            "required": true
          }
        ],
        "tags": [
          "Segments"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentDuplicate"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/SegmentDuplicate"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SegmentDuplicate"
              }
            }
          },
          "required": true
        },
        "security": [
          {
            "nestSessionAuth": []
          },
          {
            "nestBasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Segment"
                }
              }
            },
            "description": "Segment duplicated successfully."
          },
          "400": {
            "description": "Validation error or invalid parameters."
          },
          "401": {
            "description": "Authentication credentials were not provided."
          },
          "403": {
            "description": "Permission denied."
          },
          "404": {
            "description": "Segment not found."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Segment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique ID of the segment"
          },
          "account_id": {
            "type": "integer",
            "description": "Defaults to the account in the active session"
          },
          "advertiser_id": {
            "type": "integer",
            "nullable": true,
            "description": "The advertiser that owns the segment, if any."
          },
          "key": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "Alphanumeric key for the segment or category, in the format {Data Provider}-{Segment / Category ID}."
          },
          "name": {
            "type": "string",
            "description": "The name of the segment",
            "pattern": "^[\\w[('-]",
            "maxLength": 255
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The description of the segment",
            "maxLength": 255
          },
          "cpm_cost": {
            "type": "string",
            "format": "decimal",
            "pattern": "^-?\\d{0,2}(?:\\.\\d{0,3})?$",
            "nullable": true,
            "description": "The CPM cost to target this segment."
          },
          "verb": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VerbEnum"
              }
            ],
            "default": "ALL",
            "description": "Restricted way segment can be applied to a targeting expression.\n\n* `ALL` - All\n* `INCLUDE` - Include\n* `EXCLUDE` - Exclude\n* `REQUIRE` - Require"
          },
          "ttl_days": {
            "type": "integer",
            "description": "How long a user stays in the segment, in days (0-90). Defaults to the account's DEFAULT_SEGMENT_TTL_DAYS setting, or 30 if that is unset.",
            "minimum": 0,
            "maximum": 90
          },
          "extensible": {
            "type": "boolean",
            "default": true,
            "description": "Whether the segment extends across devices."
          },
          "aggregate_excludes": {
            "type": "boolean",
            "default": false
          },
          "category_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keys of the segment categories this segment belongs to, e.g. 'mybuzzkey-1234'. Pass an empty list for an uncategorized segment."
          },
          "active": {
            "type": "boolean",
            "default": true,
            "description": "Whether the segment is active."
          },
          "create_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was first created",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          },
          "update_date": {
            "type": "string",
            "readOnly": true,
            "nullable": true,
            "description": "The date and time the object was last updated",
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "example": "2025-09-29 00:00:00"
          },
          "alternative_id": {
            "type": "string",
            "nullable": true,
            "description": "An ID that may be used for any reporting or administrative purpose. Limited to 191 characters.",
            "maxLength": 200
          },
          "notes": {
            "type": "string",
            "nullable": true,
            "description": "Free-form notes of up to 255 characters.",
            "maxLength": 255
          }
        },
        "required": [
          "account_id",
          "category_keys",
          "create_date",
          "id",
          "key",
          "name",
          "update_date"
        ]
      },
      "SegmentDuplicate": {
        "type": "object",
        "properties": {
          "advertiser_id": {
            "type": "integer",
            "nullable": true,
            "description": "The advertiser to assign to the duplicate, if any."
          },
          "name": {
            "type": "string",
            "description": "The name of the segment",
            "maxLength": 255
          },
          "duplicate": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SegmentDuplicateDuplicateEnum"
            },
            "description": "The list of strings that describes a set of entities to be duplicated."
          }
        },
        "required": [
          "duplicate",
          "name"
        ]
      },
      "SegmentDuplicateDuplicateEnum": {
        "enum": [
          "resource",
          "categories"
        ],
        "type": "string",
        "description": "* `resource` - resource\n* `categories` - categories"
      },
      "VerbEnum": {
        "enum": [
          "ALL",
          "INCLUDE",
          "EXCLUDE",
          "REQUIRE"
        ],
        "type": "string",
        "description": "* `ALL` - All\n* `INCLUDE` - Include\n* `EXCLUDE` - Exclude\n* `REQUIRE` - Require"
      }
    },
    "securitySchemes": {
      "nestBasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Form-based Basic Authentication"
      },
      "nestSessionAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Form-based Basic Authentication"
      }
    }
  },
  "x-explorer-enabled": false,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python",
    "php",
    "java"
  ],
  "servers": [
    {
      "url": "https://{buzz_key}.api.beeswax.com/rest/v2",
      "variables": {
        "buzz_key": {
          "default": "stingersbx",
          "description": "Unique customer ID assigned by the Beeswax"
        }
      }
    }
  ],
  "x-readme": {
    "apply-endpoint-order": true,
    "apply-tag-changes": true
  }
}
```