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

# Get Workflow Template by UUID

> Retrieve detailed information about a specific workflow template by its UUID, including all workflow steps

Retrieve detailed information about a specific workflow template by its UUID, including all configured workflow steps, execution conditions, and webhook configurations.

## Base URL

All API requests should be made to:

```
https://api.hookpulse.io
```

## Example request

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.hookpulse.io/v1/api/single_workflow_template_detail/ \
    -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
    -H "x-brand-uuid: {{x-brand-uuid}}" \
    -H "Content-Type: application/json" \
    -d '{
      "workflow_uuid": "{{workflow_uuid}}"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.hookpulse.io/v1/api/single_workflow_template_detail/', {
    method: 'POST',
    headers: {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      workflow_uuid: '{{workflow_uuid}}'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  url = 'https://api.hookpulse.io/v1/api/single_workflow_template_detail/'
  headers = {
      'x-hookpulse-api-key': '{{x-hookpulse-api-key}}',
      'x-brand-uuid': '{{x-brand-uuid}}',
      'Content-Type': 'application/json'
  }
  payload = {
      'workflow_uuid': '{{workflow_uuid}}'
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'
  require 'uri'

  uri = URI('https://api.hookpulse.io/v1/api/single_workflow_template_detail/')
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true

  request = Net::HTTP::Post.new(uri.path)
  request['x-hookpulse-api-key'] = '{{x-hookpulse-api-key}}'
  request['x-brand-uuid'] = '{{x-brand-uuid}}'
  request['Content-Type'] = 'application/json'
  request.body = {
    workflow_uuid: '{{workflow_uuid}}'
  }.to_json

  response = http.request(request)
  puts JSON.parse(response.body)
  ```

  ```php PHP theme={null}
  <?php

  $url = 'https://api.hookpulse.io/v1/api/single_workflow_template_detail/';
  $data = [
      'workflow_uuid' => '{{workflow_uuid}}'
  ];

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'x-hookpulse-api-key: {{x-hookpulse-api-key}}',
      'x-brand-uuid: {{x-brand-uuid}}',
      'Content-Type: application/json'
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  echo $response;
  ?>
  ```
</RequestExample>

## Request body

| Field           | Type   | Required | Description                               |
| --------------- | ------ | -------- | ----------------------------------------- |
| `workflow_uuid` | string | Yes      | UUID of the workflow template to retrieve |

## Example response

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "timezone": "{{timezone}}",
      "inserted_at": "{{inserted_at}}",
      "workflow_name": "{{workflow_name}}",
      "workflow_uuid": "{{workflow_uuid}}",
      "workflow_description": "{{workflow_description}}",
      "runtype": "{{runtype}}",
      "workflow_steps": [
        {
          "index": 0,
          "timezone": "{{timezone}}",
          "inserted_at": "{{inserted_at}}",
          "step_identifier": "{{step_identifier}}",
          "human_approval_required": false,
          "delay_to_next_step": {{delay_to_next_step}},
          "webhook": {
            "path": "{{path}}",
            "domain": {
              "protocol": "{{protocol}}",
              "domain": "{{domain}}"
            },
            "method": "{{method}}",
            "webhook_uuid": "{{webhook_uuid}}",
            "webhook_name": "{{webhook_name}}",
            "headers_json": {},
            "query_params_json": {},
            "request_body_json": {},
            "expected_system_variables": []
          },
          "step_uuid": "{{step_uuid}}",
          "execution_conditions": [
            {
              "value": "{{value}}",
              "operator": "{{operator}}",
              "field": "{{field}}"
            }
          ]
        }
      ]
    },
    "success": true
  }
  ```
</ResponseExample>

## Response fields

### Root fields

| Field     | Type    | Description                             |
| --------- | ------- | --------------------------------------- |
| `success` | boolean | Indicates if the request was successful |
| `data`    | object  | Workflow template details               |

### Data object

| Field                  | Type   | Description                                                                                                   |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| `timezone`             | string | IANA timezone identifier indicating the timezone used for timestamps (matches your brand's selected timezone) |
| `inserted_at`          | string | ISO 8601 timestamp when the workflow template was created (in your brand's selected timezone with offset)     |
| `workflow_name`        | string | Name of the workflow template                                                                                 |
| `workflow_uuid`        | string | Unique identifier for the workflow template                                                                   |
| `workflow_description` | string | Description of the workflow template                                                                          |
| `runtype`              | string | Execution mode: `"fifo_sequential"` or `"concurrently"`                                                       |
| `workflow_steps`       | array  | Array of workflow steps, ordered by index                                                                     |

### Workflow step object

| Field                     | Type    | Description                                                                                                   |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| `index`                   | integer | Priority index for FIFO execution order (0 is first)                                                          |
| `timezone`                | string  | IANA timezone identifier indicating the timezone used for timestamps (matches your brand's selected timezone) |
| `inserted_at`             | string  | ISO 8601 timestamp when the workflow step was created (in your brand's selected timezone with offset)         |
| `step_identifier`         | string  | Unique identifier (slug) for this step                                                                        |
| `human_approval_required` | boolean | Whether this step requires human approval                                                                     |
| `delay_to_next_step`      | integer | Delay in seconds before executing the next step                                                               |
| `webhook`                 | object  | Webhook configuration for this step                                                                           |
| `step_uuid`               | string  | Unique identifier for the workflow step                                                                       |
| `execution_conditions`    | array   | Array of conditions that must be met for this step to execute                                                 |

### Execution condition object

| Field      | Type   | Description                                                                                      |
| ---------- | ------ | ------------------------------------------------------------------------------------------------ |
| `value`    | string | Value to compare against                                                                         |
| `operator` | string | Comparison operator: `"eq"`, `"ne"`, `"lt"`, `"gt"`, `"lte"`, `"gte"`, `"in"`, `"contains"`      |
| `field`    | string | Field path to evaluate (e.g., `"amount"`, `"step.response.payment_status"`, `"initial.user_id"`) |

### Webhook object

| Field                       | Type   | Description                                                       |
| --------------------------- | ------ | ----------------------------------------------------------------- |
| `path`                      | string | URL path for the webhook (may contain template variables)         |
| `domain`                    | object | Domain configuration                                              |
| `domain.protocol`           | string | Protocol type: `"http"` or `"https"`                              |
| `domain.domain`             | string | Domain name                                                       |
| `method`                    | string | HTTP method: `"GET"`, `"POST"`, `"PUT"`, `"DELETE"`, or `"PATCH"` |
| `webhook_name`              | string | Name of the webhook                                               |
| `expected_system_variables` | array  | List of system variables expected in this webhook                 |
| `headers_json`              | object | HTTP headers as JSON object (may contain template variables)      |
| `query_params_json`         | object | Query parameters as JSON object (may contain template variables)  |
| `request_body_json`         | object | Request body as JSON object (may contain template variables)      |
| `webhook_uuid`              | string | Unique identifier for the webhook                                 |

## Understanding the Response

### Workflow Steps Order

Steps are returned in the order defined by their `index` field:

* **Index 0**: First step to execute
* **Index 1**: Second step to execute
* And so on...

In FIFO mode, steps execute sequentially based on their index. In concurrent mode, steps may execute in parallel.

### Execution Conditions

Each step can have multiple execution conditions. All conditions must evaluate to `true` for the step to execute:

* **Empty array**: Step always executes (no conditions)
* **Multiple conditions**: All must be met (AND logic)

### Template Variables

The response shows template variables used in webhook configurations:

* `{{ #key }}`: System secret from vault
* `{{ step.response.key }}`: Variable from previous step response
* `{{ initial.key }}`: Variable from initial workflow input

### Human Approval

When `human_approval_required` is `true`, the workflow pauses at that step and waits for manual approval before continuing.

## Related Documentation

* [Workflow Template Overview](/docs/api-reference/workflow-template/overview) - Learn about workflow templates, execution modes, and features
* [Add Workflow Step](/docs/api-reference/workflow-template/add-workflow-step) - Add a new step to a workflow
* [Add Workflow Template](/docs/api-reference/workflow-template/add-workflow-template) - Create a new workflow template


## OpenAPI

````yaml POST /v1/api/single_workflow_template_detail/
openapi: 3.0.3
info:
  title: Hookpulse API
  description: >-
    Complete API documentation for Hookpulse. Build powerful integrations with
    our RESTful API.
  version: 1.0.0
  contact:
    name: Hookpulse Support
    email: care@hookpulse.io
    url: https://hookpulse.io
servers:
  - url: https://api.hookpulse.io
    description: Production server
security:
  - apiKeyAuth: []
    brandUuidAuth: []
paths:
  /v1/api/single_workflow_template_detail/:
    post:
      description: >-
        Retrieve detailed information about a specific workflow template by its
        UUID, including all workflow steps
      requestBody:
        description: Workflow template UUID
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetWorkflowTemplateDetailRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkflowTemplateDetailResponse'
        '400':
          description: Bad request or workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GetWorkflowTemplateDetailRequest:
      required:
        - workflow_uuid
      type: object
      properties:
        workflow_uuid:
          type: string
          description: UUID of the workflow template
    GetWorkflowTemplateDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WorkflowTemplateDetail'
        success:
          type: boolean
          description: Indicates if the request was successful
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    WorkflowTemplateDetail:
      type: object
      properties:
        timezone:
          type: string
          description: >-
            IANA timezone identifier indicating the timezone used for timestamps
            (matches your brand's selected timezone)
        inserted_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp when the workflow template was created (in your
            brand's selected timezone with offset)
        workflow_name:
          type: string
          description: Name of the workflow template
        workflow_uuid:
          type: string
          description: Unique identifier for the workflow template
        workflow_description:
          type: string
          description: Description of the workflow template
        runtype:
          type: string
          enum:
            - fifo_sequential
            - concurrently
          description: >-
            Execution mode: 'fifo_sequential' for strict sequential order,
            'concurrently' for parallel execution
        workflow_steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStepDetail'
          description: Array of workflow steps
    WorkflowStepDetail:
      type: object
      properties:
        index:
          type: integer
          description: Priority index for FIFO execution order
        timezone:
          type: string
          description: >-
            IANA timezone identifier indicating the timezone used for timestamps
            (matches your brand's selected timezone)
        inserted_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 timestamp when the workflow step was created (in your
            brand's selected timezone with offset)
        step_identifier:
          type: string
          description: Unique identifier (slug) for this step
        human_approval_required:
          type: boolean
          description: Whether this step requires human approval
        delay_to_next_step:
          type: integer
          description: Delay in seconds before executing the next step
        webhook:
          $ref: '#/components/schemas/WorkflowStepWebhook'
        step_uuid:
          type: string
          description: Unique identifier for the workflow step
        execution_conditions:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionCondition'
          description: Array of execution conditions for this step
    WorkflowStepWebhook:
      type: object
      properties:
        path:
          type: string
          description: URL path for the webhook
        domain:
          $ref: '#/components/schemas/WorkflowStepDomain'
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
          description: HTTP method
        webhook_name:
          type: string
          description: Name of the webhook
        expected_system_variables:
          type: array
          items:
            type: string
          description: List of system variables expected in this webhook
        headers_json:
          type: object
          description: HTTP headers as JSON object
        query_params_json:
          type: object
          description: Query parameters as JSON object
        request_body_json:
          type: object
          description: Request body as JSON object
        webhook_uuid:
          type: string
          description: Unique identifier for the webhook
    ExecutionCondition:
      type: object
      properties:
        value:
          type: string
          description: Value to compare against
        operator:
          type: string
          enum:
            - eq
            - ne
            - lt
            - gt
            - lte
            - gte
            - in
            - contains
          description: Comparison operator
        field:
          type: string
          description: Field path to evaluate
    WorkflowStepDomain:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - http
            - https
          description: Protocol type
        domain:
          type: string
          description: Domain name
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-hookpulse-api-key
      description: >-
        API key for authentication. Get this from your dashboard by selecting a
        brand and going to API Keys section.
    brandUuidAuth:
      type: apiKey
      in: header
      name: x-brand-uuid
      description: >-
        Brand UUID for authentication. Get this from your dashboard after adding
        a brand - it will be displayed in the UI.

````