Skip to main content
PUT
Update an existing referral’s information. Use this endpoint to change referral status, update contact information, or modify metadata.

Overview

The Update Referral endpoint allows you to modify referral information after it has been created. Common use cases include:
  • Updating referral status (e.g., from pending to converted)
  • Correcting contact information
  • Adding verification timestamps
  • Updating metadata
  • Marking referrals as verified or rejected

Authentication

This endpoint requires authentication using a Bearer token in the Authorization header:

Path Parameters

string
required
The unique identifier of the referral you want to update.Example: ref_123abc

Request Body

All fields in the request body are optional. Only include the fields you want to update.
string
Update the first name of the referred person.Example: John
string
Update the last name of the referred person.Example: Doe
string
Update the email address of the referred person.Example: john.doe@example.com
string
Update the URL to the profile picture.Example: https://example.com/profiles/john-doe.jpg
string
Update the referral status. Valid values are:
  • pending - Referral created but not yet converted
  • converted - Referral has converted (made a purchase/subscription)
  • verified - Referral has been verified
  • rejected - Referral was rejected
Example: converted
string
ISO 8601 timestamp of when the referral was verified. Typically set when status changes to verified.Example: 2024-01-16T14:20:00Z
object
Update additional metadata. This will merge with existing metadata or replace it depending on your API configuration.Example:

Request Example

Response

On success, the API returns the updated referral object:
string
required
Unique identifier for the referral.
string
required
ID of the impression that led to this referral.
string
required
Updated first name (if provided).
string
required
Updated last name (if provided).
string
required
Updated email (if provided).
string
required
Updated status (if provided).
string
Updated verification timestamp (if provided).
string
required
ISO 8601 timestamp of when the referral was last updated.

Response Example

Error Responses

object
Bad Request - Invalid request data
object
Unauthorized - Invalid or missing API key
object
Not Found - The referral with the specified ID does not exist

Use Cases

Marking Referral as Converted

When a referred customer makes a purchase, update the referral status:

Verifying a Referral

Mark a referral as verified with a timestamp:

Rejecting Invalid Referrals

Mark a referral as rejected if it doesn’t meet criteria:

Updating Contact Information

Correct or update referral contact details:

Best Practices

  1. Update status carefully - Status changes should reflect actual business events
  2. Set verified_at when verifying - Always include a timestamp when marking as verified
  3. Use metadata for context - Store additional context in metadata rather than status alone
  4. Validate status values - Ensure status values are valid before sending
  5. Handle 404 errors - Check if referral exists before updating
  6. Track who made changes - Include admin/user IDs in metadata when updating

Status Workflow

Typical referral status progression:
  1. pending → Created but not yet converted
  2. converted → Referred customer made a purchase
  3. verified → Conversion verified by admin
  4. rejected → Referral doesn’t meet criteria (can happen at any stage)

Rate Limits

This endpoint is subject to rate limiting. Check response headers for rate limit information.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Referral ID

Body

application/json
first_name
string
last_name
string
email
string
profile_picture
string
status
enum<string>
Available options:
pending,
converted,
verified,
rejected
verified_at
string<date-time>
metadata
object

Response

Referral updated successfully