# Sinch

> Send messages and manage contacts and conversations in the Sinch Conversation API.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/sinch

## Actions

### Create contact

Create contact.

**Inputs**

- Identities (`identities`, list, required): Each entry contains a channel and the contact’s identity on it.
- Language (`language`, text, required): Language used for the contact. One of: `AF`, `SQ`, `AR`, `AZ`, `BN`, `BG`, `CA`, `ZH`, `ZH_CN` (Zh cn), `ZH_HK` (Zh hk), and 60 more.
- Display name (`display_name`, text): Name shown for the contact.
- Email (`email`, text): Email address.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}
```

### Create conversation

Create conversation.

**Inputs**

- App (`app_id`, text, required): Choose the app or enter its ID.
- Contact ID (`contact_id`, text, required): Contact ID from List contacts.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Delete contact

Delete contact.

**Inputs**

- Contact ID (`contact_id`, text, required): Contact ID to delete.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

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

### Delete conversation

Delete conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID to delete.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

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

### Get app

Get app.

**Inputs**

- App (`app_id`, text, required): Choose the app or enter its ID.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}
```

### Get contact

Get contact.

**Inputs**

- Contact ID (`contact_id`, text, required): Contact ID from List contacts.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}
```

### Get conversation

Get conversation.

**Inputs**

- Conversation ID (`conversation_id`, text, required): Conversation ID from List conversations.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Get message

Get message.

**Inputs**

- Message ID (`message_id`, text, required): Message ID from List messages.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### List apps

List apps.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "apps": [
      {
        "display_name": "example",
        "id": "example"
      }
    ]
  }
}
```

### List contacts

List contacts.

**Inputs**

- Page size (`page_size`, number): Maximum records per page. From 1 to 100.
- Page token (`page_token`, text): Next page token from the preceding response.
- External ID (`external_id`, text): Find a contact by your external identifier.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "contacts": [
      {
        "display_name": "example",
        "id": "example"
      }
    ],
    "next_page_token": "example"
  }
}
```

### List conversations

List conversations.

**Inputs**

- Page size (`page_size`, number): Maximum records per page. From 1 to 100.
- Page token (`page_token`, text): Next page token from the preceding response.
- App (`app_id`, text): Choose an app or use its ID.
- Contact ID (`contact_id`, text): Filter by contact ID.
- Only active (`only_active`, true/false): Return only active conversations.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "conversations": [
      {
        "id": "example"
      }
    ],
    "next_page_token": "example",
    "total_size": 1
  }
}
```

### List messages

List messages.

**Inputs**

- Page size (`page_size`, number): Maximum records per page. From 1 to 100.
- Page token (`page_token`, text): Next page token from the preceding response.
- App (`app_id`, text): Choose an app or use its ID.
- Conversation ID (`conversation_id`, text): Filter by conversation ID.
- Contact ID (`contact_id`, text): Filter by contact ID.
- Direction (`direction`, text): Filter by message direction. One of: `TO_APP` (To app), `TO_CONTACT` (To contact).
- Start time (`start_time`, date and time): Earliest message time.
- End time (`end_time`, date and time): Latest message time.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "messages": [
      {
        "id": "example"
      }
    ],
    "next_page_token": "example"
  }
}
```

### Send text message

Send text message.

**Inputs**

- App (`app_id`, text, required): Choose the app to send the message.
- Contact ID (`contact_id`, text, required): ID of the recipient’s Sinch contact.
- Text (`text`, text, required): Text of the message.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "accepted_time": "example",
    "message_id": "example"
  }
}
```

### Update contact

Update contact.

**Inputs**

- Contact ID (`contact_id`, text, required): Contact ID from List contacts.
- Display name (`display_name`, text, required): New display name.

**Outputs**

- `data` (object): The response from Sinch.

**Example output**

```json
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}
```
