> For the complete documentation index, see [llms.txt](https://docs.amitysolutions.com/ekoai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amitysolutions.com/ekoai/getting-started/eko/client-menu/client-menu-api.md).

# Client Menu API

## Push Notification <a href="#push-notification" id="push-notification"></a>

### Push notification to target user ids with single payload <a href="#push-notification-to-target-user-ids-with-single-payload" id="push-notification-to-target-user-ids-with-single-payload"></a>

`POST` `https://h1.ekoapp.com/api/v1client-menus/:client-menu-id/push-notify/payload`

Send push notification to the target user ids with the same message payload

**Path Parameters**

| Name             | Type   | Description                  |
| ---------------- | ------ | ---------------------------- |
| client-menu-id\* | String | the unique id of client menu |

**Headers**

| Name            | Type   | Description                                               |
| --------------- | ------ | --------------------------------------------------------- |
| Authorization\* | String | `client-credential` access token with `client-menu` scope |

**Request Body**

| Name                  | Type      | Description                                                                                                                                                        |
| --------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| to\*                  | String\[] | target user id. Up to **1,000** are allowed in a single request                                                                                                    |
| payload\*             | Object    | push notification payload. maximum 4KB per payload                                                                                                                 |
| payload.title\*       | String    | push notification title                                                                                                                                            |
| payload.message\*     | String    | <p>push notification message.<br><br>Support template message with following properties <code>firstname</code>, <code>lastname</code>, and <code>email</code>.</p> |
| payload.redirectUri\* | String    | redirect uri to get into sub-page of client menu                                                                                                                   |

Status 200: OK

{% tabs %}
{% tab title="Request Example" %}

```json
{
    "to": [ "<TARGET_USER_ID>", ... ],
    "payload": {
        "redirectUri": "<REDIRECT_URI>",
        "title": "Title is here",
        "message": "What's up ${firstname} ${lastname}. How are you today?",
    }
}
```

{% endtab %}

{% tab title="Response Exmaple" %}

```json
{
    "referenceId": "<string>"
}
```

{% endtab %}
{% endtabs %}

### Push notification to target user ids with their own payload <a href="#push-notification-to-target-user-ids-with-their-own-payload" id="push-notification-to-target-user-ids-with-their-own-payload"></a>

`POST` `https://h1.ekoapp.com/api/v1/client-menus/:client-menu-id/push-notify/multiple-payload`

Send push notification to the target user ids with the difference message payload

**Path Parameters**

NameTypeDescription

client-menu-id\*

String

the unique id of client menu

**Headers**

NameTypeDescription

Authorization\*

String

`client-credential` access token with `client-menu` scope

**Request Body**

NameTypeDescription

\*.to\*

String

target user id. Up to **100** are allowed in a single request

\*.payload\*

Object

push notification payload. maximum 4KB per payload

\*.payload.title\*

String

push notification title

\*.payload.message\*

String

push notification message.

Support template message with following properties `firstname`, `lastname`, and `email`.

\*.payload.redirectUri\*

String

redirect uri to get into sub-page of client menu

200: OKRequest ExampleResponse ExmapleCopy

```
[
    {
        "to": "<TARGET_USER_ID>",
        "payload": {
            "redirectUri": "<REDIRECT_URI>",
            "title": "Title is here",
            "message": "What's up ${firstname} ${lastname}. How are you today?",
        }
    }
]
```

### Push notification to target user which under directory id <a href="#push-notification-to-target-user-which-under-directory-id" id="push-notification-to-target-user-which-under-directory-id"></a>

`POST` `https://h1.ekoapp.com/api/v1/client-menus/:client-menu-id/push-notify/directories`

**Path Parameters**

NameTypeDescription

client-menu-id\*

String

the client menu unique id

**Headers**

NameTypeDescription

Authorization\*

String

`client-credential` access token with `client-menu` scope

**Request Body**

NameTypeDescription

payload\*

object

push notification payload. maximum size 4KB

payload.title\*

String

push notification title

payload.message\*

String

push notification message

payload.redirectUri\*

String

redirect uri to get into sub-page of client menu

directoryIds\*

String\[]

target directory ids to send push notification. Up to **5** are allowed in a single requests

excludes

String\[]

A list of **User IDs** which don't want to send push notify to them in case of they are in the target recipients. Up to **1000** are allowed in a single request.

200: OKRequest ExampleResponse ExampleCopy

```
{
    "payload": {
        "redirectUri": "<REDIRECT_URI>",
        "title": "title here",
        "message": "What's up! How are you today."
    },
    "excludes": [
        "<USER_ID>",
        "<ANOTHER_USER_ID>"
    ],
    "directoryIds": [
        "<TARGET_DIRECTORY_ID>"
    ]
}
```

#### Push Notification Log <a href="#push-notification-log" id="push-notification-log"></a>

### Get push notification error log <a href="#get-push-notification-error-log" id="get-push-notification-error-log"></a>

`GET` `https://h1.ekoapp.com/api/v1/client-menus/push-notifications/:reference-id/users/:user-id`

**Path Parameters**

NameTypeDescription

reference-id\*

string

push notification reference id

user-id\*

string

target user id

**Headers**

NameTypeDescription

Authorization\*

String

`client-credential` access token with `client-menu` scope

200: OK Found the error log of particular user404: Not Found Not found any error log of particular userCopy

```
{
    "referenceId": "<REFERENCE_ID>",
    "userId": "<USER_ID>",
    "errorMessage": "Error message"
}
```

#### Clear Unread <a href="#clear-unread" id="clear-unread"></a>

### Clear unread indicator <a href="#clear-unread-indicator" id="clear-unread-indicator"></a>

`POST` `https://h1.ekoapp.com/api/v1/client-menus/:client-menu-id/clear-unread`

**Path Parameters**

NameTypeDescription

client-menu-id\*

String

the client menu unique id

**Headers**

NameTypeDescription

Authorization\*

String

`client-credential` access token with `client-menu` scope

**Request Body**

NameTypeDescription

userId\*

String

target user id

200: OKRequest ExampleResponse ExampleCopy

```
{
    "userId": "<TARGET_USER_ID>"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.amitysolutions.com/ekoai/getting-started/eko/client-menu/client-menu-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
