---
title: "Create a workflow template"
method: POST
path: "/v1/workflows/workflow_templates"
tags: ["Workflow Templates"]
---

# Create a workflow template

`POST /v1/workflows/workflow_templates`

## Request

- Base URL: `https://api.paymongo.com`
- URL: `https://api.paymongo.com/v1/workflows/workflow_templates`
- Auth: HTTP basic

Creates a reusable workflow definition template. Superuser only.

## Headers

- `Organization-Id` string, required

## Request body

- CreateTemplateRequest
  - `definition` object, required
  - `description` string
  - `metadata` object
  - `name` string, required

## Response `201`

Created workflow template

- TemplateSuccessResponse
  - `data` TemplateResponse
    - `created_at` string
    - `definition` object
    - `description` string
    - `id` string
    - `metadata` object
    - `name` string
    - `updated_at` string

## Other responses

- `400`: Bad Request
- `401`: authentication_failed, missing_authorization_header, unsupported_auth_method or jwt_signature_invalid when the credential is missing, malformed or rejected; accountid_identity_required when a superuser or service-to-service caller sends the Account-ID header
- `403`: Superuser required
- `409`: template_already_exists
- `500`: Internal Server Error
- `502`: accountid_relationship_lookup_failed or accountid_account_lookup_failed when an upstream service does not answer
- `503`: upstream_unavailable when an upstream service does not answer
- `504`: service_timeout when the request exceeds its deadline

---

[API](https://skmtc.dev/paymongo/apis/workflow.md) - [All operations](https://skmtc.dev/paymongo/apis/workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/workflow/revisions/859719cfffa2?raw)
