#Save incoming message

Save a message in the inbox. You can use it to save a message received on an external platform or create a mock message with information you may need during the conversation.

#Method

POST

#Path

/incoming

#Body parameters

NameValueData typeRequired?
providertwlo (for Twilio SMS). No other providers supported yet.StringYes
channel_keyChannel key value from Profile & settings -> APIStringYes
fromPhone number starting with the country code with or without leading plus. e.g. +16175551212 or 16175551212StringYes
nameSender nameStringNo
textMessage textStringYes
media_urlPublicly accessible image, video or file URLStringNo
media_typeMIME type of the media (e.g., image/png, video/mp4, application/pdf, etc). List of common MIME typesStringOnly when media_url is present

#Response

#HTTP status codes

CodeRemarks
200Request was successful.
400Validation error or request body was incorrectly formatted.
401Authentication failed. Check apikey header.
404Requested API endpoint not found.
429The rate limit has been reached.
500-511There was a problem processing the request on our server. Try again later.

#Response object

NameValueRemarks
statussuccess or error-
errorsArray of object { msg: [error detail] }Only present when status is error.

#Code sample

curl --location --request POST 'https://api.sociocs.com/incoming' \ --header 'apikey: your_api_key' \ --header 'Content-Type: application/json' \ --data-raw '{ "provider": "[provider]", "channel_key": "[your channel key]", "from": "[phone number]", "name": "[sender name]", "text": "[message]" }'