# InMoment

> Manage InMoment Microsurveys end users, responses, declines, survey preferences and NPS summaries.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/inmoment

## Actions

### Create decline

Create decline.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Ip address (`ip_address`, text, required): Ip address.
- Origin url (`origin_url`, text, required): Origin url.
- Created at (`created_at`, date and time): Created at.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "end_user_id": 1,
    "id": 1,
    "updated_at": "example"
  }
}
```

### Create end user

Create end user.

**Inputs**

- Email (`email`, text, required): Email.
- External id (`external_id`, text): External id.
- Properties (`properties`, object): Properties.
- Last surveyed (`last_surveyed`, date and time): Last surveyed.
- External created at (`external_created_at`, date and time): External created at.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Create response

Create response.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Score (`score`, number, required): Score. From 0 to 10.
- Ip address (`ip_address`, text, required): Ip address.
- Origin url (`origin_url`, text, required): Origin url.
- Text (`text`, text): Text.
- Created at (`created_at`, date and time): Created at.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "end_user_id": 1,
    "id": 1,
    "score": 1,
    "text": "example",
    "updated_at": "example"
  }
}
```

### Delete decline

Delete decline.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Decline id (`decline_id`, text, required): Decline id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Delete end user

Delete end user.

**Inputs**

- End user (`end_user_id`, text, required): End user id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Delete response

Delete response.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Response id (`response_id`, text, required): Response id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Find end user by email

Find end user by email.

**Inputs**

- Email (`email`, text, required): Email.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Find end user by external id

Find end user by external id.

**Inputs**

- External id (`external_id`, text, required): External id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Find end user by phone

Find end user by phone.

**Inputs**

- Phone number (`phone_number`, text, required): Phone number.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Get decline

Get decline.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Decline id (`decline_id`, text, required): Decline id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "end_user_id": 1,
    "id": 1,
    "updated_at": "example"
  }
}
```

### Get end user

Get end user.

**Inputs**

- End user (`end_user_id`, text, required): End user id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Get end user settings

Get end user settings.

**Inputs**

- End user (`end_user_id`, text, required): End user id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "email_nps": false,
    "mobile_nps": false,
    "web_nps": false
  }
}
```

### Get nps summary

Get nps summary.

**Inputs**

- Start date (`start_date`, date): Start date.
- End date (`end_date`, date): End date.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Get response

Get response.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Response id (`response_id`, text, required): Response id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "end_user_id": 1,
    "id": 1,
    "score": 1,
    "text": "example",
    "updated_at": "example"
  }
}
```

### List declines

List declines.

**Inputs**

- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List detractors responses

List detractors responses.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List end user declines

List end user declines.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List end user responses

List end user responses.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List end users

List end users.

**Inputs**

- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.
- Email (`email`, text): Email.
- Sort order (`sort_order`, text): Sort order. One of: `asc`, `desc`.
- Sort key (`sort_key`, text): Sort key. One of: `email`, `updated_at` (Updated at), `created_at` (Created at).
- Surveys disabled (`surveys_disabled`, true/false): Surveys disabled.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List passives responses

List passives responses.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List promoters responses

List promoters responses.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### List responses

List responses.

**Inputs**

- Page (`page`, number): Page. From 1 to 30. Default: `1`.
- Per page (`per_page`, number): Per page. From 1 to 50. Default: `25`.
- Created after (`created_after`, date and time): Created after.
- Created before (`created_before`, date and time): Created before.

**Outputs**

- `data` (list): Result.

**Example output**

```json
{
  "data": []
}
```

### Update end user

Update end user.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Email (`email`, text): Email.
- External id (`external_id`, text): External id.
- Properties (`properties`, object): Properties.
- Last surveyed (`last_surveyed`, date and time): Last surveyed.
- External created at (`external_created_at`, date and time): External created at.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "created_at": "example",
    "email": "example",
    "external_id": "example",
    "id": 1,
    "properties": {},
    "settings": {},
    "updated_at": "example"
  }
}
```

### Update end user settings

Update end user settings.

**Inputs**

- End user (`end_user_id`, text, required): End user id.
- Email nps (`email_nps`, true/false): Email nps.
- Mobile nps (`mobile_nps`, true/false): Mobile nps.
- Web nps (`web_nps`, true/false): Web nps.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```

### Update response

Update response.

**Inputs**

- Response id (`response_id`, text, required): Response id.
- Completed (`completed`, true/false): Completed.
- Excluded from calculations (`excluded_from_calculations`, true/false): Excluded from calculations.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {}
}
```
