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

# Update Segment

> Update a segment



## OpenAPI

````yaml PUT /segment/update?id={id}
openapi: 3.1.0
info:
  title: AwazIndia API
  description: >-
    A sample API that uses a campaign store as an example to demonstrate
    features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.awazindia.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /segment/update?id={id}:
    put:
      description: Update a segment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The ID of the segment to update
      requestBody:
        description: Segment to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContact'
        required: true
      responses:
        '200':
          description: Segment response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '400':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateContact:
      allOf:
        - $ref: '#/components/schemas/Contact'
        - type: object
    Contact:
      required:
        - name
        - description
      type: object
      properties:
        name:
          description: The name of the Contact
          type: string
        description:
          description: The description of the Contact
          type: string
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header

````