# Create catalog attribute

Returns either a newly created Catalog attribute, or validation errors.

[endpoint]
base_url = "https://uptime.betterstack.com"
path = "/api/v2/catalog/relations/{relation_id}/attributes"
method = "POST"

[[path_param]]
name = "relation_id"
description = "The ID of the Catalog relation you want to create an attribute for."
required = true
type = "string"

[[body_param]]
name = "name"
description = "The name of the Catalog attribute"
required = true
type = "string"

[[body_param]]
name = "*"
description = "Any params you'd like to set. See the [list of all Catalog attribute API parameters](https://betterstack.com/docs/uptime/api/catalog-attribute-response-params/) for details."
required = false

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"

[[header]]
name = "Content_Type"
description = "application/json"
required = false
type = "string"
[/endpoint]

[responses]
[[response]]
status = 201
description = '''Returns newly created Catalog attribute'''
body = '''{
  "data": {
    "id": "56",
    "type": "catalog_attribute",
    "attributes": {
      "name": "Team",
      "primary": true,
      "position": 0
    }
  }
}'''

[/responses]

#### Example cURL 

```shell
[label Example]
curl -X "POST" "https://uptime.betterstack.com/api/v2/catalog/relations/37/attributes" \
     -H "Authorization: Bearer $TOKEN" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "name": "Test"
}'
```

[info]
#### Looking for the details of a specific parameter?
Explore [the list of all Catalog attribute API parameters](https://betterstack.com/docs/uptime/api/catalog-attribute-response-params/)
[/info]