---
title: "Update referral"
method: PUT
path: "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}"
tags: ["Referrals"]
---

# Update referral

`PUT /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/applications/:applicationId/campaigns/:campaignId/referrals/:referralId/put.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Update the specified referral.

## Path parameters

- `applicationId` integer, required
- `campaignId` integer, required
- `referralId` string, required

## Request body

- UpdateReferral
  - `friendProfileIntegrationId` string: An optional Integration ID of the Friend's Profile.
  - `startDate` string, date-time: Timestamp at which point the referral code becomes valid.
  - `expiryDate` string, date-time: Expiration date of the referral code. Referral never expires if this is omitted.
  - `usageLimit` integer: The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply.
  - `attributes` object: Arbitrary properties associated with this item.

## Response `200`

OK

- Referral
  - `id` integer, required: The internal ID of this entity.
  - `created` string, date-time, required: The time this entity was created.
  - `startDate` string, date-time: Timestamp at which point the referral code becomes valid.
  - `expiryDate` string, date-time: Expiration date of the referral code. Referral never expires if this is omitted.
  - `usageLimit` integer, required: The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply.
  - `campaignId` integer, required: ID of the campaign from which the referral received the referral code.
  - `advocateProfileIntegrationId` string, required: The Integration ID of the Advocate's Profile.
  - `friendProfileIntegrationId` string: An optional Integration ID of the Friend's Profile.
  - `attributes` object: Arbitrary properties associated with this item.
  - `importId` integer: The ID of the Import which created this referral.
  - `code` string, required: The referral code.
  - `usageCounter` integer, required: The number of times this referral code has been successfully used.
  - `batchId` string: The ID of the batch the referrals belong to.

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
