> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.alsona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.alsona.com/_mcp/server.

# Get template

GET https://alsona.com/rest/accounts/{account_id}/templates/{template_id}

Get template by ID (requires `group`).

Reference: https://api.alsona.com/api-reference/templates/get-template

## Authentication

- `X-API-KEY` header (required)

## Request

### Path parameters

- `account_id` (string, required)
- `template_id` (string, required)

### Query parameters

- `group` (string, optional)

## Response

### 200

- `success` (boolean, required)
- `template` (object, required)
  - `name` (string, required)
  - `group` (string, required)
  - `workflow` (object, required)
    - `edges` (list of object, required)
      - `id` (string, required)
      - `type` (string, required)
      - `style` (object, required)
        - `opacity` (integer, required)
      - `source` (string, required)
      - `target` (string, required)
      - `selectable` (boolean, required)
    - `nodes` (list of object, required)
      - `id` (string, required)
      - `data` (object, required)
        - `icon` (string, required)
        - `title` (string, required)
      - `type` (string, required)
      - `style` (object, required)
        - `opacity` (integer, required)
      - `measured` (object, required)
        - `width` (integer, required)
        - `height` (integer, required)
      - `position` (object, required)
        - `x` (integer, required)
        - `y` (integer, required)
      - `selected` (boolean, required)
  - `account_id` (string, required)
  - `created_at` (integer, required)
  - `updated_at` (integer, required)
  - `description` (string, required)
  - `template_id` (string, required)

## Examples

**Response**

```json
{
  "success": true,
  "template": {
    "name": "Business Coaches - US",
    "group": "account_workflows",
    "workflow": {
      "edges": [
        {
          "id": "start-node-undefined-node-fbf15000-c0fb8a547791-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "start-node",
          "target": "node-fbf15000-c0fb8a547791",
          "selectable": false
        },
        {
          "id": "node-fbf15000-c0fb8a547791-undefined-node-46c3eb1d-78531a1e1815-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-fbf15000-c0fb8a547791",
          "target": "node-46c3eb1d-78531a1e1815",
          "selectable": false
        },
        {
          "id": "node-46c3eb1d-78531a1e1815-undefined-node-9299d274-cc559b70a7b1-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-46c3eb1d-78531a1e1815",
          "target": "node-9299d274-cc559b70a7b1",
          "selectable": false
        },
        {
          "id": "node-9299d274-cc559b70a7b1-undefined-node-9ed200e3-54298e1b8a62-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-9299d274-cc559b70a7b1",
          "target": "node-9ed200e3-54298e1b8a62",
          "selectable": false
        },
        {
          "id": "node-9ed200e3-54298e1b8a62-true-node-cf9a98d0-af01a26074f6-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-9ed200e3-54298e1b8a62",
          "target": "node-cf9a98d0-af01a26074f6",
          "selectable": false,
          "sourceHandle": "true"
        },
        {
          "id": "node-cf9a98d0-af01a26074f6-undefined-node-77512e81-87459ecfa4d9-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-cf9a98d0-af01a26074f6",
          "target": "node-77512e81-87459ecfa4d9",
          "selectable": false
        },
        {
          "id": "node-77512e81-87459ecfa4d9-undefined-node-6aaee5fd-acf3f25e5904-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-77512e81-87459ecfa4d9",
          "target": "node-6aaee5fd-acf3f25e5904",
          "selectable": false
        },
        {
          "id": "node-6aaee5fd-acf3f25e5904-undefined-node-12b89370-72f9626573f3-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-6aaee5fd-acf3f25e5904",
          "target": "node-12b89370-72f9626573f3",
          "selectable": false
        },
        {
          "id": "node-9ed200e3-54298e1b8a62-false-node-60f748cc-bbd90c13d921-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-9ed200e3-54298e1b8a62",
          "target": "node-60f748cc-bbd90c13d921",
          "selectable": false,
          "sourceHandle": "false"
        },
        {
          "id": "node-60f748cc-bbd90c13d921-true-node-f51d96ff-9d93b919927e-undefined",
          "type": "workflow",
          "style": {
            "opacity": 1
          },
          "source": "node-60f748cc-bbd90c13d921",
          "target": "node-f51d96ff-9d93b919927e",
          "selectable": false,
          "sourceHandle": "true"
        }
      ],
      "nodes": [
        {
          "id": "start-node",
          "data": {
            "icon": "FaRegPaperPlane",
            "title": "Once it begins..."
          },
          "type": "start-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 200,
            "height": 45
          },
          "position": {
            "x": 247,
            "y": 12
          },
          "selected": false
        },
        {
          "id": "node-fbf15000-c0fb8a547791",
          "data": {
            "icon": "string",
            "title": "View profile",
            "stats": {
              "A_s": 3,
              "total_f": 0,
              "total_m": 0,
              "total_s": 3
            },
            "action": "ln_profile_view"
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 108
          },
          "position": {
            "x": 247,
            "y": 212
          },
          "selected": false
        },
        {
          "id": "node-46c3eb1d-78531a1e1815",
          "data": {
            "icon": "string",
            "title": "Follow profile",
            "delay": 0,
            "stats": {
              "A_f": 1,
              "A_s": 2,
              "total_f": 1,
              "total_m": 0,
              "total_s": 2
            },
            "action": "ln_profile_follow",
            "variants": [
              {
                "body": "",
                "name": "Variant A"
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 108
          },
          "position": {
            "x": 247,
            "y": 412
          },
          "selected": false
        },
        {
          "id": "node-9299d274-cc559b70a7b1",
          "data": {
            "icon": "string",
            "title": "Invite to connect",
            "delay": 3,
            "stats": {
              "A_s": 3,
              "total_f": 0,
              "total_m": 0,
              "total_s": 3
            },
            "action": "ln_profile_invite",
            "variants": [
              {
                "body": "",
                "name": "Variant A"
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 108
          },
          "position": {
            "x": 247,
            "y": 612
          },
          "selected": false
        },
        {
          "id": "node-9ed200e3-54298e1b8a62",
          "data": {
            "icon": "string",
            "title": "If profile connected",
            "wait": 120,
            "condition": "ln_profile_connected",
            "wait_if_condition": "false"
          },
          "type": "condition-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 247,
            "y": 812
          },
          "selected": false
        },
        {
          "id": "node-cf9a98d0-af01a26074f6",
          "data": {
            "icon": "string",
            "title": "Send Linkedin message",
            "delay": 24,
            "action": "ln_profile_message",
            "variants": [
              {
                "body": "Hey {{FIRST_NAME}}, quick question: is getting in front of new clients feeling harder than the actual coaching work?\n\nHublinks helps coaches automate 1:1-style outreach on Linkedin and email, so you can grow your audience and attract leads without being glued to social media.\n\nIf you’re looking to grow your audience (without living in DMs all day), I can share what other coaches are doing.\n",
                "name": "Variant A",
                "attachments": []
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 87,
            "y": 1022
          },
          "selected": false
        },
        {
          "id": "node-77512e81-87459ecfa4d9",
          "data": {
            "icon": "string",
            "title": "Send Linkedin message",
            "delay": 24,
            "action": "ln_profile_message",
            "variants": [
              {
                "body": "“Post more, engage more, DM more…” Easy advice, but not exactly scalable, right?\n\nIf you’d like, I can share how other business coaches are generating leads and building visibility without living on social media.\n",
                "name": "Variant A",
                "attachments": []
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 87,
            "y": 1222
          },
          "selected": false
        },
        {
          "id": "node-6aaee5fd-acf3f25e5904",
          "data": {
            "icon": "string",
            "title": "Send Linkedin message",
            "delay": 72,
            "action": "ln_profile_message",
            "variants": [
              {
                "body": "Hey {{FIRST_NAME}}, saw you’re building your coaching brand. Curious: do you have anything running that automatically starts conversations with the right people?\n\nIf not, I’ve got a shortcut you might like.\n",
                "name": "Variant Aء",
                "attachments": []
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 87,
            "y": 1422
          },
          "selected": false
        },
        {
          "id": "node-12b89370-72f9626573f3",
          "data": {
            "icon": "string",
            "title": "Send Linkedin message",
            "delay": 96,
            "action": "ln_profile_message",
            "variants": [
              {
                "body": "Most business coaches I speak with juggle content, calls, and clients but have no steady lead flow.\n\nThere’s an easier way to stay visible and build a pipeline in the background. Want more info?",
                "name": "Variant Aء",
                "attachments": []
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 87,
            "y": 1622
          },
          "selected": false
        },
        {
          "id": "node-60f748cc-bbd90c13d921",
          "data": {
            "icon": "string",
            "title": "If InMail is free",
            "wait": 24,
            "condition": "ln_profile_inmail_free",
            "wait_if_condition": "false"
          },
          "type": "condition-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 407,
            "y": 1022
          },
          "selected": false
        },
        {
          "id": "node-f51d96ff-9d93b919927e",
          "data": {
            "icon": "string",
            "title": "Send InMail message",
            "delay": 24,
            "action": "ln_profile_inmail",
            "variants": [
              {
                "body": "Hey {{FIRST_NAME}},\nI talk with a lot of coaches who do great work but spend too much time trying to get seen. \n\nCommon pattern:\nPost content, hope for leads\nManual outreach when business slows\nNo system to keep conversations warm\n\nI can share a lightweight setup that helps attract and follow up with the right people automatically. Interested?\n",
                "name": "Variant Aء",
                "subject": "More coaching clients without living on Linkedin?",
                "attachments": []
              }
            ]
          },
          "type": "action-node",
          "style": {
            "opacity": 1
          },
          "measured": {
            "width": 280,
            "height": 74
          },
          "position": {
            "x": 407,
            "y": 1222
          },
          "selected": true
        }
      ]
    },
    "account_id": "ACCO136ce10b5f8a7682efb3",
    "created_at": 1753382019986,
    "updated_at": 1753382019986,
    "description": "Business Coaches - US",
    "template_id": "template_3cd3786f8006f39d4a73"
  }
}
```

**SDK Code**

```python Response
import requests

url = "https://alsona.com/rest/accounts/account_id/templates/template_id"

querystring = {"group":"account_abc_workflows"}

headers = {"X-API-KEY": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Response
const url = 'https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows';
const options = {method: 'GET', headers: {'X-API-KEY': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Response
require 'uri'
require 'net/http'

url = URI("https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows")
  .header("X-API-KEY", "<apiKey>")
  .asString();
```

```php Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows', [
  'headers' => [
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Response
using RestSharp;

var client = new RestClient("https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Response
import Foundation

let headers = ["X-API-KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_id/templates/template_id?group=account_abc_workflows")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```