Update Campaign
Update campaign details such as title, description, content URL, category, tagline, and reward amount. Only the fields you include in the request body will be updated. When reward_amount is changed, the cohort reward distribution is automatically recalculated using the default percentages (100% / 80% / 60% / 40% / ₹3).
PATCH/nfthing/campaign/update
Headers
| Field | Type | Required | Description |
|---|---|---|---|
| X-API-Key | string | Yes | Your Membrane API key. |
| Content-Type | string | Yes | Must be application/json. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| post_id | string | Yes | The post_id of the campaign. |
| title | string | No | New campaign title. |
| description | string | No | New campaign description. |
| content_url | string | No | New content URL. |
| category | string | No | New campaign category. |
| tagline | string | No | New campaign tagline. |
| reward_amount | number | No | New reward amount. Must be positive. Triggers automatic cohort reward recalculation. |
Example request
PATCH /nfthing/campaign/update
{
"post_id": "bbfea083-da7f-492f-a29d-9f66848de9e4",
"title": "Updated Tech Survey",
"reward_amount": 20
}Example response
200 OK
{
"success": true,
"message": "Campaign updated successfully",
"data": {
"post_id": "bbfea083-da7f-492f-a29d-9f66848de9e4",
"type": "survey",
"title": "Updated Tech Survey",
"description": "Share your thoughts on the latest tech trends",
"content_url": "https://example.com/tech-survey",
"category": "technology",
"tagline": "Your opinion matters",
"reward_amount": 20,
"is_live": false,
"cohort_rewards": {
"cohort_1_reward": 3,
"cohort_2_reward": 8,
"cohort_3_reward": 12,
"cohort_4_reward": 16,
"cohort_5_reward": 20
}
}
}Notes
- • At least one field (besides post_id) must be provided.
- • The cohort_rewards field is only included in the response when reward_amount changes.