# Register an inbound capture address on a tenant-owned domain.

`POST /api/plugins/docs/inbound-addresses`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

Schema: [CreateDocumentInboundAddressDTO](https://sourcey-gauzy.pages.dev/api-reference/models/createdocumentinboundaddressdto/index.md)

- `organizationId` (optional)
  Type: string

- `kind` (required)
  Type: string
  
  enum: ["PLATFORM","CUSTOM_DOMAIN"]

- `domain` (optional)
  Type: string

- `localPart` (optional)
  Type: string

- `senderAllowlist` (optional)
  Type: array
  
  Items:
    Type: string

- `importBodyAsNote` (optional)
  Type: boolean

Responses:

- 201: Address created; verification pending.

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/plugins/docs/inbound-addresses' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "organizationId": "string",
  "kind": "PLATFORM",
  "domain": "string",
  "localPart": "string",
  "senderAllowlist": [
    "string"
  ],
  "importBodyAsNote": true
}'
```

### JavaScript

```javascript
const body = `{
  "organizationId": "string",
  "kind": "PLATFORM",
  "domain": "string",
  "localPart": "string",
  "senderAllowlist": [
    "string"
  ],
  "importBodyAsNote": true
}`;

const response = await fetch('http://localhost:3000/api/plugins/docs/inbound-addresses', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "organizationId": "string",
  "kind": "PLATFORM",
  "domain": "string",
  "localPart": "string",
  "senderAllowlist": [
    "string"
  ],
  "importBodyAsNote": true
}'''

response = requests.post(
    'http://localhost:3000/api/plugins/docs/inbound-addresses',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
