Update Activity Generation Config
Update activity generation config metadata only.
PATCH /api/activity-generation-configs/:id
Update an AGC's metadata only. This endpoint never touches the lifecycle pillars — to change activation, engagement, or resurrection, use PUT /:id/lifecycle.
Auth: Required — activity-generation-config:update permission
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Activity generation config id |
Request Body
All fields are optional; only the fields you send are updated. Request bodies are snake_case.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Config name; cannot be empty |
description | string | No | Free-text description |
audience_id | UUID | null | No | Own audience of the AGC; null removes it (see below) |
audience_id works as follows:
- omitted — the AGC keeps its current audience;
- an audience id — it must be an audience of the active project; otherwise the API responds
400; null— removes the AGC's own audience:audienceIdbecomesnull, and reads (GET /:idand the list) return the project's root audience aseffectiveAudienceId, so the AGC runs over the root audience again (see Effective audience).
Lifecycle pillar data cannot be changed here. This endpoint only edits the AGC's own metadata fields.
Example
curl -X PATCH https://api.reten.ai/api/activity-generation-configs/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "x-project-id: <project-id>" \
-H "Content-Type: application/json" \
-d '{ "name": "Main funnel lifecycle", "description": "Renamed for clarity" }'import axios from 'axios';
const id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479';
const response = await axios.patch(
`https://api.reten.ai/api/activity-generation-configs/${id}`,
{ name: 'Main funnel lifecycle', description: 'Renamed for clarity' },
{ headers: { Authorization: 'Bearer <token>', 'x-tenant-id': '<tenant-id>', 'x-project-id': '<project-id>' } },
);
const updated = response.data;Response 200 OK
Returns the updated AGC with its full nested configuration — the three pillars and their children — in the same camelCase shape as GET /:id, but without effectiveAudienceId and configHashes: read the AGC with GET /:id to get them.
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"name": "Main funnel lifecycle",
"description": "Renamed for clarity",
"audienceId": "1f0d2c3b-4a59-4687-9c12-abcdef012345",
"status": "active",
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-17T11:05:00.000Z",
"activationConfig": {
"id": "2a8f0c11-6b22-4d33-8e44-aa55bb66cc77",
"name": "Activation",
"description": "First-week activation moments",
"sourceTable": "events",
"sourceColumns": ["user_id", "event_id"],
"dateColumn": "occurred_at",
"activityGenerationConfigId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"aggregationMethod": "nunique",
"isActive": true,
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z",
"activationMoments": [
{
"id": "3b9a1d22-7c33-4e44-9f55-bb66cc77dd88",
"activationConfigId": "2a8f0c11-6b22-4d33-8e44-aa55bb66cc77",
"statusCode": "aha",
"userRetentionStatusConfigId": "aa11bb22-cc33-4d44-9e55-ff66aa77bb88",
"minActions": 3,
"windowDays": 7,
"timeWindow": 30,
"priority": 1,
"isActive": true,
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z"
}
]
},
"engagementConfig": {
"id": "5d1c3f44-9e55-4066-b177-dd88ee99ffaa",
"name": "Engagement",
"description": "Active-user engagement levels",
"sourceTable": "events",
"sourceColumns": ["user_id", "event_id"],
"dateColumn": "occurred_at",
"activityGenerationConfigId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"engagementWindowDays": 28,
"minLifetimeActionsForEngaged": 1,
"countingMethod": "active_days",
"isActive": true,
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z",
"engagementLevels": [
{
"id": "6e2d4055-af66-4177-c288-ee99ffaa00bb",
"engagementConfigId": "5d1c3f44-9e55-4066-b177-dd88ee99ffaa",
"statusCode": "casual",
"userRetentionStatusConfigId": "cc33dd44-ee55-4f66-a077-bb99ccaaddbb",
"label": "Casual",
"minThreshold": 1,
"maxThreshold": null,
"order": 1,
"isActive": true,
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z"
}
]
},
"resurrectionConfig": {
"id": "8a4f6277-c188-4399-e400-aa00bb11ccdd",
"name": "Resurrection",
"description": "Recovery vs. churn classification",
"sourceTable": "events",
"sourceColumns": ["user_id"],
"dateColumn": "occurred_at",
"activityGenerationConfigId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"isActive": true,
"updatedBy": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z",
"resurrectionThresholds": [
{
"id": "9b5a7388-d299-44aa-f511-bb11ccdd22ee",
"resurrectionConfigId": "8a4f6277-c188-4399-e400-aa00bb11ccdd",
"statusCode": "dormant",
"userRetentionStatusConfigId": "ee55ff66-aa77-4188-c299-ddbbeeccffdd",
"label": "Dormant",
"thresholdDays": 30,
"order": 1,
"isActive": true,
"createdAt": "2026-06-10T14:00:00.000Z",
"updatedAt": "2026-06-10T14:00:00.000Z"
}
]
}
}Error Responses
| Status | Description |
|---|---|
400 | Validation failed: a field with an invalid value, or a field the endpoint does not accept — such as projectId, status or a pillar (activation, engagement, resurrection) |
400 | id is not a UUID |
400 | audience_id is not an audience of the active project — La audiencia no existe en este proyecto. |
404 | No activity generation config with that id exists in the active project (an AGC of another project included) — Activity generation config <id> not found |
409 | Another AGC of the active project already has that name — An activity generation config with name "<name>" already exists |