Rebrand 2023 Learn more 

  • Products/
    Extending Products/
    Product Templates API/
    Create a Template

    Create a Template

    This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.

    POST Create a Template



    AuthorizationRequiredstringThe Bearer token required to get access to the API.


    typeRequiredstringSpecifies the type of the resource. You must use flow.
    nameRequiredstringSpecifies the name of the template.
    slugRequiredstringSpecifies the unique slug identifier for the template. You must use the products(my-template-slug) format. For example, products(Skincare).
    descriptionRequiredstringProvides a description for the template.
    enabledRequiredbooleanSpecifies whether the template is enabled. Set this parameter true to assign the template to an attribute.

    Request Examples


    curl -X POST "" \
         -H "Authorization: XXXX" \
         -H "Content-Type: application/json" \
         -d $'{
            "data": {
                "type": "flow",
                "name": "products(Skincare)",
                "slug": "products(Skincare)",
                "description": "newFlowDescription_6717339029",
                "enabled": true

    JavaScript SDK

    const MoltinGateway = require("@moltin/sdk").gateway;
    const Moltin = MoltinGateway({
        client_id: "X",
    const data = {
        name: "products(Skincare)",
        slug: "products(Skincare)",
        description: "Extends the default product object",
        enabled: true,
    Moltin.Flows.Create(data).then((flow) => {
        // Do something

    Response Example

    201 Created

        "data": {
            "id": "6d320b42-237d-4474-8452-d49f884d4ae1",
            "type": "flow'",
            "name": "products(Skincare)",
            "slug": "products(Skincare)",
            "description": "newFlowDescription_6717339029",
            "enabled": true,
            "links": {
                "self": ""
            "relationships": {},
            "meta": {
                "owner": "organization",
                "timestamps": {
                    "created_at": "2018-05-10T18:04:26.623Z",
                    "updated_at": "2018-05-10T18:04:26.623Z"
    Get a Template