Create a reusable message template. Templates are referenced from flow nodes by their uuid (the template_uuid field on linkedin_send_message, email_send_message, etc.).
is_public is required — sending the request without it currently returns a 500 instead of a validation error, so always include it (1 = shared with the team, 0 = private). name and type are also required; everything else is optional and defaults to empty.
Security
bearerAuth
Template type.
Enum:"message""connection_note""email""post_comment"
Example:"message"
1 = visible to the whole team, 0 = private. Required (see note above).
Enum:01
Example:1
POST
curl -i -X POST \
https://leadgen.grinfi.io/flows/api/ai-templates \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Cold outreach — CTO",
"type": "message",
"is_public": 1,
"body": "Hi {{first_name}}, saw you lead engineering at {{company}} — worth a chat?"
}'Template created.
Response
{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "team_id": 0, "template_category_uuid": "8615c630-89da-4f0b-abff-7eec9679fbe3", "name": "string", "subject": "string", "body": "string", "attachments": [ {} ], "type": "message", "llm_uuid": "b7cc7bc5-91a7-491e-a0a2-aef6fcdc275b", "llm_config": {}, "prompt": "string", "enable_validation": true, "validation_llm_uuid": "d44ed88c-5ace-4a4f-91d3-5b30b7b6d898", "validation_llm_config": {}, "validation_prompt": "string", "enable_fallback": true, "settings": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }