Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This API allows you to receive / send a message to a contact and also receive the entire history of correspondence with the selected contact.

Sending.

Allows you to send a message to a contact (with the ability to select a channel).

 

POST https://api.smartsender.com/v1/contacts/{contactId}/send

 

Параметры URL:

Name

Description

contactId

Contact ID


Main parameters:

Name

Description

Validation

type

Message type

Available types

  • file

  • location

  • picture

  • voice

  • text

  • video

  • audio

  • contact

  • animation

watermark

Message priority timestamp (default, use current timestamp)

Timestamp

media

Attachment URL

Mandatory if media message. If the type does not match the file format, it will be sent as a “document”

title

Place name

Mandatory if location type

latitude

Width

Mandatory if location type

longitude

Longitude

Mandatory if location type

content

Text

Required if type is text

fullName

Full name

Required if type is contact

phoneNumber

Phone number

Required if type is contact

 
In case of a successful response, get an object of type Message.


Receipt (via contact).

Allows you to receive a message through a contact.

 

GET https://api.smartsender.com/v1/contacts/{contactId}/messages

 


Main parameters:

Name

Description

Validation

page

Requested Page

Minimum value 1

limitation

Amount of data to display per page

Minimum value 1, maximum 20

 
In case of a successful response, you will receive the following:

 

{
    "cursor": Cursor,
    "collection": Message[]
}

 

Answer description:

Name

Description

cursor

Cursor object

collection

Array of Message objects

 


Receiving (via chat).

Allows you to receive a message via chat.

 

GET https://api.smartsender.com/v1/chats/{chatId}/messages

 


Main parameters:

Name

Description

Validation

page

Requested Page

Minimum value 1

limitation

Amount of data to display per page

Minimum value 1, maximum 20

 
In case of a successful response, you will receive the following:

 

{
    "cursor": Cursor,
    "collection": Message[]
}

 

Answer description:

Name

Description

cursor

Cursor object

collection

Array of Message objects

  • No labels