Chanl

Apply to Agent

Link a prompt to an agent by setting the agent's promptId.

Request
curl -X POST "https://platform.chanl.ai/api/v1/prompts/{promptId}/apply" \
  -H "X-API-Key: chanl_key_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "507f1f77bcf86cd799439011",
    "syncToPlatform": true
  }'
await chanl.prompts.apply(promptId, {
  agentId: agentId,
  syncToPlatform: true,
});