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

{
  "id": "Cmq25m6_urW93d44KD1xg",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/tenants/cfg/templates",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/tenants/cfg/templates"
      }
    ],
    "name": "Create Configuration Template",
    "description": "<p>This endpoint creates a new 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": [],
      "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": "{\"templateId\":\"payment-stripe\",\"name\":\"Stripe Payment Gateway Configuration\",\"propertiesDec\":{\"type\":\"object\",\"properties\":{\"apiKey\":{\"type\":\"string\",\"format\":\"password\",\"description\":\"Stripe secret API key\",\"minLength\":32},\"publishableKey\":{\"type\":\"string\",\"description\":\"Stripe publishable API key\"},\"webhookSecret\":{\"type\":\"string\",\"format\":\"password\",\"description\":\"Webhook signing secret\"},\"currency\":{\"type\":\"string\",\"enum\":[\"USD\",\"EUR\",\"GBP\"],\"default\":\"USD\"}},\"required\":[\"apiKey\",\"publishableKey\"]},\"enabled\":true,\"accessControl\":{\"read\":true,\"modify\":true}}",
          "description": "<p>The configuration template to create, defining the fields a record may set.</p>",
          "customType": "CreateCfgTemplate",
          "schema": [
            {
              "name": "templateId",
              "kind": "optional",
              "type": "string",
              "description": "<p>Optional custom identifier for this template. If not provided, a unique ID will be auto-generated. Must be unique within the tenant. Use descriptive, hierarchical IDs following conventions like 'payment-{provider}', 'shipping-{provider}', 'media-{provider}' (e.g., 'payment-cybersource', 'media-cloudinary'). Cannot be changed after creation.</p>",
              "example": "payment-cybersource"
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>Human-readable name for this template. Displayed in administrative UI, documentation, and when creating records. Should clearly describe what type of configuration this template is for (e.g., 'Cybersource Payment Gateway Configuration', 'FedEx Shipping Integration', 'Cloudinary Media Storage').</p>",
              "example": "Cybersource Payment Gateway Configuration"
            },
            {
              "name": "propertiesDec",
              "kind": "required",
              "type": "object",
              "description": "<p>Properties Descriptors (abbreviated as 'propertiesDec'): JSON Schema specification defining the structure, types, and validation rules for configuration records created from this template. Must be valid JSON Schema (draft-07 or compatible). Include field descriptions, required fields, formats, patterns, enums, and defaults. This is the core of the template - it enforces data structure and validation for all records.</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},\"apiUrl\":{\"type\":\"string\",\"format\":\"uri\",\"default\":\"https://api.cybersource.com\",\"description\":\"Cybersource API base URL\"},\"currency\":{\"type\":\"string\",\"enum\":[\"USD\",\"EUR\",\"GBP\"],\"default\":\"USD\",\"description\":\"Default currency for transactions\"},\"testMode\":{\"type\":\"boolean\",\"default\":false,\"description\":\"Enable test mode for development\"}},\"required\":[\"merchantId\",\"apiKey\"]}",
              "schema": []
            },
            {
              "name": "enabled",
              "kind": "required",
              "type": "boolean",
              "description": "Whether this template is initially active and can be used to create new records. Set to false to create templates in draft state for review before enabling. Disabled templates prevent creation of new records but existing records continue to work. 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/CreateCfgTemplate",
          "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": "201",
        "description": "<p>Success-template created successfully. Returns the generated template ID.</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": "409",
        "description": "The request conflicts with the current state of the resource. This typically occurs when trying to create a resource that already exists or when there's a conflict with business rules.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"name\":\"ConflictError\",\"code\":\"TEMPLATE_ID_ALREADY_EXISTS\",\"detail\":\"A configuration template with the ID \\\"payment-cybersource\\\" already exists in the tenant.\",\"reason\":\"Template IDs must be unique within a tenant. Please choose a different template ID or update the existing template.\"}",
            "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": "1XMZ2mePpzesWuhsk-TJ6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/tenants/cfg/templates \\\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\",\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},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency for transactions\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false,\\\"description\\\":\\\"Enable test mode for development\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n     \"enabled\": true,\n     \"accessControl\": {\n     \"read\": true,\n     \"modify\": false\n     }\n     }'"
        },
        {
          "id": "HrNsgjJDyPMGi0Yr9tHqP",
          "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\",\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},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency for transactions\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false,\\\"description\\\":\\\"Enable test mode for development\\\"}},\\\"required\\\":[\\\"merchantId\\\",\\\"apiKey\\\"]}\",\n   \"enabled\": true,\n   \"accessControl\": {\n      \"read\": true,\n      \"modify\": false\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/tenants/cfg/templates\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "MzWvkS9HN2EEkdDY7kTFu",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/tenants/cfg/templates\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.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\",\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},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency for transactions\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false,\\\"description\\\":\\\"Enable test mode for development\\\"}},\\\"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": "T0UC-R4JERWBWXPZr9OwR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/tenants/cfg/templates\"\n\npayload = json.dumps({\n   \"name\": \"Cybersource Payment Gateway Configuration\",\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},\\\"apiUrl\\\":{\\\"type\\\":\\\"string\\\",\\\"format\\\":\\\"uri\\\",\\\"default\\\":\\\"https://api.cybersource.com\\\",\\\"description\\\":\\\"Cybersource API base URL\\\"},\\\"currency\\\":{\\\"type\\\":\\\"string\\\",\\\"enum\\\":[\\\"USD\\\",\\\"EUR\\\",\\\"GBP\\\"],\\\"default\\\":\\\"USD\\\",\\\"description\\\":\\\"Default currency for transactions\\\"},\\\"testMode\\\":{\\\"type\\\":\\\"boolean\\\",\\\"default\\\":false,\\\"description\\\":\\\"Enable test mode for development\\\"}},\\\"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(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "1XMZ2mePpzesWuhsk-TJ6"
    },
    "results": {
      "languages": [
        {
          "id": "6LO_Umxy6tISPNmoveaR-",
          "language": "201",
          "code": "// Success-template created successfully. Returns the generated template ID.\n"
        },
        {
          "id": "sQ9VZULJZwfcBkObtK-G9",
          "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": "cBMbY6NEAzOu7t1TE6ro_",
          "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": "8qXfeBgjs4LILlRXBdrOe",
          "language": "409",
          "code": "// The request conflicts with the current state of the resource. This typically occurs when trying to create a resource that already exists or when there's a conflict with business rules.\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": "x735svXTkhG1QIBsP7Y9q",
          "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": "rSMEmoDGuEq_j2OpQQuJv",
          "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": "6LO_Umxy6tISPNmoveaR-"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}