Sinch

App · 14 actions

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

Actions

ActionWhat it does
Create contactCreate contact.
Create conversationCreate conversation.
Delete contactDelete contact.
Delete conversationDelete conversation.
Get appGet app.
Get contactGet contact.
Get conversationGet conversation.
Get messageGet message.
List appsList apps.
List contactsList contacts.
List conversationsList conversations.
List messagesList messages.
Send text messageSend text message.
Update contactUpdate contact.

Create contact

Create contact.

Inputs

IdentitiesidentitieslistRequired
Each entry contains a channel and the contact’s identity on it.
LanguagelanguagetextRequired
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 namedisplay_nametext
Name shown for the contact.
Emailemailtext
Email address.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}

Create conversation

Create conversation.

Inputs

Appapp_idtextRequired
Choose the app or enter its ID.
Contact IDcontact_idtextRequired
Contact ID from List contacts.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "id": "example"
  }
}

Delete contact

Delete contact.

Inputs

Contact IDcontact_idtextRequired
Contact ID to delete.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {}
}

Delete conversation

Delete conversation.

Inputs

Conversation IDconversation_idtextRequired
Conversation ID to delete.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {}
}

Get app

Get app.

Inputs

Appapp_idtextRequired
Choose the app or enter its ID.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}

Get contact

Get contact.

Inputs

Contact IDcontact_idtextRequired
Contact ID from List contacts.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}

Get conversation

Get conversation.

Inputs

Conversation IDconversation_idtextRequired
Conversation ID from List conversations.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "id": "example"
  }
}

Get message

Get message.

Inputs

Message IDmessage_idtextRequired
Message ID from List messages.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "id": "example"
  }
}

List apps

List apps.

Inputs

None.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "apps": [
      {
        "display_name": "example",
        "id": "example"
      }
    ]
  }
}

List contacts

List contacts.

Inputs

Page sizepage_sizenumber
Maximum records per page.From 1 to 100.
Page tokenpage_tokentext
Next page token from the preceding response.
External IDexternal_idtext
Find a contact by your external identifier.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "contacts": [
      {
        "display_name": "example",
        "id": "example"
      }
    ],
    "next_page_token": "example"
  }
}

List conversations

List conversations.

Inputs

Page sizepage_sizenumber
Maximum records per page.From 1 to 100.
Page tokenpage_tokentext
Next page token from the preceding response.
Appapp_idtext
Choose an app or use its ID.
Contact IDcontact_idtext
Filter by contact ID.
Only activeonly_activetrue/false
Return only active conversations.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "conversations": [
      {
        "id": "example"
      }
    ],
    "next_page_token": "example",
    "total_size": 1
  }
}

List messages

List messages.

Inputs

Page sizepage_sizenumber
Maximum records per page.From 1 to 100.
Page tokenpage_tokentext
Next page token from the preceding response.
Appapp_idtext
Choose an app or use its ID.
Conversation IDconversation_idtext
Filter by conversation ID.
Contact IDcontact_idtext
Filter by contact ID.
Directiondirectiontext
Filter by message direction.One of: TO_APP (To app), TO_CONTACT (To contact).
Start timestart_timedate and time
Earliest message time.
End timeend_timedate and time
Latest message time.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "messages": [
      {
        "id": "example"
      }
    ],
    "next_page_token": "example"
  }
}

Send text message

Send text message.

Inputs

Appapp_idtextRequired
Choose the app to send the message.
Contact IDcontact_idtextRequired
ID of the recipient’s Sinch contact.
TexttexttextRequired
Text of the message.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "accepted_time": "example",
    "message_id": "example"
  }
}

Update contact

Update contact.

Inputs

Contact IDcontact_idtextRequired
Contact ID from List contacts.
Display namedisplay_nametextRequired
New display name.

Outputs

dataobject
The response from Sinch.
Example output
{
  "data": {
    "display_name": "example",
    "id": "example"
  }
}

On this page