Prompts

Reassign contacts and conversations from one prompt to another

POST
/api/prompts/reassign

Moves every Contact and Conversation pointing at promptId over to targetPromptId, then deletes the source prompt. Both prompts must be owned by the caller. Used when consolidating or retiring prompts without orphaning conversations.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/prompts/reassign" \  -H "Content-Type: application/json" \  -d '{    "promptId": "5f7b1c2e8a1d4e0012c3b4a5",    "targetPromptId": "5f7b1c2e8a1d4e0012c3b4a6"  }'
{  "success": true,  "message": "Successfully reassigned 14 items and deleted prompt",  "contactsUpdated": 9,  "conversationsUpdated": 5,  "totalUpdated": 14}