# AddRestrictionInput (/api/reference/inputs/add-restriction-input)

A do-not-contact rule to set. Give exactly one of `personId` and `companyId`.

```graphql
input AddRestrictionInput {
  companyId: ID
  kind: RestrictionKind!
  personId: ID
  reason: String
  setById: ID
  source: RestrictionSource
  until: Date
}
```

### Fields [#fields]

#### [`AddRestrictionInput.companyId`](#company-id) · [`ID`](/api/reference/scalars/id) `scalar` [#company-id]
The company the rule is on.

#### [`AddRestrictionInput.kind`](#kind) · [`RestrictionKind!`](/api/reference/enums/restriction-kind) `non-null` `enum` [#kind]
What must not be done.

#### [`AddRestrictionInput.personId`](#person-id) · [`ID`](/api/reference/scalars/id) `scalar` [#person-id]
The person the rule is on.

#### [`AddRestrictionInput.reason`](#reason) · [`String`](/api/reference/scalars/string) `scalar` [#reason]
Why, in words. 10,000 characters at most.

#### [`AddRestrictionInput.setById`](#set-by-id) · [`ID`](/api/reference/scalars/id) `scalar` [#set-by-id]
The member who set it, when that is not the caller. The caller, when left out. Must be a member of this workspace.

#### [`AddRestrictionInput.source`](#source) · [`RestrictionSource`](/api/reference/enums/restriction-source) `enum` [#source]
Where the rule came from.

#### [`AddRestrictionInput.until`](#until) · [`Date`](/api/reference/scalars/date) `scalar` [#until]
The last day it holds. Left out, it has no end.

### Member Of [#member-of]

[`addRestriction`](/api/reference/mutations/add-restriction)  `mutation`