> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Example

### Make your first API request

This section provides you the instructions to use the [Create Attribute](/v3/product-catalog/api-reference/product-catalog/attributes/create-attribute) endpoint. With this endpoint, you can create attributes that can be assigned to a product or category.

#### Prerequisites:

* Generate the access token by following the instructions in the [Getting Started with fabric APIs](/v3/getting-started/api-guides/getting-started-with-fabric-apis).
* Get the `x-fabric-tenant-id` by following the instructions in the [Getting the Account ID](/v3/platform/settings/account-details/getting-the-account-id).

#### Procedure

1. Open your preferred API testing tool or command-line interface.
2. To run the following API call, set the following headers in the request with the corresponding values and add the payload as in the example:
   * `x-fabric-tenant-id`: Replace `<Tenant-Id>` with your fabric tenant ID.
   * `Authorization`: Replace `<Generated-access-token>` with the access token obtained from the previous steps.
   * `Content-Type`: Set this header to `application/json`.

```bash theme={null}
   curl --location 'https://api.fabric.inc/v3/product-attributes' \  
   --header 'x-fabric-tenant-id: <Tenant-Id>' \  
   --header 'Authorization: <Generated-access-token>' \  
   --header 'Content-Type: application/json' \  
   --data '{  
      "name": "20063",  
      "localizedProperties": {  
         "en-US": {  
               "name": "demo_en_us_attribute"  
         }  
      },  
      "description": "Demo_attribute",  
      "type": "TEXT",  
      "target": "PRODUCT",  
      "isLocalizable": false,  
      "validation": {  
         "isMandatory": false,  
         "subType": "SMALL_TEXT",  
         "customValidationFormula": ""  
      }  
   }'  
```

Note that this payload is an example. You can edit it as required.
3\. Send a POST request to the `https://api.fabric.inc/v3/product-attributes` endpoint.\
A response with the status code 200 is returned with the following information:

```bash theme={null}
{  
   "id": "",  
   "name": "",  
   "description": "",  
   "isLocalizable": ,  
   "target": "",  
   "type": "",  
   "validation": {  
      "isMandatory": ,  
      "subType": "",  
      "customValidationFormula": "",  
      "isManualOverwrite":  
   },  
   "updatedAt": "",  
   "createdAt": "",  
   "updatedBy": ""  
}  
```

### Related Resources

* [Getting Started with fabric APIs](/v3/getting-started/api-guides/getting-started-with-fabric-apis)
* [API Authentication](/v3/getting-started/api-guides/api-authentication)
* [Glossary](/v3/getting-started/copilot/glossary)
* [Getting System App Credentials](/v3/platform/settings/api-apps/getting-system-app-credentials)
* [fabric support](https://support.fabric.inc/hc/en-us/requests/new)
* [License](https://fabric.inc/api-license)
* [Demo Request](https://fabric.inc/demo-request)
