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

# Toggle Follow

> Follows or unfollows a user based on the current follow status.



## OpenAPI

````yaml POST /follow/toggle
openapi: 3.0.1
info:
  title: Follow API
  version: 1.0.0
  description: API for managing user follow relationships
servers: []
security: []
paths:
  /follow/toggle:
    post:
      summary: Toggle Follow
      description: Follows or unfollows a user based on the current follow status.
      parameters:
        - $ref: '#/components/parameters/X-API-KEY'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                targetUserId:
                  type: integer
                  description: ID of the user to follow or unfollow
                currentFollowing:
                  type: boolean
                  description: Current follow status of the target user
              required:
                - targetUserId
                - currentFollowing
      responses:
        '200':
          description: Follow status updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  action:
                    type: string
                    enum:
                      - followed
                      - unfollowed
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  parameters:
    X-API-KEY:
      name: X-API-KEY
      description: API key required for authentication
      in: header
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````