GET /v1/projects/:projectId/engagement
Read the auto-pilot engagement config — first-comment template and reply-to-comments policy.
GET
/v1/projects/:projectId/engagementPhase 1stable
- Auth
- Bearer
- Scope
- engagement:read
Read the engagement config attached to a project's Social Engagement layer — the first-comment template that gets posted under every new post, and the reply-to-comments policy that governs auto-replies.
The enabled field is the master switch. If it's false, Layers still accepts reads and writes but nothing runs until you flip it on.
Only the v1 template shape is exposed today. The widened v2 fields (firstComment.strategy, replies.tone, replies.maxPerPostPerHour, replies.ignoreCommentsMatching, replies.escalateNegativeSentiment) are planned — passing them today returns 403 FORBIDDEN_FENCE.
Path
projectIdstringrequiredProject whose engagement layer you want.
Example request
curl https://api.layers.com/v1/projects/prj_01HX9Y7K8M2P4RSTUV56789AB/engagement \
-H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."const config = await layers.engagement.get({
projectId: "prj_01HX9Y7K8M2P4RSTUV56789AB",
});
if (!config.enabled) {
// engagement is off — either intentionally or never configured
}config = layers.engagement.get(project_id="prj_01HX9Y7K8M2P4RSTUV56789AB")Response
200Engagement config
{
"projectLayerId": "pl_01HXZT9P2K4N5M6Q7RSTUV8WXY",
"enabled": true,
"firstComment": {
"targets": ["tiktok", "instagram"],
"commentTemplate": "Brewing tip: use filtered water — makes a bigger difference than you'd expect."
},
"replyToComments": {
"targets": ["tiktok", "instagram"],
"autoReplyDelay": "PT3M"
}
}Field reference
| Field | Shape |
|---|---|
projectLayerId | The Social Engagement layer instance that holds this config. Round-trip this back in PATCH to disambiguate if a project has more than one engagement layer. |
enabled | Master switch. |
firstComment.targets | Platforms where a first comment is posted. |
firstComment.commentTemplate | Comment body. No templating language — literal text. |
replyToComments.targets | Platforms where auto-replies run. |
replyToComments.autoReplyDelay | ISO-8601 duration before replying. Bots at 0-second latency read as bots; tune per platform. |
Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing or invalid key. |
| 403 | FORBIDDEN_SCOPE | Key lacks engagement:write. |
| 404 | NOT_FOUND | Project not in your organization, or no Social Engagement layer attached. |
See also
PATCH /v1/projects/:id/engagement— update the config- Configure auto-pilot engagement — end-to-end walk-through