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

# Get template by slug

GET https://api.talkif.ai/api/v1/flow-templates/{slug}

GET /api/v1/flow-templates/:slug

Note: This is a public endpoint that doesn't require auth, but if the user is logged in,
they can also see their account-specific templates

Reference: https://docs.talkif.ai/api-reference/flow-templates/get-flow-template

## Request

### Path parameters

- `slug` (string, required) — Template slug

## Response

### 200

Template details

- `category` (string, required) — Template category for filtering
- `createdAt` (datetime, required) — When the template was created
- `displayOrder` (integer, required) — Sort order for template listing (lower = first)
- `edges` (FlowTemplateEdges, required) — Flow edge connections between nodes
- `id` (string, required) — Unique template identifier
- `initialNode` (string, required) — ID of the first node to execute
- `isActive` (boolean, required) — Whether this template is available for use
- `name` (string, required) — Template display name
- `nodes` (FlowTemplateNodes, required) — Flow node definitions
- `slug` (string, required) — URL-safe slug for the template
- `updatedAt` (datetime, required) — When the template was last modified
- `accountId` (string, optional, nullable) — Account that owns this template (null for system templates)
- `createdBy` (string, optional, nullable) — User who created this template
- `definition` (FlowTemplateDefinition, optional, nullable) — Runtime FlowDefinition (initialNode + services + nodes). This is what instantiation copies into the new flow's definition. Null on legacy templates that only carry builder nodes/edges.
- `description` (string, optional, nullable) — Brief description of what the template does
- `icon` (string, optional, nullable) — Icon identifier or emoji for display
- `previewImageUrl` (string, optional, nullable) — URL to a preview image for the template
- `tags` (list of string, optional) — Searchable tags

## Errors

### 404 Not Found Error

`resource_not_found`

- `code` (enum, required) — Machine-readable error code for programmatic handling
  - Allowed values: `invalid_credentials`, `email_already_exists`, `phone_already_exists`, `contact_phone_already_exists`, `account_suspended`, `account_access_denied`, `token_expired`, `token_invalid`, `token_missing`, `account_header_missing`, `refresh_token_invalid`, `email_already_verified`, `email_verification_code_invalid`, `email_verification_code_expired`, `email_verification_code_used`, `email_service_unavailable`, `phone_already_verified`, `phone_verification_code_invalid`, `phone_verification_code_expired`, `phone_verification_code_used`, `phone_number_missing`, `sms_service_unavailable`, `mfa_already_enabled`, `mfa_not_enabled`, `mfa_not_setup`, `mfa_code_invalid`, `password_reset_token_invalid`, `password_reset_token_expired`, `password_reset_token_used`, `password_current_incorrect`, `password_same_as_current`, `invalid_o_auth_state`, `o_auth_provider_error`, `o_auth_already_linked`, `provider_already_connected`, `o_auth_not_linked`, `cannot_unlink_only_auth`, `validation_failed`, `bad_request`, `invalid_json`, `resource_not_found`, `not_found`, `forbidden`, `insufficient_permissions`, `conflict`, `resource_already_exists`, `insufficient_balance`, `payment_required`, `subscription_required`, `feature_not_available`, `payment_failed`, `business_rule_violation`, `invalid_state_transition`, `unprocessable_entity`, `rate_limit_exceeded`, `queue_full`, `assistant_quota_exceeded`, `user_phone_not_verified`, `account_not_verified`, `payment_method_required`, `trial_already_claimed`, `promotion_not_eligible`, `coupon_not_found`, `coupon_not_redeemable`, `coupon_already_redeemed`, `phone_number_not_active`, `phone_number_not_verified`, `phone_number_cannot_initiate_calls`, `flow_not_published`, `provider_call_rejected`, `concurrent_call_limit_exceeded`, `daily_call_limit_exceeded`, `contact_on_dnc_list`, `outside_callable_hours`, `call_already_completed`, `phone_provider_not_active`, `phone_number_already_connected`, `phone_number_not_connected`, `provider_must_be_sip`, `verification_only_for_sip`, `phone_verification_not_started`, `twilio_credentials_required`, `byoc_only`, `phone_already_registered`, `cannot_delete_system_provider`, `flow_name_already_exists`, `flow_structure_invalid`, `flow_has_connected_phones`, `flow_version_invalid`, `flow_version_conflict`, `flow_function_name_exists`, `flow_function_not_found`, `flow_generation_failed`, `payment_method_card_only`, `template_variable_resolution_failed`, `phone_number_in_use`, `mfa_token_invalid`, `invalid_id_format`, `verification_code_invalid`, `cannot_delete_has_dependencies`, `in_use`, `unsupported_kind`, `offer_taken`, `offer_taken_self`, `offer_expired`, `already_taken`, `takeover_unsupported`, `schedule_not_found`, `schedule_already_paused`, `schedule_not_paused`, `invalid_cron_expression`, `invalid_timezone`, `campaign_not_found`, `campaign_not_draft`, `campaign_no_contacts`, `legal_acceptance_required`, `invitation_not_found`, `invitation_not_pending`, `invitation_expired`, `not_invitation_recipient`, `organization_suspended`, `already_organization_member`, `api_key_invalid`, `api_key_expired`, `api_key_revoked`, `api_key_not_allowed`, `api_key_insufficient_scope`, `api_key_ip_restricted`, `api_key_limit_reached`, `internal_error`, `service_error`, `service_unavailable`, `no_bots_available`, `region_saturated`, `recording_not_available`, `recording_service_not_configured`, `meta_not_configured`, `meta_page_already_connected`, `meta_form_already_mapped`, `meta_api_error`, `meta_lead_unrecoverable`, `unauthorized`
- `detail` (string, required) — Human-readable detail message for this specific error instance
- `status` (integer, required) — HTTP status code (mirrors the response status line)
- `title` (string, required) — Human-readable title for the error category
- `errors` (list of FieldError, optional, nullable) — Field-level validation errors, present when code is `validation_failed`
- `meta` (ErrorResponseMeta, optional, nullable) — Additional context metadata (e.g., retryAfterSecs for rate limits)
- `requestId` (string, optional, nullable) — Unique request identifier for debugging (also in X-Request-Id response header)

## Types

### FlowTemplateEdges

Flow edge connections between nodes

### FlowTemplateNodes

Flow node definitions

### FlowTemplateDefinition

Runtime FlowDefinition (initialNode + services + nodes). This is what instantiation copies into the new flow's definition. Null on legacy templates that only carry builder nodes/edges.

### FieldError

Individual field error for validation responses Appears in the `errors[]` array when `code` is `validation_failed` # Example ```json { "field": "email", "code": "invalid_format", "message": "Email format is invalid" } ```

- `code` (string, required) — Specific error code for this field
- `field` (string, required) — The field name that failed validation
- `message` (string, required) — Human-readable error message

### ErrorResponseMeta

Additional context metadata (e.g., retryAfterSecs for rate limits)

## Examples

**Response**

```json
{
  "category": "appointment",
  "createdAt": "2026-01-15T10:30:00Z",
  "displayOrder": 1,
  "edges": {},
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "initialNode": "main_agent_1",
  "isActive": true,
  "name": "Appointment Reminder",
  "nodes": {},
  "slug": "appointment-reminder",
  "updatedAt": "2026-02-20T14:45:00Z",
  "accountId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "createdBy": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "definition": {},
  "description": "Automated appointment confirmation and rescheduling flow",
  "icon": "calendar",
  "previewImageUrl": "https://cdn.talkif.com/templates/appointment-reminder.png",
  "tags": [
    "healthcare",
    "scheduling"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.talkif.ai/api/v1/flow-templates/slug"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.talkif.ai/api/v1/flow-templates/slug';
const options = {method: 'GET'};

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

```go
package main

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

func main() {

	url := "https://api.talkif.ai/api/v1/flow-templates/slug"

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

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

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

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

}
```

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

url = URI("https://api.talkif.ai/api/v1/flow-templates/slug")

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

request = Net::HTTP::Get.new(url)

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

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

HttpResponse<String> response = Unirest.get("https://api.talkif.ai/api/v1/flow-templates/slug")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.talkif.ai/api/v1/flow-templates/slug');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.talkif.ai/api/v1/flow-templates/slug");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.talkif.ai/api/v1/flow-templates/slug")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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