PUT
https://jmpy.me/api/v1
/
campaigns
/
{id}
Update Campaign
curl --request PUT \
  --url https://jmpy.me/api/v1/campaigns/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "end_date": "<string>",
  "tags": [
    {}
  ]
}
'
Update campaign details.

Path Parameters

id
string
required
The unique identifier (UUID) of the campaign OR the campaign name.Note on Names: If using a campaign name with spaces (e.g., “Summer Sale”), it must be URL-encoded in the path (e.g., Summer%20Sale).Example: 110e8400-e29b-41d4-a716-446655440000 or Summer%20Sale%202024

Body Parameters

name
string
Update campaign name.
description
string
Update description.
end_date
string
Update end date.
tags
array
Update tags.

Request Examples

# Update by ID
curl -X PUT "https://jmpy.me/api/v1/campaigns/110e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Updated Campaign Name", "description": "New description" }'

# Update by Name (URL Encoded)
curl -X PUT "https://jmpy.me/api/v1/campaigns/Summer%20Sale%202024" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "end_date": "2024-12-31T23:59:59Z" }'

Response Examples

{
  "success": true,
  "data": {
    "id": "110e8400-e29b-41d4-a716-446655440000",
    "name": "Updated Campaign Name",
    "updated_at": "2024-01-21T09:15:00.000Z"
  }
}