> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Update a segment plan
> Overwrites an existing segment plan. The query parameter id identifies the plan; the request body is a wrapper whose json field carries the full plan JSON document as a string (escaped). Update replaces the whole plan, so fetch the current plan with get first, modify it, then send it back here. If the plan JSON also contains an id it must match the query id. Returns the updated plan.
Example body
{
"json": "{\"id\":\"FF784C2A-...\",\"name\":\"My plan\",\"nodes\":[ ... ]}"
}
## OpenAPI
````json PUT /segmentation/update
{
"openapi": "3.0.4",
"info": {
"title": "Engage public API",
"version": "1"
},
"servers": [
{
"url": "https://your-engage-domain.com/api/rest"
}
],
"tags": [
{
"name": "Address Attributes"
},
{
"name": "Async"
},
{
"name": "Audit Log"
},
{
"name": "Automation"
},
{
"name": "Blacklist"
},
{
"name": "CMS"
},
{
"name": "Contact"
},
{
"name": "Content"
},
{
"name": "Coupon"
},
{
"name": "Draft Message"
},
{
"name": "Ecommerce"
},
{
"name": "Group"
},
{
"name": "Group Attributes"
},
{
"name": "Landing Page"
},
{
"name": "Member Attributes"
},
{
"name": "Membership"
},
{
"name": "Message"
},
{
"name": "Meta"
},
{
"name": "Mobile Push"
},
{
"name": "Prepared Message"
},
{
"name": "Process"
},
{
"name": "Profile Attributes"
},
{
"name": "Related Data"
},
{
"name": "Segmentation"
},
{
"name": "System"
},
{
"name": "System User"
},
{
"name": "Usage Statistics"
},
{
"name": "User"
},
{
"name": "Whiteboard"
}
],
"paths": {
"/segmentation/update": {
"put": {
"tags": [
"Segmentation"
],
"summary": "Update a segment plan",
"description": "Overwrites an existing segment plan. The query parameter id identifies the plan; the request body is a wrapper whose json field carries the full plan JSON document as a string (escaped). Update replaces the whole plan, so fetch the current plan with get first, modify it, then send it back here. If the plan JSON also contains an id it must match the query id. Returns the updated plan.{\n \"json\": \"{\\\"id\\\":\\\"FF784C2A-...\\\",\\\"name\\\":\\\"My plan\\\",\\\"nodes\\\":[ ... ]}\"\n}",
"operationId": "update",
"parameters": [
{
"name": "id",
"in": "query",
"description": "ID of the plan to update (GUID).",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "Wrapper carrying the full plan JSON document as a string in its 'json' field.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentationPayload"
}
}
},
"x-bodyName": "body"
},
"responses": {
"200": {
"description": "The updated plan as a JSON document.",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
},
"400": {
"description": "bad request",
"content": {
"application/json": {}
}
}
}
}
}
},
"components": {
"schemas": {
"SegmentationPayload": {
"type": "object",
"properties": {
"json": {
"type": "string"
}
}
}
}
}
}
````