---
updatedAt: 2026-04-23T05:40:30.000Z
---

# Creates an text template

Creates an text template with the specified details.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API V1",
    "version": "v1"
  },
  "paths": {
    "/text_templates": {
      "post": {
        "summary": "Creates an text template",
        "tags": [
          "Text Templates"
        ],
        "description": "Creates an text template with the specified details.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "text template created"
          },
          "404": {
            "description": "event not found"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of the entity",
                    "nullable": false
                  },
                  "scope_id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Identifier for the scope",
                    "nullable": false
                  },
                  "scope_type": {
                    "type": "string",
                    "description": "Type of the scope",
                    "nullable": false,
                    "enum": [
                      "Organization",
                      "Chapter"
                    ]
                  },
                  "template": {
                    "type": "object",
                    "description": "Template content in various languages, where keys are 2-character language codes (e.g., \"en\" for English, \"fr\" for French).",
                    "additionalProperties": {
                      "type": "string",
                      "description": "The message in the specified language."
                    },
                    "example": {
                      "en": "Hi, {{ user.first-name }}, this is an event text template"
                    }
                  },
                  "event_id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "Identifier for the associated event, if applicable",
                    "nullable": true
                  }
                },
                "required": [
                  "iname",
                  "scope_id",
                  "scope_type"
                ]
              }
            }
          },
          "required": true,
          "description": "Data containing text template information"
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.solidarity.tech/v1",
      "variables": {
        "defaultHost": {
          "default": "api.solidarity.tech/v1"
        }
      }
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```