> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/notificationtype/_copy.md).

# \_copy

Copies an existing Notification Type.

### Parameters

#### id

The ID of the Notification to be copied.

#### name

The name of the new copy of the Notification.

### Example

```
FM_api('NotificationType_copy',[
  'id'=>'360001',
  'name'=>'notification copy test'
  ]
);
```

### Results

#### On Success

```
{"ok":1,"id":390008}
```

#### On Failure

If the "id" parameter is not set:

```
{"error":"missing parameter: id"}
```

If the "name" parameter is not set:

```
{"error":"missing parameter: name"}
```

If the "id" parameter does not have an integer value:

```
{"error":"invalid id parameter"}
```

If the "name" parameter does not have a value after being trimmed:

```
{"error":"no name parameter"}
```

If there is already a Notification Type with the same name as the "name" parameter:

```
{"error":"A notification - email of that name already exists"}
```

If the "id" parameter does not match the ID of an existing Notification Type to be copied:

```
{"error":"invalid id parameter: Notification - Email could not be copied"}
```
