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

# Declare an attribute

> Declare an attribute of your own for your Credit policies to read.

The Platform checks the form: a unit it counts in, bounds in order, a positive maximum age, both texts present. It does not review the meaning. The rationale and the basis are yours.

A name, rationale or basis containing a word from [the lexicon](https://docs.capcells.com/api-reference/attributes/lexicon.md) is refused, naming the word.

Only integers: a count, an amount, a ratio, a duration, or a flag that is 0 or 1.

A declaration is immutable. A different bound is a different name.

## Who may call

An administrator of the organization, as a person. The agent is refused on live and sandbox Tenancies alike.

## Path parameters

**tenant\_id** `string` *required*

The Tenancy acting. It comes from [Read the tenancy](https://docs.capcells.com/api-reference/console/tenancy/read.md); your organization must be bound to it.

**local** `string` *required*

The attribute's local name: a lowercase letter, then 1–63 of `a–z 0–9 _`. The vocabulary spells it `<tenant_id>:<local>`.

## Body

**unit** `string` *required*

`years`, `months`, `minor units`, `count`, `basis points` or `flag`.

**min** `integer` *required*

The lowest value admitted.

**max** `integer` *required*

The highest value admitted.

**admits** `array`

Which absent states a value may arrive in: `not_applicable`, `unavailable`.

**max\_age\_days** `integer` *required*

How old a stated value may be on the day it is submitted. At least 1.

**rationale** `string` *required*

What the attribute is for. At most 2,000 characters.

**basis** `string` *required*

The basis on which you hold that reading it is permissible. At most 2,000 characters.

## Response

Answers `201`.

**name** `string` *required*

The namespaced spelling, `<tenant_id>:<local_name>`. Rules and applications use this one.

**local\_name** `string` *required*

The name without the namespace.

**kind** `string` *required*

Always `declared`.

**unit** `string` *required*

What the value counts in.

**min** `integer` *required*

The lowest value admitted.

**max** `integer` *required*

The highest value admitted.

**admits** `array` *required*

The absent states the attribute admits.

**max\_age\_days** `integer` *required*

How old a stated value may be.

**rationale** `string` *required*

Your statement of what the attribute is for.

**basis** `string` *required*

Your stated basis for reading it.

**declared\_by** `string` *required*

The person who declared it, as your identity provider names them.

**declared\_at** `string` *required*

When, as an RFC 3339 moment.

**withdrawn** `boolean` *required*

Whether the attribute is closed to new policy versions.

**withdrawn\_by** `string`

Who withdrew it. Absent until it is withdrawn.

**withdrawn\_at** `string`

When it was withdrawn.

**withdrawal\_reason** `string`

The reason given.

## Refusals

| Status | Code | When |
| - | - | - |
| `401` | `unauthenticated` | The token is missing or cannot be used |
| `403` | `not_permitted_tenant` | Your organization does not act for the Tenancy in the path |
| `403` | `not_permitted_role` | The caller is not an administrator |
| `403` | `not_permitted_actor` | The caller is the agent |
| `400` | `malformed_request` | The body has an unknown field, a field stated twice, or more than one JSON value |
| `415` | `unsupported_media_type` | The body is not declared `application/json` |
| `409` | `declaration_exists` | The name is declared already |
| `413` | `body_too_large` | The body is longer than the route reads |
| `422` | `invalid_declaration` | The form is wrong; every finding is named |
| `422` | `lexicon` | A text contains a refused word |
| `422` | `declaration_withdrawn` | The name was withdrawn and cannot be declared again |
| `422` | `declaration_limit` | The Tenancy holds as many live declarations as the Platform admits |

Every refusal carries the [error shape](https://docs.capcells.com/api-reference/overview.md#the-error-shape). `429` and `503` answer as at the signing door.

```bash Request theme={null}
curl -X PUT https://api.capcells.com/console/v1/tenants/capyplazo/attribute-declarations/months_at_employer \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d @declaration.json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.