# Default interactions

## Get Welcome Interaction

Returns Welcome Interaction object.

GET https://api.chatbot.com/stories/:storyID/interactions/welcome

#### Request URL

```
curl --request GET \
\t--url https://api.chatbot.com/stories/:storyID/interactions/welcome \
\t--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'
```

#### Response example

```
{
    "name": "Welcome Interaction",
    "responses": [\
        {\
            "type": "text",
            "filters": [],\
            "elements": [\
                "Hi",
                "Hello",
                "What can I do for you?",
                "Have a great day!"
            ]\
        }\
    ],
    "enabled": true
}
```

#### Properties

| Property | Type | Description |
| --- | --- | --- |
| `name` | String | Interaction name. |
| [`responses`](https://www.chatbot.com/docsv1/default-interactions/#responses) | Array.< [Object](https://www.chatbot.com/docsv1/default-interactions/#responses) > | An array of [response](https://www.chatbot.com/docsv1/default-interactions/#responses) objects. |
| `enabled` | Boolean | Indicates whether the welcome interaction is enabled or not. |

## Update Welcome Interaction

Updates the specified Welcome Interaction.

PUT https://api.chatbot.com/stories/:storyID/interactions/welcome

#### Request URL

```
curl --request PUT \
\t--url https://api.chatbot.com/stories/:storyID/interactions/welcome \
\t--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
\t--header 'content-type: application/json'
```

#### Properties

| Property | Type | Description |
| --- | --- | --- |
| [`responses`](https://www.chatbot.com/docsv1/default-interactions/#responses) | Array.< [Object](https://www.chatbot.com/docsv1/default-interactions/#responses) > | An array of [response](https://www.chatbot.com/docsv1/default-interactions/#responses) objects. |
| `enabled` | Boolean | **Required.** Indicates whether the welcome interaction is enabled or not. |

#### Response example

```
{
    "timestamp": "2018-01-24T10:58:31.612Z",
    "status": {
        "code": 200,
        "type": "success"
    }
}
```

## Get Fallback Interaction

Returns Fallback Interaction object.

GET https://api.chatbot.com/stories/:storyID/interactions/fallback

#### Request URL

```
curl --request GET \
\t--url https://api.chatbot.com/stories/:storyID/interactions/fallback \
\t--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}'
```

#### Response example

```
{
    "name": "Fallback Interaction",
    "responses": [\
        {\
            "type": "text",
            "filters": [],\
            "elements": [\
                "One more time?",
                "What was that?",
                "I missed what you said. Say it again?",
                "I don't understand, can you repeat?"
            ]\
        }\
    ],
    "enabled": true
}
```

#### Properties

| Property | Type | Description |
| --- | --- | --- |
| `name` | String | Interaction name. |
| [`responses`](https://www.chatbot.com/docsv1/default-interactions/#responses) | Array.< [Object](https://www.chatbot.com/docsv1/default-interactions/#responses) > | An array of [response](https://www.chatbot.com/docsv1/default-interactions/#responses) objects. |
| `enabled` | Boolean | Indicates whether the Fallback Interaction is enabled or not. |

## Update Fallback Interaction

Updates the specified Fallback Interaction.

PUT https://api.chatbot.com/stories/:storyID/interactions/fallback

#### Request URL

```
curl --request PUT \
\t--url https://api.chatbot.com/stories/:storyID/interactions/fallback \
\t--header 'authorization: Bearer ${DEVELOPER_ACCESS_TOKEN}' \
\t--header 'content-type: application/json'
```

#### Properties

| Property | Type | Description |
| --- | --- | --- |
| [`responses`](https://www.chatbot.com/docsv1/default-interactions/#responses) | Array.< [Object](https://www.chatbot.com/docsv1/default-interactions/#responses) > | An array of [response](https://www.chatbot.com/docsv1/default-interactions/#responses) objects. |
| `enabled` | Boolean | **Required.** Indicates whether the Fallback Interaction is enabled or not. |

#### Response example

```
{
    "timestamp": "2018-01-24T10:58:31.612Z",
    "status": {
        "code": 200,
        "type": "success"
    }
}
```

## Object definitions

#### `responses`

Go to [object definition](https://www.chatbot.com/docs/object-definitions/#response).

Possible response definitions:

- [Text response](https://www.chatbot.com/docs/object-definitions/#text-response)
- [Image response](https://www.chatbot.com/docs/object-definitions/#image-response)
- [Quick replies](https://www.chatbot.com/docs/object-definitions/#quick-replies)
- [Card](https://www.chatbot.com/docs/object-definitions/#card-response)
- [Cards](https://www.chatbot.com/docs/object-definitions/#cards-response)
- [Button response](https://www.chatbot.com/docs/object-definitions/#button-response)
- [End response](https://www.chatbot.com/docs/object-definitions/#end-response)
- [Webhook response](https://www.chatbot.com/docs/object-definitions/#webhook-response)
- [Go to response](https://www.chatbot.com/docs/object-definitions/#go-to-response)
