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

# Update Affiliate Membership Status

> This endpoint allows you to approve, reject, or ban an affiliate by updating their membership status. You need to supply the `membership_id` and desired `action` in the request body. The `x-store-id` header is used for verification.



## OpenAPI

````yaml /api-reference/growth-api.json post /affiliates
openapi: 3.0.0
info:
  title: Growth API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security:
  - storeIdHeader: []
paths:
  /affiliates:
    post:
      tags:
        - Affiliates
      summary: Update Affiliate Membership Status
      description: >-
        This endpoint allows you to approve, reject, or ban an affiliate by
        updating their membership status. You need to supply the `membership_id`
        and desired `action` in the request body. The `x-store-id` header is
        used for verification.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAffiliateMembershipStatusRequest'
      responses:
        '200':
          description: Affiliate membership status updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AffiliateDetails'
      security:
        - storeIdHeader: []
components:
  schemas:
    UpdateAffiliateMembershipStatusRequest:
      type: object
      properties:
        membership_id:
          type: string
        action:
          type: string
          enum:
            - approve
            - reject
            - ban
      required:
        - membership_id
        - action
    AffiliateDetails:
      type: object
      properties:
        id:
          type: string
        store_id:
          type: string
        program_id:
          type: string
        status:
          type: string
        created_at:
          type: string
          format: date-time
        affiliate:
          type: object
          properties:
            id:
              type: string
            display_name:
              type: string
            website:
              type: string
            social_links:
              type: string
        stats:
          type: object
          properties:
            conversions:
              type: integer
            total_revenue:
              type: number
            total_commission:
              type: integer
            pending_commission:
              type: integer
  securitySchemes:
    storeIdHeader:
      type: apiKey
      in: header
      name: x-store-id

````