# Create_Attribute

Create an attribute.

`POST /v2/attributes`

**API:** Avalara CertCapture RESTful APIs
**Tag:** Attributes
**API Version:** v2
**Base URL:** https://sbx-api.certcapture.com/v2/
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** Basic (username + license key) or API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/ecm/api/certcapture/methods/Attributes/Create_Attribute/

## Description

Create an attribute for a company.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-client-id` | integer | header | Yes | To access a client ID, it is available from Company Settings -> Company Details -> Company ID |

## Request Body

**Schema:** `Attributes`

Attributes Model

| Property | Type | Required | Description |
|---|---|---|---|
| `attribute_group_id` | integer | No | System Generated Attribute Group id. Example: `2`. |
| `description` | string | No | The description of the Attribute. Example: `Hestng Oil`. |
| `name` | string | No | The name of the Attribute. Example: `Heating Oil`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `AttributesResponse` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

### 200 Response: `AttributesResponse`

Attributes Response Model

| Property | Type | Required | Description |
|---|---|---|---|
| `attribute_group_id` | integer | No | System Generated Attribute Group id. Example: `2`. |
| `created` | string | No | DateTime of when the record was created. Example: `2017-10-26 12:41:48.377959`. |
| `description` | string | No | The description of the Attribute. Example: `Hestng Oil`. |
| `id` | integer | No | System Generated Attributes id Example: `1`. |
| `modified` | string | No | DateTime of when the record was modified. Example: `2017-10-26 12:41:48.377959`. |
| `name` | string | No | The name of the Attribute. Example: `Heating Oil`. |
| `system_code` | boolean | No | States if the Attribute was system generated or not. Example: `true`. |

## Example Request

```bash
curl -X POST "https://sbx-api.certcapture.com/v2/v2/attributes" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "attribute_group_id": "2",
  "description": "Hestng Oil",
  "name": "Heating Oil"
}'
```