# \_setNextOfKin

Adds Next of Kin details for a User.

### Parameters

#### id

The ID of the User.

#### name

The type of detail to be set for the Next of Kin. This can be name, phone\_mobile, phone\_landline or address.

#### val

The value of the details to be set for the Next of Kin detail.

### Examples

#### name example

```
FM_api('User_setNextOfKin', ['id' => '82878', 'name' => 'name', 'val' => 'Test name']);
```

#### phone\_mobile example

```
FM_api('User_setNextOfKin', ['id' => '82878', 'name' => 'phone_mobile', 'val' => '07731623498']);
```

#### phone\_landline example

```
FM_api('User_setNextOfKin', ['id' => '82878', 'name' => 'phone_landline', 'val' => '02830242983']);
```

#### address example

```
FM_api('User_setNextOfKin', ['id' => '82878', 'name' => 'address', 'val' => '18 Test steet']);
```

### On Success

```
{"ok":1}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/user/_setnextofkin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
