> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pocketflows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a copy of an existing segment



## OpenAPI

````yaml /openapi.json post /segments/{id}/copy
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /segments/{id}/copy:
    post:
      tags:
        - Segments
      summary: Create a copy of an existing segment
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the segment
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
      responses:
        '200':
          description: The copied `Segment` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Segment'
components:
  schemas:
    Segment:
      type: object
      properties:
        id:
          type: string
          description: The ID of the segment
        name:
          type: string
          description: The name of the segment
        filter:
          type: string
          nullable: true
          description: The filter for this segment
        description:
          type: string
          nullable: true
          description: A Markdown description of the filter
        metadata:
          type: object
          additionalProperties: true
          description: Metadata attached to this segment
        static_customers:
          type: array
          items:
            type: string
          description: The customers that are always included in this segment
      required:
        - id
        - name
        - filter
        - description
      title: The Segment object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````