Create a dynamic activity plan
POST/admin/activity_plans
[Requires Coach or Connector Access]
Create a dynamic one-off activity plan for a participant.
This endpoint creates a dynamic activity plan based on the given data. It will create an activity type with measure types based on the card items and responses, then create an activity plan for the participant.
Each card item can contain a question, a content or both(a mixture of both content and question).
Content Card:
{
"participantId": "47",
"fromDate": "2025-11-01",
"toDate": "2025-12-31",
"card": {
"title": "Card Title ",
"description": "Dynamic Card Test",
"imageUrl": "https://firebasestorage.googleapis.com/v0/b/intervengine-development.appspot.com/o/assets%2F9a48a0cb-2663-4871-95b8-c48f33c1ff6f..png?alt=media&token=06d34e59-55d1-4ab2-8b21-5e6465b9d2d0",
"items": [
{
"title": "Item title or Question",
"description": "Item or Question Description",
"content": {
"contentElements": [
{
"asset": {
"type": "image",
"url": "https://firebasestorage.googleapis.com/v0/b/intervengine-development.appspot.com/o/assets%2Fdb5af013-bc1b-4aa7-a0b8-ea35593cc49e..png?alt=media&token=78c68ad6-402b-4c5d-aa52-db3b38a90bbe"
},
"text": null
},
{
"asset": null,
"text": "This is a sample content text element."
}
]
}
}
],
"uiConfigs": {
"cardLayout": "STANDARD",
"endButtonLabel": "Done",
"imageAspectRatio": "STANDARD",
"isSinglePage": false,
"nextButtonLabel": "Next",
"startButtonLabel": "Begin"
}
}
}
Question Card:
{
"participantId": "47",
"fromDate": "2025-11-01",
"toDate": "2025-12-31",
"card": {
"title": "Your Favourite Cuisine",
"description": "This card will ask about your favourite cousin. The modal window will pop up when the card is opened.",
"imageUrl": "https://firebasestorage.googleapis.com/v0/b/intervengine-development.appspot.com/o/assets%2F9a48a0cb-2663-4871-95b8-c48f33c1ff6f..png?alt=media&token=06d34e59-55d1-4ab2-8b21-5e6465b9d2d0",
"items": [
{
"title": "What is your favourite cuisine style — Japanese, Italian, or Chinese?",
"description": "Item or Question Description",
"responses": [
"Japanese",
"Italian",
"Chinese"
]
}
],
"uiConfigs": {
"startButtonLabel": "Start Now",
"endButtonLabel": "Submit"
}
}
}
Request
Responses
- 201
- 400
- 401
- 409
- 422
- 500
Created
Response Headers
Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Cache-Control
Content-Type
Bad Request
Unauthorized
Conflict
Unprocessable Entity
Internal Server Error