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

# Update Referral

> Updates a referral based on their ID



## OpenAPI

````yaml PUT /referrals
openapi: 3.0.1
info:
  title: Referly API
  description: API for managing affiliates, referrals, and sales for SaaS businesses
  version: 1.0.0
servers:
  - url: https://www.referly.so/api/v1
security:
  - bearerAuth: []
paths:
  /referrals:
    put:
      summary: Update a referral by ID
      description: Updates a referral based on their ID
      requestBody:
        description: Referral update details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReferralUpdate'
        required: true
      responses:
        '200':
          description: Referral updated successfully
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ReferralUpdate:
      type: object
      required:
        - referralId
      properties:
        referralId:
          type: string
          format: uuid
          description: The referral ID to update
        name:
          type: string
          description: Name of the referred user
        email:
          type: string
          format: email
          description: Email of the referred user
        referredUserExternalId:
          type: string
          description: >-
            The external ID of the referred user. This will be an ID you
            actively maintain that identifies the user on your server (for
            example, the User ID in your database, or Stripe Customer ID)
        plan:
          type: string
          description: The plan associated with the referred user
        status:
          type: string
          description: Status of the referral (active/inactive)
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````