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
pendingtoconverted) - 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
The unique identifier of the referral you want to update.Example:
ref_123abcRequest Body
All fields in the request body are optional. Only include the fields you want to update.Update the first name of the referred person.Example:
JohnUpdate the last name of the referred person.Example:
DoeUpdate the email address of the referred person.Example:
john.doe@example.comUpdate the URL to the profile picture.Example:
https://example.com/profiles/john-doe.jpgUpdate the referral status. Valid values are:
pending- Referral created but not yet convertedconverted- Referral has converted (made a purchase/subscription)verified- Referral has been verifiedrejected- Referral was rejected
convertedISO 8601 timestamp of when the referral was verified. Typically set when status changes to
verified.Example: 2024-01-16T14:20:00ZUpdate 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:Unique identifier for the referral.
ID of the impression that led to this referral.
Updated first name (if provided).
Updated last name (if provided).
Updated email (if provided).
Updated status (if provided).
Updated verification timestamp (if provided).
ISO 8601 timestamp of when the referral was last updated.
Response Example
Error Responses
Bad Request - Invalid request data
Unauthorized - Invalid or missing API key
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
- Update status carefully - Status changes should reflect actual business events
- Set verified_at when verifying - Always include a timestamp when marking as verified
- Use metadata for context - Store additional context in metadata rather than status alone
- Validate status values - Ensure status values are valid before sending
- Handle 404 errors - Check if referral exists before updating
- Track who made changes - Include admin/user IDs in metadata when updating
Status Workflow
Typical referral status progression:pending→ Created but not yet convertedconverted→ Referred customer made a purchaseverified→ Conversion verified by adminrejected→ 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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Referral ID
Body
application/json
Response
Referral updated successfully