RecomlyRecomlyRecomlyDocs
Recomly APIEndpoints

Update campaign

Update the name, status, expiry, or reward configuration of a campaign.

PATCH /api/app/campaigns/{campaignId}

Updates one or more fields on an existing campaign. All body fields are optional — include only the fields you want to change. At least one field is required.


Request

See API Basics for required headers.

Body

FieldTypeDescription
namestringCampaign name. Max 100 characters.
status"active" | "paused"Campaign status. Use "paused" to stop accepting new referrals without deleting the campaign.
expiresAtstring (ISO 8601) | nullExpiry date and time. Pass null to remove an existing expiry.
rewardMode"fixed" | "percent"Reward mode. See Create campaign for unit details.
advocateRewardValueintegerAdvocate reward amount. Unit depends on rewardMode.
friendRewardValueintegerFriend reward amount. Unit depends on rewardMode.
maxReferralsPerAdvocateinteger (1–200)Maximum referrals an individual advocate can send.

Sample request

curl -X PATCH https://api.recomly.com/api/app/campaigns/c7a3f1d2-84b0-4e9a-bcd2-1f3e5a7c9012 \
  -H "Authorization: Bearer rk_live_abc123:def456" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "paused",
    "expiresAt": "2026-06-30T23:59:59.000Z"
  }'

Sample response

Status: 200 OK

{
  "campaign": {
    "campaignId": "c7a3f1d2-84b0-4e9a-bcd2-1f3e5a7c9012",
    "orgId": "a1b2c3d4-0000-4000-8000-e5f6a7b8c9d0",
    "name": "Spring Referral Drive",
    "status": "paused",
    "rewardMode": "fixed",
    "advocateRewardValue": 2500,
    "friendRewardValue": 1500,
    "maxReferralsPerAdvocate": 20,
    "expiresAt": "2026-06-30T23:59:59.000Z",
    "createdAt": "2026-04-04T14:00:00.000Z",
    "updatedAt": "2026-04-05T09:15:00.000Z"
  }
}

Error responses

See API Basics for standard status codes and error response format.

On this page

We use cookies

We use essential cookies to keep the site working, and optional analytics cookies to understand how it's used. Read our Privacy Policy.