> 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.

# List templates

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

List templates for a group. Optional: account_id/agency_id filters.

Reference: https://api.alsona.com/api-reference/templates/list-templates

## Authentication

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

## Request

### Path parameters

- `account_id` (string, required)

### Query parameters

- `group` (string, optional)

## Response

### 200

- `success` (boolean, required)
- `templates` (list of object, required)
  - `name` (string, required)
  - `group` (string, required)
  - `account_id` (string, required)
  - `created_at` (integer, required)
  - `updated_at` (integer, required)
  - `description` (string, required)
  - `template_id` (string, required)
- `last_key` (any, optional)

## Examples

**Response**

```json
{
  "success": true,
  "templates": [
    {
      "name": "Business Coaches - US",
      "group": "account_workflows",
      "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"

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?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?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?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?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?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?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?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()
```