Conversation API

Version 0

The Vonage Conversation API enables you to build conversation features where communication can take place across multiple mediums including IP Messaging, PSTN Voice, SMS and WebRTC Audio and Video. The context of the conversations is maintained though each communication event taking place within a conversation, no matter the medium.

OpenAPI-Spezifikation herunterladen

conversation

A conversation is a shared core component that Vonage APIs rely on. Conversations happen over multiple mediums and and can have associated Users through Memberships.

List conversations

Please note that not all data is available in the list endpoint. Once you've identified the conversation you need to work with, use the GET /conversations/:id endpoint to fetch all of the conversation details

gethttps://api.nexmo.com/v0.3/conversations

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Abfrage Parameter

date_start
string(dateTime)
Beispiel2018-01-01 10:00:00

Return the records that occurred after this point in time.

date_end
string(dateTime)
Beispiel2018-01-01 12:00:00

Return the records that occurred before this point in time.

page_size
number
Min1
Max100
Standard10
Beispiel10

Return this amount of records in the response

order
string
Standardasc

Return the records in ascending or descending order.

Muss eines der folgenden sein:ascdescASCDESC
cursor
string

The cursor to start returning results from.

You are not expected to provide this manually, but to follow the url provided in _links.next.href or _links.prev.href in the response which contains a cursor value.

Antworten
Inhalt Typ
application/json

OK

page_size
number
Erforderlich
Min1
Max100
Standard10
Beispiel10

The amount of records returned in this response

_embedded
object
Erforderlich

A list of conversation objects. See the get details of a specific conversation response fields for a description of the nested objects

conversations
array
Erforderlich

List of conversations matching the provided filter

id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

timestamp
object
created
string
Beispiel2019-09-03T18:40:24.324Z

The time that the conversation was created

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a
_links
object
Erforderlich

A series of links between resources in this API in the http://stateless.co/hal_specification.html.

first
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations?order=desc&page_size=10
self
object
Erforderlich
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
next
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
prev
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D

Beispiel Antwort

{
   "page_size": 10,
   "_embedded": {
      "conversations": [
         {
            "id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
            "name": "customer_chat",
            "display_name": "Customer Chat",
            "image_url": "https://example.com/image.png",
            "timestamp": {
               "created": "2019-09-03T18:40:24.324Z"
            },
            "_links": {
               "self": {
                  "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a"
               }
            }
         }
      ]
   },
   "_links": {
      "first": {
         "href": "https://api.nexmo.com/v0.3/conversations?order=desc&page_size=10"
      },
      "self": {
         "href": "https://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
      },
      "next": {
         "href": "https://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
      },
      "prev": {
         "href": "https://api.nexmo.com/v0.3/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
      }
   }
}

Create a conversation

posthttps://api.nexmo.com/v0.3/conversations

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Anfrage Körper
Inhalt Typ
application/json

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

properties
object

Conversation properties

ttl
number
Beispiel60

Time to leave. After how many seconds an empty conversation is deleted.

type
string
custom_data
object
numbers
array
Beispiel[ { "type": "phone", "number": "447700900000" }, { "type": "sip", "uri": "sip:+Htg:;xa", "username": "string", "password": "string" }, { "type": "app", "user": "string" }, { "type": "websocket", "uri": "ws://example.com:8080", "content_type": "string" }, { "type": "vbc", "extension": "447700900000" } ]

An array containing number on different channels.

callback
object
url
string(uri)
event_mask
string
params
object
applicationId
string
ncco_url
string(uri)
method
string
Muss eines der folgenden sein:POSTGET

Beispiel Anfrage

{
   "name": "customer_chat",
   "display_name": "Customer Chat",
   "image_url": "https://example.com/image.png",
   "properties": {
      "ttl": 60,
      "type": "string",
      "custom_data": {
         "property1": "string",
         "property2": "string"
      }
   },
   "numbers": [
      {
         "type": "phone",
         "number": "447700900000"
      },
      {
         "type": "sip",
         "uri": "sip:+Htg:;xa",
         "username": "string",
         "password": "string"
      },
      {
         "type": "app",
         "user": "string"
      },
      {
         "type": "websocket",
         "uri": "ws://example.com:8080",
         "content_type": "string"
      },
      {
         "type": "vbc",
         "extension": "447700900000"
      }
   ],
   "callback": {
      "url": "http://example.com",
      "event_mask": "string",
      "params": {
         "applicationId": "string",
         "ncco_url": "http://example.com"
      },
      "method": "POST"
   }
}

Antworten
Inhalt Typ
application/json

Created

id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

state
string
BeispielACTIVE

The state the conversation is in.

sequence_number
integer

The last Event ID in this conversation. This ID can be used to retrieve a specific event.

timestamp
object
created
string
Beispiel2019-09-03T18:40:24.324Z

The time that the conversation was created

properties
object

Conversation properties

ttl
number
Beispiel60

Time to leave. After how many seconds an empty conversation is deleted.

type
string
custom_data
object
numbers
object
_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

Beispiel Antwort

{
   "id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "name": "customer_chat",
   "display_name": "Customer Chat",
   "image_url": "https://example.com/image.png",
   "state": "ACTIVE",
   "sequence_number": 0,
   "timestamp": {
      "created": "2019-09-03T18:40:24.324Z"
   },
   "properties": {
      "ttl": 60,
      "type": "string",
      "custom_data": {
         "property1": "string",
         "property2": "string"
      }
   },
   "numbers": {},
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a"
      }
   }
}

Retrieve a conversation

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Antworten
Inhalt Typ
application/json

Retrieve a conversation

id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

state
string
BeispielACTIVE

The state the conversation is in.

sequence_number
integer

The last Event ID in this conversation. This ID can be used to retrieve a specific event.

timestamp
object
created
string
Beispiel2019-09-03T18:40:24.324Z

The time that the conversation was created

properties
object

Conversation properties

ttl
number
Beispiel60

Time to leave. After how many seconds an empty conversation is deleted.

type
string
custom_data
object
numbers
object
_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

Beispiel Antwort

{
   "id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "name": "customer_chat",
   "display_name": "Customer Chat",
   "image_url": "https://example.com/image.png",
   "state": "ACTIVE",
   "sequence_number": 0,
   "timestamp": {
      "created": "2019-09-03T18:40:24.324Z"
   },
   "properties": {
      "ttl": 60,
      "type": "string",
      "custom_data": {
         "property1": "string",
         "property2": "string"
      }
   },
   "numbers": {},
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a"
      }
   }
}

Update a conversation

puthttps://api.nexmo.com/v0.3/conversations/:conversation_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Anfrage Körper
Inhalt Typ
application/json

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

properties
object

Conversation properties

ttl
number
Beispiel60

Time to leave. After how many seconds an empty conversation is deleted.

type
string
custom_data
object
numbers
array
Beispiel[ { "type": "phone", "number": "447700900000" }, { "type": "sip", "uri": "sip:+Htg:;xa", "username": "string", "password": "string" }, { "type": "app", "user": "string" }, { "type": "websocket", "uri": "ws://example.com:8080", "content_type": "string" }, { "type": "vbc", "extension": "447700900000" } ]

An array containing number on different channels.

callback
object
url
string(uri)
event_mask
string
params
object
applicationId
string
ncco_url
string(uri)
method
string
Muss eines der folgenden sein:POSTGET

Beispiel Anfrage

{
   "name": "customer_chat",
   "display_name": "Customer Chat",
   "image_url": "https://example.com/image.png",
   "properties": {
      "ttl": 60,
      "type": "string",
      "custom_data": {
         "property1": "string",
         "property2": "string"
      }
   },
   "numbers": [
      {
         "type": "phone",
         "number": "447700900000"
      },
      {
         "type": "sip",
         "uri": "sip:+Htg:;xa",
         "username": "string",
         "password": "string"
      },
      {
         "type": "app",
         "user": "string"
      },
      {
         "type": "websocket",
         "uri": "ws://example.com:8080",
         "content_type": "string"
      },
      {
         "type": "vbc",
         "extension": "447700900000"
      }
   ],
   "callback": {
      "url": "http://example.com",
      "event_mask": "string",
      "params": {
         "applicationId": "string",
         "ncco_url": "http://example.com"
      },
      "method": "POST"
   }
}

Antworten
Inhalt Typ
application/json

Update a conversation

id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

state
string
BeispielACTIVE

The state the conversation is in.

sequence_number
integer

The last Event ID in this conversation. This ID can be used to retrieve a specific event.

timestamp
object
created
string
Beispiel2019-09-03T18:40:24.324Z

The time that the conversation was created

properties
object

Conversation properties

ttl
number
Beispiel60

Time to leave. After how many seconds an empty conversation is deleted.

type
string
custom_data
object
numbers
object
_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

Beispiel Antwort

{
   "id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "name": "customer_chat",
   "display_name": "Customer Chat",
   "image_url": "https://example.com/image.png",
   "state": "ACTIVE",
   "sequence_number": 0,
   "timestamp": {
      "created": "2019-09-03T18:40:24.324Z"
   },
   "properties": {
      "ttl": 60,
      "type": "string",
      "custom_data": {
         "property1": "string",
         "property2": "string"
      }
   },
   "numbers": {},
   "_links": {
      "self": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a"
      }
   }
}

Delete a conversation

deletehttps://api.nexmo.com/v0.3/conversations/:conversation_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Antworten

Success response with no content

user

The concept of a user exists in Vonage APIs, you can associate one with a user in your own application if you choose. A user can have multiple memberships to conversations and can communicate with other users through various different mediums.

List user conversations

Please note that not all data is available in the list endpoint. Once you've identified the conversation you need to work with, use the GET /conversations/:id endpoint to fetch all of the conversation details

gethttps://api.nexmo.com/v0.3/users/:user_id/conversations

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

user_id
string
Erforderlich

User ID

Abfrage Parameter

state
string
Muss eines der folgenden sein:INVITEDJOINEDLEFT
date_start
string(dateTime)
Beispiel2018-01-01 10:00:00

Return the records that occurred after this point in time.

page_size
number
Min1
Max100
Standard10
Beispiel10

Return this amount of records in the response

order
string
Standardasc

Return the records in ascending or descending order.

Muss eines der folgenden sein:ascdescASCDESC
cursor
string

The cursor to start returning results from.

You are not expected to provide this manually, but to follow the url provided in _links.next.href or _links.prev.href in the response which contains a cursor value.

Antworten
Inhalt Typ
application/json

OK

page_size
number
Erforderlich
Min1
Max100
Standard10
Beispiel10

The amount of records returned in this response

_embedded
object
Erforderlich

A list of conversation objects. See the get details of a specific conversation response fields for a description of the nested objects

conversations
array
Erforderlich

List of conversations matching the provided filter

id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

name
string
Max100
Beispielcustomer_chat

Your internal conversation name. Must be unique

display_name
string
BeispielCustomer Chat

The public facing name of the conversation

image_url
string(uri)
Max2048
Beispielhttps://example.com/image.png

An image URL that you associate with the conversation

timestamp
object
created
string
Beispiel2019-09-03T18:40:24.324Z

The time that the conversation was created

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a
_links
object
Erforderlich

A series of links between resources in this API in the http://stateless.co/hal_specification.html.

self
object
Erforderlich
first
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
next
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
prev
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D

Beispiel Antwort

{
   "page_size": 10,
   "_embedded": {
      "conversations": [
         {
            "id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
            "name": "customer_chat",
            "display_name": "Customer Chat",
            "image_url": "https://example.com/image.png",
            "timestamp": {
               "created": "2019-09-03T18:40:24.324Z"
            },
            "_links": {
               "self": {
                  "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a"
               }
            }
         }
      ]
   },
   "_links": {
      "self": {
         "first": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10"
         },
         "self": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         },
         "next": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         },
         "prev": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         }
      }
   }
}

List user sessions

gethttps://api.nexmo.com/v0.3/users/:user_id/sessions

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

user_id
string
Erforderlich

User ID

Abfrage Parameter

page_size
number
Min1
Max100
Standard10
Beispiel10

Return this amount of records in the response

order
string
Standardasc

Return the records in ascending or descending order.

Muss eines der folgenden sein:ascdescASCDESC
cursor
string

The cursor to start returning results from.

You are not expected to provide this manually, but to follow the url provided in _links.next.href or _links.prev.href in the response which contains a cursor value.

Antworten
Inhalt Typ
application/json

OK

page_size
number
Erforderlich
Min1
Max100
Standard10
Beispiel10

The amount of records returned in this response

_embedded
object

A list of session objects.

sessions
array

List of session matching the provided filter

id
string
Erforderlich
BeispielSES-63f61863-4a51-4f6b-86e1-46edebio0391
_embedded
object
Erforderlich
user
object
Erforderlich
id
string
Erforderlich
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Erforderlich
Beispielmy_user_name

Unique name for a user

api_key
string
properties
object
Erforderlich
ttl
number(float)
Erforderlich
_links
object

A series of links between resources in this API in the http://stateless.co/hal_specification.html.

self
object
Erforderlich
first
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
next
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D
prev
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D

Beispiel Antwort

{
   "page_size": 10,
   "_embedded": {
      "sessions": [
         {
            "id": "SES-63f61863-4a51-4f6b-86e1-46edebio0391",
            "_embedded": {
               "user": {
                  "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
                  "name": "my_user_name"
               },
               "api_key": "string"
            },
            "properties": {
               "ttl": 0
            }
         }
      ]
   },
   "_links": {
      "self": {
         "first": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10"
         },
         "self": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         },
         "next": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         },
         "prev": {
            "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/sessions?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D"
         }
      }
   }
}

member

Memberships connect users with conversations. Each membership has one conversation and one user however a user can have many memberships to conversations just as conversations can have many members.

List members

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id/members

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Abfrage Parameter

page_size
number
Min1
Max100
Standard10
Beispiel10

Return this amount of records in the response

order
string
Standardasc

Return the records in ascending or descending order.

Muss eines der folgenden sein:ascdescASCDESC
cursor
string

The cursor to start returning results from.

You are not expected to provide this manually, but to follow the url provided in _links.next.href or _links.prev.href in the response which contains a cursor value.

Antworten
Inhalt Typ
application/json

Members List Object

page_size
integer
Beispiel10

The number of results returned on this page

_embedded
object
members
array

List of members matching the provided filter

id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

state
string
BeispielLEFT

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
_embedded
object
user
object
id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

display_name
string
BeispielMy User Name

A string to be displayed as user name. It does not need to be unique

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec
_links
object
href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391

A link towards a member included in Conversation API

_links
object
first
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=88b395c167da4d94e929705cbd63b82973771e7d390d274a58e301386d5762600a3ffd799bfb3fc5190c5a0d124cdd0fc72fe6e450506b18e4e2edf9fe84c7a0
next
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=88b395c167da4d94e929705cbd63b829a650e69a39197bfd4c949f4243f60dc4babb696afa404d2f44e7775e32b967f2a1a0bb8fb259c0999ba5a4e501eaab55
prev
object
href
string
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=069626a3de11d2ec900dff5042197bd75f1ce41dafc3f2b2481eb9151086e59aae9dba3e3a8858dc355232d499c310fbfbec43923ff657c0de8d49ffed9f7edb

Beispiel Antwort

{
   "page_size": 10,
   "_embedded": {
      "members": [
         {
            "id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
            "state": "LEFT",
            "_embedded": {
               "user": {
                  "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
                  "name": "my_user_name",
                  "display_name": "My User Name",
                  "_links": {
                     "self": {
                        "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec"
                     }
                  }
               }
            },
            "_links": {
               "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
            }
         }
      ]
   },
   "_links": {
      "first": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10"
      },
      "self": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=88b395c167da4d94e929705cbd63b82973771e7d390d274a58e301386d5762600a3ffd799bfb3fc5190c5a0d124cdd0fc72fe6e450506b18e4e2edf9fe84c7a0"
      },
      "next": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=88b395c167da4d94e929705cbd63b829a650e69a39197bfd4c949f4243f60dc4babb696afa404d2f44e7775e32b967f2a1a0bb8fb259c0999ba5a4e501eaab55"
      },
      "prev": {
         "href": "https://api.nexmo.com/v0.3/conversations/CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a/members?order=desc&page_size=10&cursor=069626a3de11d2ec900dff5042197bd75f1ce41dafc3f2b2481eb9151086e59aae9dba3e3a8858dc355232d499c310fbfbec43923ff657c0de8d49ffed9f7edb"
      }
   }
}

Create a member

posthttps://api.nexmo.com/v0.3/conversations/:conversation_id/members

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Anfrage Körper
Inhalt Typ
application/json

state
string
Beispielinvited

Invite or join a member to a conversation

Muss eines der folgenden sein:invitedjoined
user
object

Either the user id or name is required.

id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

media
object

Media Object

knocking_id
string
Beispiela972836a-450f-35fa-156c-52a2ab5b7d25

Knocker ID. A knocker is a pre-member of a conversation who does not exist yet

member_id_inviting
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID of the member that sends the invitation

Beispiel Anfrage

{
   "state": "invited",
   "user": {
      "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
      "name": "my_user_name"
   },
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   },
   "media": {
      "audio_settings": {
         "enabled": false,
         "earmuffed": false,
         "muted": false
      }
   },
   "knocking_id": "a972836a-450f-35fa-156c-52a2ab5b7d25",
   "member_id_inviting": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
}

Antworten
Inhalt Typ
application/json

Create a member

id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

conversation_id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

_embedded
object
user
object
id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

display_name
string
BeispielMy User Name

A string to be displayed as user name. It does not need to be unique

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec
state
string
Beispiel[ "LEFT", "INVITED" ]

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
object
invited
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

joined
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

left
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

initiator
object
joined
object
isSystem
boolean

true if the user was invited by an admin JWT. user_id and member_id will not exist if true

user_id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

member_id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

media
object
Beispiel{ "audio_settings": { "enabled": false, "earmuffed": false, "muted": false } }

Media Object

_links
object
href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391

A link towards a member included in Conversation API

Beispiel Antwort

{
   "id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "conversation_id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "_embedded": {
      "user": {
         "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "name": "my_user_name",
         "display_name": "My User Name",
         "_links": {
            "self": {
               "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec"
            }
         }
      }
   },
   "state": "INVITED",
   "timestamp": {
      "invited": "2020-01-01T14:00:00.00Z",
      "joined": "2020-01-01T14:00:00.00Z",
      "left": "2020-01-01T14:00:00.00Z"
   },
   "initiator": {
      "joined": {
         "isSystem": true,
         "user_id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "member_id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
      }
   },
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   },
   "media": {
      "audio_settings": {
         "enabled": false,
         "earmuffed": false,
         "muted": false
      }
   },
   "_links": {
      "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
   }
}

Retrieve yourself in a given conversation

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id/members/me

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Antworten
Inhalt Typ
application/json

Retrieve member payload

id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

conversation_id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

_embedded
object
user
object
id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

display_name
string
BeispielMy User Name

A string to be displayed as user name. It does not need to be unique

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec
state
string
Beispiel[ "LEFT", "JOINED" ]

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
object
invited
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

joined
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

left
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

initiator
object
joined
object
isSystem
boolean

true if the user was invited by an admin JWT. user_id and member_id will not exist if true

user_id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

member_id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

media
object
Beispiel{ "audio_settings": { "enabled": false, "earmuffed": false, "muted": false } }

Media Object

_links
object
href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391

A link towards a member included in Conversation API

Beispiel Antwort

{
   "id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "conversation_id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "_embedded": {
      "user": {
         "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "name": "my_user_name",
         "display_name": "My User Name",
         "_links": {
            "self": {
               "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec"
            }
         }
      }
   },
   "state": "JOINED",
   "timestamp": {
      "invited": "2020-01-01T14:00:00.00Z",
      "joined": "2020-01-01T14:00:00.00Z",
      "left": "2020-01-01T14:00:00.00Z"
   },
   "initiator": {
      "joined": {
         "isSystem": true,
         "user_id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "member_id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
      }
   },
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   },
   "media": {
      "audio_settings": {
         "enabled": false,
         "earmuffed": false,
         "muted": false
      }
   },
   "_links": {
      "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
   }
}

Retrieve a member

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id/members/:member_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

member_id
string
Erforderlich

Member ID

Antworten
Inhalt Typ
application/json

Retrieve member payload

id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

conversation_id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

_embedded
object
user
object
id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

display_name
string
BeispielMy User Name

A string to be displayed as user name. It does not need to be unique

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec
state
string
Beispiel[ "LEFT", "JOINED" ]

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
object
invited
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

joined
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

left
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

initiator
object
joined
object
isSystem
boolean

true if the user was invited by an admin JWT. user_id and member_id will not exist if true

user_id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

member_id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

media
object
Beispiel{ "audio_settings": { "enabled": false, "earmuffed": false, "muted": false } }

Media Object

_links
object
href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391

A link towards a member included in Conversation API

Beispiel Antwort

{
   "id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "conversation_id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "_embedded": {
      "user": {
         "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "name": "my_user_name",
         "display_name": "My User Name",
         "_links": {
            "self": {
               "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec"
            }
         }
      }
   },
   "state": "JOINED",
   "timestamp": {
      "invited": "2020-01-01T14:00:00.00Z",
      "joined": "2020-01-01T14:00:00.00Z",
      "left": "2020-01-01T14:00:00.00Z"
   },
   "initiator": {
      "joined": {
         "isSystem": true,
         "user_id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "member_id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
      }
   },
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   },
   "media": {
      "audio_settings": {
         "enabled": false,
         "earmuffed": false,
         "muted": false
      }
   },
   "_links": {
      "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
   }
}

Update a member

Setting the state to left will result in the member leaving the conversation.

patchhttps://api.nexmo.com/v0.3/conversations/:conversation_id/members/:member_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

member_id
string
Erforderlich

Member ID

Anfrage Körper
Inhalt Typ
application/json

state
string
Beispieljoined
Muss eines der folgenden sein:joinedleft
channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

Beispiel Anfrage

{
   "state": "joined",
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   }
}

Antworten
Inhalt Typ
application/json

Member updated

id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

conversation_id
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

_embedded
object
user
object
id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

name
string
Beispielmy_user_name

Unique name for a user

display_name
string
BeispielMy User Name

A string to be displayed as user name. It does not need to be unique

_links
object
self
object
href
string
Beispielhttps://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec
state
string
Beispiel[ "LEFT", "JOINED" ]

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
object
invited
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

joined
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

left
string
Beispiel2020-01-01T14:00:00.00Z

Timestamp

initiator
object
joined
object
isSystem
boolean

true if the user was invited by an admin JWT. user_id and member_id will not exist if true

user_id
string
BeispielUSR-82e028d9-5201-4f1e-8188-604b2d3471ec

User ID

member_id
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

channel
object

A user who joins a conversation as a member can have one channel per membership type. Channels can be app, phone, sip, websocket, or vbc

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

from
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

to
Einer der
type
string
Erforderlich
Beispielapp

The type of connection. Must be app

user
string
Erforderlich
Beispieljamie

The username to connect to

leg_ids
array

Leg ids associated with this Channel. The first item in the array represents the main active Leg. The second item, if exists, represents a screen-share Leg.

leg_id
string
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

media
object
Beispiel{ "audio_settings": { "enabled": false, "earmuffed": false, "muted": false } }

Media Object

_links
object
href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391

A link towards a member included in Conversation API

Beispiel Antwort

{
   "id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "conversation_id": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
   "_embedded": {
      "user": {
         "id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "name": "my_user_name",
         "display_name": "My User Name",
         "_links": {
            "self": {
               "href": "https://api.nexmo.com/v0.3/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec"
            }
         }
      }
   },
   "state": "JOINED",
   "timestamp": {
      "invited": "2020-01-01T14:00:00.00Z",
      "joined": "2020-01-01T14:00:00.00Z",
      "left": "2020-01-01T14:00:00.00Z"
   },
   "initiator": {
      "joined": {
         "isSystem": true,
         "user_id": "USR-82e028d9-5201-4f1e-8188-604b2d3471ec",
         "member_id": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
      }
   },
   "channel": {
      "type": "phone",
      "leg_id": "a595959595959595995",
      "from": {
         "type": "app",
         "user": "jamie"
      },
      "to": {
         "type": "app",
         "user": "jamie"
      },
      "leg_ids": [
         {
            "leg_id": "a595959595959595995"
         }
      ]
   },
   "media": {
      "audio_settings": {
         "enabled": false,
         "earmuffed": false,
         "muted": false
      }
   },
   "_links": {
      "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/members/MEM-63f61863-4a51-4f6b-86e1-46edebio0391"
   }
}

event

Events are actions that occur within a conversation. Examples of this includes: Text events from members, or invite events from users

List events

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id/events

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Abfrage Parameter

page_size
number
Min1
Max100
Standard10
Beispiel10

Return this amount of records in the response

order
string
Standardasc

Return the records in ascending or descending order.

Muss eines der folgenden sein:ascdescASCDESC
cursor
string

The cursor to start returning results from.

You are not expected to provide this manually, but to follow the url provided in _links.next.href or _links.prev.href in the response which contains a cursor value.

start_id
string

The ID to start returning events at

end_id
string

The ID to end returning events at

event_type
string

The type of event to search for. Does not currently support custom events

Antworten
Inhalt Typ
application/json

Retrieve Events Response Payload Object

page_size
integer
Erforderlich
Beispiel10

The number of results returned on this page.

_embedded
object
Erforderlich
events
array

List of events matching the provided filter

id
string
Erforderlich
Beispiel5

Event id. This is a progressive integer

type
string
Erforderlich
Beispieltext

Event type

from
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

to
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

body
object
Erforderlich
Beispiel{ "text": "My Text" }

Event Body

state
string
BeispielLEFT

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
string
Erforderlich
Beispiel2020-01-01T14:00:00.00Z

Time of creation

href
string(url)
Erforderlich
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1

A link towards a conversation event included in Conversation API

_links
object
Erforderlich
first
object
href
string
Beispielhttps://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10
self
object
Erforderlich
href
string
Beispielhttps://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=a30e3b7a3dcda1434f64bbb1a5fa489b
next
object
href
string
Beispielhttps://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=4db03d9254d1cdaecc7b1fc15b6bf1a81f3d3151191d784f1327893f8dc96416
prev
object
href
string
Beispielhttps://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=84963f79fd25785be9706bd38bfd30c264f71964fa4edc8d8b4dd5f30bbd9f7c

Beispiel Antwort

{
   "page_size": 10,
   "_embedded": {
      "events": [
         {
            "id": "5",
            "type": "text",
            "from": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
            "to": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
            "body": {
               "text": "My Text"
            },
            "state": "LEFT",
            "timestamp": "2020-01-01T14:00:00.00Z",
            "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1"
         }
      ]
   },
   "_links": {
      "first": {
         "href": "https://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10"
      },
      "self": {
         "href": "https://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=a30e3b7a3dcda1434f64bbb1a5fa489b"
      },
      "next": {
         "href": "https://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=4db03d9254d1cdaecc7b1fc15b6bf1a81f3d3151191d784f1327893f8dc96416"
      },
      "prev": {
         "href": "https://api.nexmo.com/v0.2/conversations/CON-92a44c64-7e4e-485f-a0c4-1f2adfc44625/events?page_size=10&cursor=84963f79fd25785be9706bd38bfd30c264f71964fa4edc8d8b4dd5f30bbd9f7c"
      }
   }
}

Create an event

posthttps://api.nexmo.com/v0.3/conversations/:conversation_id/events

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

Anfrage Körper
Inhalt Typ
application/json

type
string
Erforderlich
Beispieltext

Event type

to
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

from
string
Erforderlich
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

body
object
Beispiel{ "text": "My Text" }

Event Body

Beispiel Anfrage

{
   "type": "text",
   "to": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "from": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "body": {
      "text": "My Text"
   }
}

Antworten
Inhalt Typ
application/json

Create New Event Response Payload Object

id
string
Beispiel5

Event id. This is a progressive integer

timestamp
string
Beispiel2020-01-01T14:00:00.00Z

Time of event creation

href
string(url)
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1

A link towards a conversation event included in Conversation API

Beispiel Antwort

{
   "id": "5",
   "timestamp": "2020-01-01T14:00:00.00Z",
   "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1"
}

Retrieve an event

gethttps://api.nexmo.com/v0.3/conversations/:conversation_id/events/:event_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

event_id
string
Erforderlich

Event ID

Antworten
Inhalt Typ
application/json

Retrieve an event Content Payload

id
string
Erforderlich
Beispiel5

Event id. This is a progressive integer

type
string
Erforderlich
Beispieltext

Event type

from
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

to
string
BeispielMEM-63f61863-4a51-4f6b-86e1-46edebio0391

Member ID

body
object
Erforderlich
Beispiel{ "text": "My Text" }

Event Body

state
string
BeispielLEFT

The state that the member is in. Possible values are INVITED, JOINED, LEFT, or UNKNOWN

Muss eines der folgenden sein:INVITEDJOINEDLEFTUNKNOWN
timestamp
string
Erforderlich
Beispiel2020-01-01T14:00:00.00Z

Time of creation

href
string(url)
Erforderlich
Beispielhttps://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1

A link towards a conversation event included in Conversation API

Beispiel Antwort

{
   "id": "5",
   "type": "text",
   "from": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "to": "MEM-63f61863-4a51-4f6b-86e1-46edebio0391",
   "body": {
      "text": "My Text"
   },
   "state": "LEFT",
   "timestamp": "2020-01-01T14:00:00.00Z",
   "href": "https://api.nexmo.com/v0.3/conversations/CON-63f61863-4a51-4f6b-86e1-46edebio0391/events/1"
}

Delete an event

deletehttps://api.nexmo.com/v0.3/conversations/:conversation_id/events/:event_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

conversation_id
string
Erforderlich

Conversation ID

event_id
string
Erforderlich

Event ID

Antworten
Inhalt Typ
application/json

Success response with empty JSON

Beispiel Antwort

{}

leg

A leg can be a video call, IP call, or PSTN call that users participate in using multiple platforms. With this endpoint you can retrieve the details about all of the legs that took place in your application.

Verfügbare Operationen

List legs

gethttps://api.nexmo.com/v0.3/legs

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Antworten
Inhalt Typ
application/json

List Legs Successfully

count
number
Erforderlich
Beispiel100

The total number of records returned by your request.

page_size
number
Erforderlich
Min1
Max100
Standard10
Beispiel10

The amount of records returned in this response

record_index
number
Erforderlich

Return page_size amount of conversations from this index in the response. That is, if your request returns 300 conversations, set record_index to 5 in order to return conversations 50 to 59. The default value is 0. That is, the first page_size calls.

_links
object
Erforderlich
self
object
Erforderlich
href
string
_embedded
object
Erforderlich

A list of conversation objects. See the get details of a specific conversation response fields for a description of the nested objects

legs
array
Erforderlich
uuid
string
Erforderlich
Beispiela595959595959595995

The id of the leg. rtc_id and call_id are leg id

type
string
Beispielphone

Channel type

Muss eines der folgenden sein:appphonesipwebsocketvbc
conversation_uuid
string
BeispielCON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a

The unique identifier for this conversation

state
string
Beispielterminated

Leg Status

Muss eines der folgenden sein:terminated
from
object
to
object
start_time
string
Beispiel2020-01-01T14:00:00.00Z

Time of leg start

start_end
string
Beispiel2020-01-01T14:00:00.00Z

Time of leg end

_links
object
_embedded
object

Beispiel Antwort

{
   "count": "100",
   "page_size": 10,
   "record_index": 0,
   "_links": {
      "self": {
         "href": "string"
      }
   },
   "_embedded": {
      "legs": [
         {
            "uuid": "a595959595959595995",
            "type": "phone",
            "conversation_uuid": "CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a",
            "state": "terminated",
            "from": {},
            "to": {},
            "start_time": "2020-01-01T14:00:00.00Z",
            "start_end": "2020-01-01T14:00:00.00Z",
            "_links": {},
            "_embedded": {}
         }
      ]
   }
}

Delete a leg

deletehttps://api.nexmo.com/v0.3/legs/:leg_id

Authentifizierung

SchlüsselBeschreibungWoBeispiel
Authorization

Ihr JSON-Web-Token.
Lesen Sie mehr über JWTs

Headers

Bearer <JWT>

Pfad Parameter

leg_id
string
Erforderlich

Leg ID

Antworten
Inhalt Typ
application/json

Success response with empty JSON

Beispiel Antwort

{}