---
title: Create Line Attribute
slug: create-line-attribute
docTags: 
createdAt: 2026-09-12T01:11:05.657Z
---

{
  "id": "tulY5DTM-PH8jdlcwDtFt",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/api/objects/LineAttribute",
    "servers": [
      {
        "url": "https://api.nue.io/api/objects/LineAttribute",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/api/objects/LineAttribute",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Create Line Attribute",
    "description": "<p>Create a Line Attribute definition. <code>name</code> and <code>scope</code> are required. Create with <code>isActive: false</code> to register a draft without provisioning the mapped field; create with <code>isActive: true</code> to activate immediately, which provisions the mapped field across the five line objects (Quote Line Item, Order Product, Subscription, Asset, Entitlement), adds it to the <code>Fields_Expose_to_Nue</code> field sets, and runs a Business Objects sync.</p>\n<p>The object apiName is <code>LineAttribute</code> (not the Salesforce <code>LineAttribute__c</code> name, which is rejected). Field names use Nue camelCase apiNames.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "<p>Request body for creating a Line Attribute. Field names use Nue camelCase apiNames, not Salesforce API names.</p>",
          "customType": "LineAttributeCreateRequest",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>Unique, rep-facing label</p>",
              "example": "Overage Rate",
              "maxLength": 80
            },
            {
              "name": "scope",
              "kind": "required",
              "type": "array",
              "description": "Where the attribute appears",
              "example": "[\"Line Editor\"]",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "mappedFieldApiName",
              "kind": "optional",
              "type": "string",
              "description": "The Salesforce field the attribute maps to",
              "example": "Overage_Rate__c",
              "maxLength": 255
            },
            {
              "name": "isActive",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Draft (false) vs active (true). Activation provisions the mapped field across the five line objects.</p>",
              "default": false
            },
            {
              "name": "appliesToProductsFilter",
              "kind": "optional",
              "type": "string",
              "description": "<p>Product filter; empty applies to all products</p>"
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "<p>Rep-facing help text</p>",
              "maxLength": 255
            },
            {
              "name": "defaultPluginActionId",
              "kind": "optional",
              "type": "string",
              "description": "<p>ID of the default Pricing Plugin action (optional)</p>"
            }
          ],
          "modelRef": "#/components/schemas/LineAttributeCreateRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Line Attribute created successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response from creating an object",
            "customType": "CreateObjectResponse",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "The Salesforce ID of the created record",
                "example": "001D000000IRFmaIAH"
              }
            ],
            "modelRef": "#/components/schemas/CreateObjectResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - a required field (name, scope) is missing or invalid</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Error response",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code",
                "example": 400
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": "Bad Request"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "string",
                "description": "Detailed error information",
                "example": "Required field 'name' is missing"
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Invalid or missing API key</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "<p>Forbidden - Insufficient permissions (requires System Settings management)</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "MsJk_Y1-qqnN_tMlPZV-L",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/api/objects/LineAttribute \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"Overage Rate\",\n     \"scope\": []\n     }'"
        },
        {
          "id": "P7Hu6aA0FFK-aODkodR5T",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Overage Rate\",\n   \"scope\": []\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/api/objects/LineAttribute\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "yGSCaqw-LnPMev2URbe-i",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/api/objects/LineAttribute\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"Overage Rate\",\n   \"scope\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "CQvQ9vtT29EUx1m25aQZE",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/api/objects/LineAttribute\"\n\npayload = json.dumps({\n   \"name\": \"Overage Rate\",\n   \"scope\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "MsJk_Y1-qqnN_tMlPZV-L"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Line Attribute created successfully\n{\n  \"id\": \"001D000000IRFmaIAH\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request - a required field (name, scope) is missing or invalid\n{\n  \"code\": 400,\n  \"message\": \"Bad Request\",\n  \"details\": \"Required field 'name' is missing\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized - Invalid or missing API key\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden - Insufficient permissions (requires System Settings management)\n"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}