---
title: Update Configuration Template
slug: api-documentation/update-configuration-template
docTags: 
createdAt: 2026-08-27T16:18:32.800Z
---

{
  "id": "fia27Ckx3eGapaCGZCJG9",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}"
      }
    ],
    "name": "Update Configuration Template",
    "description": "<p>This endpoint update cfg template.</p>\n<p>Authorized permissions:</p>\n<ul>\n<li><code>tenant.cfg.modify</code></li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "templateId",
          "type": "string",
          "description": "Unique identifier for a given template."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "text/plain"
          ],
          "default": "text/plain"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site this call is for."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"name\":\"Cybersource Payment Gateway Configuration v2\",\"propertiesDec\":{\"type\":\"object\",\"properties\":{\"merchantId\":{\"type\":\"string\",\"description\":\"Merchant identifier\"},\"apiKey\":{\"type\":\"string\",\"format\":\"password\",\"minLength\":32},\"apiSecret\":{\"type\":\"string\",\"format\":\"password\",\"description\":\"NEW: API secret for enhanced security\"},\"apiUrl\":{\"type\":\"string\",\"format\":\"uri\",\"default\":\"https://api.cybersource.com\"},\"currency\":{\"type\":\"string\",\"enum\":[\"USD\",\"EUR\",\"GBP\",\"CAD\"],\"default\":\"USD\"}},\"required\":[\"merchantId\",\"apiKey\"]},\"enabled\":true,\"accessControl\":{\"read\":true,\"modify\":false}}",
          "description": "The configuration template fields to update.",
          "customType": "UpdateCfgTemplate",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>Updated human-readable name for the template. Use to clarify purpose, reflect updated integration versions, or improve naming conventions. Should remain descriptive of what configurations use this template.</p>",
              "example": "Cybersource Payment Gateway Configuration v2"
            },
            {
              "name": "propertiesDec",
              "kind": "required",
              "type": "object",
              "description": "<p>Updated Properties Descriptors (JSON Schema). This is where schema evolution happens. You can: add new optional fields (backward compatible), change validation rules, update descriptions, add new enums, modify defaults. CAUTION: Removing required fields or making breaking changes affects existing records. Plan migrations carefully. Template version auto-increments to track schema changes.</p>",
              "example": "{\"type\":\"object\",\"properties\":{\"merchantId\":{\"type\":\"string\",\"description\":\"Merchant identifier from Cybersource\",\"pattern\":\"^[a-zA-Z0-9_-]+$\"},\"apiKey\":{\"type\":\"string\",\"description\":\"API key for authentication\",\"format\":\"password\",\"minLength\":32},\"apiSecret\":{\"type\":\"string\",\"description\":\"NEW FIELD: API secret for enhanced security\",\"format\":\"password\",\"minLength\":32},\"apiUrl\":{\"type\":\"string\",\"format\":\"uri\",\"default\":\"https://api.cybersource.com\",\"description\":\"Cybersource API base URL\"},\"currency\":{\"type\":\"string\",\"enum\":[\"USD\",\"EUR\",\"GBP\",\"CAD\"],\"default\":\"USD\",\"description\":\"Default currency\"},\"testMode\":{\"type\":\"boolean\",\"default\":false},\"webhookUrl\":{\"type\":\"string\",\"format\":\"uri\",\"description\":\"NEW FIELD: Optional webhook for payment notifications\"}},\"required\":[\"merchantId\",\"apiKey\"]}",
              "schema": []
            },
            {
              "name": "enabled",
              "kind": "required",
              "type": "boolean",
              "description": "Updated enabled status. Set to false to deprecate a template and prevent creation of new records while allowing existing records to continue working. Set to true to reactivate a disabled template. Use for template lifecycle management.",
              "example": true
            },
            {
              "name": "accessControl",
              "kind": "optional",
              "type": "object",
              "description": "<p>Access control settings that determine which operations can be performed on a configuration resource. This enables fine-grained permission management for configuration templates and records.</p>",
              "modelRef": "#/components/schemas/CfgAccessControl",
              "customType": "CfgAccessControl",
              "schema": [
                {
                  "name": "read",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Whether the configuration resource can be read/viewed. When false, the resource is hidden from queries and detail views unless the user has elevated privileges. Typically used for sensitive configurations.</p>",
                  "example": true
                },
                {
                  "name": "modify",
                  "kind": "required",
                  "type": "boolean",
                  "description": "<p>Whether the configuration resource can be modified (updated or deleted). When false, the resource becomes read-only and cannot be changed through the API. Useful for protecting production configurations.</p>",
                  "example": false
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/UpdateCfgTemplate",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Success-template updated successfully. Version automatically incremented.</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"ValidationError\",\"code\":\"SCHEMA_VALIDATION_FAILED\",\"detail\":\"Configuration data validation failed: data.apiKey is required but was not provided. Expected string with minimum length 32.\"}",
            "description": "<p>Error response returned when request validation fails (HTTP 400). Contains details about which fields failed validation and why. Used for client-side error display and form validation feedback. Common when configuration data doesn't match template schema.</p>",
            "customType": "ValidationErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The error type, typically 'ValidationError' for all validation failures. Use this to distinguish validation errors from other error types in your error handling logic.</p>",
                "example": "ValidationError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A validation-specific error code indicating the validation rule that failed. Examples include 'REQUIRED_FIELD_MISSING', 'INVALID_FORMAT', 'VALUE_OUT_OF_RANGE', 'SCHEMA_VALIDATION_FAILED', 'TEMPLATE_NOT_FOUND'. Use for specific handling of different validation scenarios.</p>",
                "example": "SCHEMA_VALIDATION_FAILED"
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable validation error message describing which field(s) failed and why. Includes specific details about what was expected vs what was provided. For schema validation failures, may include JSON path to the invalid field (e.g., 'data.apiKey is required but was not provided').</p>",
                "example": "Configuration data validation failed: data.apiKey is required but was not provided. Expected string with minimum length 32."
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"AuthorizationError\",\"code\":\"INSUFFICIENT_PERMISSIONS\",\"detail\":\"User does not have the required tenant.cfg.modify permission to perform this operation.\",\"reason\":\"Your access token does not include the necessary permissions. Contact your administrator to request access.\"}",
            "description": "<p>Standard error response returned when a request fails due to business logic, authorization, or system errors. Provides structured information for debugging and user-facing error messages.</p>",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name. This is a machine-readable identifier for the class of error (e.g., 'AuthorizationError', 'ResourceNotFoundError', 'ValidationError'). Use this for programmatic error handling.</p>",
                "example": "ResourceNotFoundError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A specific error code identifying the exact error condition. More granular than name, this code can be used for precise error handling and localization. Format is typically uppercase with underscores (e.g., 'TEMPLATE_NOT_FOUND', 'INSUFFICIENT_PERMISSIONS').</p>",
                "example": "TEMPLATE_NOT_FOUND"
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable description of the error, including context about what went wrong. This message is suitable for display to end users or inclusion in logs. May include specifics like resource IDs or field names.</p>",
                "example": "The configuration template with ID \"payment-stripe\" was not found in the system."
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "<p>Optional additional context explaining why the error occurred or what action the user should take. May include suggestions for resolution, links to documentation, or details about system state that led to the error.</p>",
                "example": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "The requested resource was not found in the NoChannel system.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"ResourceNotFoundError\",\"code\":\"TEMPLATE_NOT_FOUND\",\"detail\":\"The configuration template with ID \\\"payment-stripe\\\" was not found in the system.\",\"reason\":\"The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates.\"}",
            "description": "<p>Standard error response returned when a request fails due to business logic, authorization, or system errors. Provides structured information for debugging and user-facing error messages.</p>",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name. This is a machine-readable identifier for the class of error (e.g., 'AuthorizationError', 'ResourceNotFoundError', 'ValidationError'). Use this for programmatic error handling.</p>",
                "example": "ResourceNotFoundError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A specific error code identifying the exact error condition. More granular than name, this code can be used for precise error handling and localization. Format is typically uppercase with underscores (e.g., 'TEMPLATE_NOT_FOUND', 'INSUFFICIENT_PERMISSIONS').</p>",
                "example": "TEMPLATE_NOT_FOUND"
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable description of the error, including context about what went wrong. This message is suitable for display to end users or inclusion in logs. May include specifics like resource IDs or field names.</p>",
                "example": "The configuration template with ID \"payment-stripe\" was not found in the system."
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "<p>Optional additional context explaining why the error occurred or what action the user should take. May include suggestions for resolution, links to documentation, or details about system state that led to the error.</p>",
                "example": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "<p>The request was well-formed but contains semantic errors or violates business rules that prevent processing.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"UnprocessableEntityError\",\"code\":\"TEMPLATE_IN_USE\",\"detail\":\"Cannot delete template \\\"payment-cybersource\\\" because 5 configuration records are still using it.\",\"reason\":\"Delete or migrate all records using this template before deleting the template itself.\"}",
            "description": "<p>Standard error response returned when a request fails due to business logic, authorization, or system errors. Provides structured information for debugging and user-facing error messages.</p>",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name. This is a machine-readable identifier for the class of error (e.g., 'AuthorizationError', 'ResourceNotFoundError', 'ValidationError'). Use this for programmatic error handling.</p>",
                "example": "ResourceNotFoundError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A specific error code identifying the exact error condition. More granular than name, this code can be used for precise error handling and localization. Format is typically uppercase with underscores (e.g., 'TEMPLATE_NOT_FOUND', 'INSUFFICIENT_PERMISSIONS').</p>",
                "example": "TEMPLATE_NOT_FOUND"
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable description of the error, including context about what went wrong. This message is suitable for display to end users or inclusion in logs. May include specifics like resource IDs or field names.</p>",
                "example": "The configuration template with ID \"payment-stripe\" was not found in the system."
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "<p>Optional additional context explaining why the error occurred or what action the user should take. May include suggestions for resolution, links to documentation, or details about system state that led to the error.</p>",
                "example": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>An unexpected internal server error occurred. The request may be retried, and if the problem persists, contact support with the traceId from the error response.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"InternalServerError\",\"code\":\"UNEXPECTED_ERROR\",\"detail\":\"An unexpected error occurred while processing your request.\",\"reason\":\"Our team has been notified. Please try again, and if the problem persists, contact support with trace ID: 550e8400-e29b-41d4-a716-446655440000\"}",
            "description": "<p>Standard error response returned when a request fails due to business logic, authorization, or system errors. Provides structured information for debugging and user-facing error messages.</p>",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>The high-level error category or type name. This is a machine-readable identifier for the class of error (e.g., 'AuthorizationError', 'ResourceNotFoundError', 'ValidationError'). Use this for programmatic error handling.</p>",
                "example": "ResourceNotFoundError"
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": "<p>A specific error code identifying the exact error condition. More granular than name, this code can be used for precise error handling and localization. Format is typically uppercase with underscores (e.g., 'TEMPLATE_NOT_FOUND', 'INSUFFICIENT_PERMISSIONS').</p>",
                "example": "TEMPLATE_NOT_FOUND"
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": "<p>A human-readable description of the error, including context about what went wrong. This message is suitable for display to end users or inclusion in logs. May include specifics like resource IDs or field names.</p>",
                "example": "The configuration template with ID \"payment-stripe\" was not found in the system."
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": "<p>Optional additional context explaining why the error occurred or what action the user should take. May include suggestions for resolution, links to documentation, or details about system state that led to the error.</p>",
                "example": "The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates."
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Knx4Tew42lF3W_I2GMRNc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId} \\\n     --header 'accept: text/plain' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data '{\n     \"name\": \"Cybersource Payment Gateway Configuration v2\",\n     \"propertiesDec\": \"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"merchantId\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"Merchant identifier from Cybersource\\\",\\\"pattern\\\":\\\"^[a-zA-Z0-9_-]+$\\\"},\\\"apiKey\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"API key for authentication\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiSecret\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"NEW FIELD: API secret for enhanced security\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\",\\\"CAD\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false},\\\"webhookUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"description\\\":\\\"NEW FIELD: Optional webhook for payment notifications\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n     \"enabled\": true,\n     \"accessControl\": {\n     \"read\": true,\n     \"modify\": false\n     }\n     }'"
        },
        {
          "id": "SfrpQdJjXyYJcx8XarTk6",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"text/plain\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Cybersource Payment Gateway Configuration v2\",\n   \"propertiesDec\": \"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"merchantId\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"Merchant identifier from Cybersource\\\",\\\"pattern\\\":\\\"^[a-zA-Z0-9_-]+$\\\"},\\\"apiKey\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"API key for authentication\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiSecret\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"NEW FIELD: API secret for enhanced security\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\",\\\"CAD\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false},\\\"webhookUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"description\\\":\\\"NEW FIELD: Optional webhook for payment notifications\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n   \"enabled\": true,\n   \"accessControl\": {\n      \"read\": true,\n      \"modify\": false\n   }\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "E72ejDQCoEmieASK73zjA",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"text/plain\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump({\n   \"name\": \"Cybersource Payment Gateway Configuration v2\",\n   \"propertiesDec\": \"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"merchantId\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"Merchant identifier from Cybersource\\\",\\\"pattern\\\":\\\"^[a-zA-Z0-9_-]+$\\\"},\\\"apiKey\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"API key for authentication\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiSecret\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"NEW FIELD: API secret for enhanced security\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\",\\\"CAD\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false},\\\"webhookUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"description\\\":\\\"NEW FIELD: Optional webhook for payment notifications\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n   \"enabled\": true,\n   \"accessControl\": {\n      \"read\": true,\n      \"modify\": false\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "ZZsrhtD6iSLnieYFGJ-Vj",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/tenants/cfg/templates/{templateId}\"\n\npayload = json.dumps({\n   \"name\": \"Cybersource Payment Gateway Configuration v2\",\n   \"propertiesDec\": \"{\\\"type\\\":\\\"object\\\",\\\"properties\\\":{\\\"merchantId\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"Merchant identifier from Cybersource\\\",\\\"pattern\\\":\\\"^[a-zA-Z0-9_-]+$\\\"},\\\"apiKey\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"API key for authentication\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiSecret\\\":{\\\"type\\\":\\\"string\\\",\\\"description\\\":\\\"NEW FIELD: API secret for enhanced security\\\",\\\"format\\\":\\\"password\\\",\\\"minLength\\\":32},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\",\\\"CAD\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false},\\\"webhookUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"description\\\":\\\"NEW FIELD: Optional webhook for payment notifications\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n   \"enabled\": True,\n   \"accessControl\": {\n      \"read\": True,\n      \"modify\": False\n   }\n})\nheaders = {\n   'accept': 'text/plain',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Knx4Tew42lF3W_I2GMRNc"
    },
    "results": {
      "languages": [
        {
          "id": "mj-kfcy736FtQe2STAaet",
          "language": "200",
          "code": "// Success-template updated successfully. Version automatically incremented.\n"
        },
        {
          "id": "p2VULnvgwz6Jf-SqpaKNt",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{\n  \"name\": \"ValidationError\",\n  \"code\": \"SCHEMA_VALIDATION_FAILED\",\n  \"detail\": \"Configuration data validation failed: data.apiKey is required but was not provided. Expected string with minimum length 32.\"\n}"
        },
        {
          "id": "6WQ4tEeNABRMQkYEFyAa_",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.\n{\n  \"name\": \"ResourceNotFoundError\",\n  \"code\": \"TEMPLATE_NOT_FOUND\",\n  \"detail\": \"The configuration template with ID \\\"payment-stripe\\\" was not found in the system.\",\n  \"reason\": \"The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates.\"\n}"
        },
        {
          "id": "aE7Id26Ke3MoHQTKeZZax",
          "language": "404",
          "code": "// The requested resource was not found in the NoChannel system.\n{\n  \"name\": \"ResourceNotFoundError\",\n  \"code\": \"TEMPLATE_NOT_FOUND\",\n  \"detail\": \"The configuration template with ID \\\"payment-stripe\\\" was not found in the system.\",\n  \"reason\": \"The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates.\"\n}"
        },
        {
          "id": "HgBy7lAr7drBGj_bp9b0u",
          "language": "422",
          "code": "// The request was well-formed but contains semantic errors or violates business rules that prevent processing.\n{\n  \"name\": \"ResourceNotFoundError\",\n  \"code\": \"TEMPLATE_NOT_FOUND\",\n  \"detail\": \"The configuration template with ID \\\"payment-stripe\\\" was not found in the system.\",\n  \"reason\": \"The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates.\"\n}"
        },
        {
          "id": "-rG7Skjf16mVNJ9Ja8tih",
          "language": "500",
          "code": "// An unexpected internal server error occurred. The request may be retried, and if the problem persists, contact support with the traceId from the error response.\n{\n  \"name\": \"ResourceNotFoundError\",\n  \"code\": \"TEMPLATE_NOT_FOUND\",\n  \"detail\": \"The configuration template with ID \\\"payment-stripe\\\" was not found in the system.\",\n  \"reason\": \"The template may have been deleted or you may not have permission to access it. Verify the template ID using GET /tenants/cfg/templates.\"\n}"
        }
      ],
      "selectedLanguageId": "mj-kfcy736FtQe2STAaet"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}