> ## Documentation Index
> Fetch the complete documentation index at: https://docs.catchthegoodones.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create DM Template

> Create a new DM template

Creates a new DM template. Template names must be unique per user.

### Headers

| Header          | Required | Description                     |
| --------------- | -------- | ------------------------------- |
| `Authorization` | Yes      | `Bearer ctgo_your_api_key_here` |
| `Content-Type`  | Yes      | `application/json`              |

### Body

| Field         | Type   | Required | Description                                       |
| ------------- | ------ | -------- | ------------------------------------------------- |
| `name`        | string | Yes      | Template name (1-100 characters). Must be unique. |
| `messageBody` | string | Yes      | Message content (1-2000 characters)               |

### Example

```bash theme={null}
curl -X POST https://www.catchthegoodones.com/api/v2/dm-templates \
  -H "Authorization: Bearer ctgo_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "Intro message", "messageBody": "Hi! I noticed you recently followed me. I'\''d love to connect."}'
```

### Response

<ResponseExample>
  ```json 201 theme={null}
  {
    "template": {
      "id": 1,
      "name": "Intro message",
      "messageBody": "Hi! I noticed you recently followed me. I'd love to connect.",
      "createdAt": "2026-04-17T12:00:00.000Z",
      "updatedAt": "2026-04-17T12:00:00.000Z"
    }
  }
  ```

  ```json 409 theme={null}
  {
    "error": "You already have a template called 'Intro message'"
  }
  ```
</ResponseExample>
