> For the complete documentation index, see [llms.txt](https://docs.mimiland.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mimiland.com/mimiland-core-services/social-and-friends/api-references/friends.md).

# Friends

Friend will include friend list, check friend with the user, or mute friend in the same chat room

### Common Parameters <a href="#utilizing-common-parameters" id="utilizing-common-parameters"></a>

| Key      | Type   | Description    |
| -------- | ------ | -------------- |
| friendId | String | id of the user |

## List Friends

Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /v1/friends/5/0 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 6552e9dd1f835ac7ca4ba3ec
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "6552e9dd1f835ac7ca4ba3ec");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/5/0", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## My Total Friend

Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /v1/friends/me/total HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const requestOptions = {
  method: "DELETE",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/650ad43dd995b4f348455ce5", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Total Friend

Request

{% tabs %}
{% tab title="HTTP" %}

```http
GET /v1/friends/total/d90c77f7 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI8
mm-user-id: 653263627f60e4b804d97d04
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/total/d90c77f7", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Friend Is

Request// Some code

{% tabs %}
{% tab title="HTTP" %}

```http
POST /v1/friends/is HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51

{
    "friendId": "6552e9dd1f835ac7ca4ba3ec",
    //"friendIdInWorld":"da8d4eb7"
    
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/total/d90c77f7", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Mute Friend

Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /v1/friends/mute HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51

{
    "friendId": "650ad48a7f60e4b804d96bcf"
    
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const raw = JSON.stringify({
  "friendId": "650ad48a7f60e4b804d96bcf"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/mute", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Unmute Friend

Request

{% tabs %}
{% tab title="HTTP" %}

```http
POST /v1/friends/unmute HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
Content-Length: 51

{
    "friendId": "656ff4c6e7d43c7ad3e1a1aa"
    
}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const raw = JSON.stringify({
  "friendId": "656ff4c6e7d43c7ad3e1a1aa"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/unmute", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}

## Unfriend

Request

{% tabs %}
{% tab title="HTTP" %}

```http
DELETE /v1/friends/650ad43dd995b4f348455ce5 HTTP/1.1
Host: friend-dev.api.mimiland.io
mm-client-id: mml
Content-Type: application/json
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
mm-user-id: 653263627f60e4b804d97d04
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("mm-user-id", "653263627f60e4b804d97d04");

const requestOptions = {
  method: "DELETE",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://friend-dev.api.mimiland.io/v1/friends/650ad43dd995b4f348455ce5", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

{% endtab %}
{% endtabs %}
