# 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

Name Value Required?
provider twlo (for Twilio SMS). No other providers supported yet. Yes
channel_key Channel key value from Profile & settings -> API Yes
from Phone number in E. 164 format e.g. +16175551212 Yes
name Customer name No
text Message text Yes

# Response

# HTTP status codes

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

# Response object

Name Value Description
status success or error -
errors Array of map { 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]"
}'