Incoming webhook

POST /api/webhooks/:webhook_identifier/:webhook_secret
create a new message in your tenant using an integration setup on a group

Success Response Code: 204

Params

Param name Description
webhook_identifier
optional

The identifier for your integration. This will be provided when setting up the integration on the group


Value: Must be a String
webhook_secret
optional

The secret for your integration. This will be provided when setting up the integration on the group


Value: Must be a String
message
required

Value: Must be a Hash
message[body]
required

message body


Value: Must be a String
message[attachment]
optional

File to attach to the message


Value: Must be a File

Example Curl Commands

#create a message
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -H "Content-Type: application/json" -d '{"message":{"body":"New message!"}}'
#attach a image by using its Base64 encoded value
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -H "Content-Type: application/json" -d "{\"message\":{\"attachment\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABACAMAAABvC9RJAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADAUExURbhJOOnNsM6Hd3wYIqYdJc+VirVVSJgaIvPl27Cmpf///5InK4s2Qsh0atqkkbU7NK4gKNCrpIkVHcNpSLAqLPXr47Z6eMl8VuzVvvv18fjv6d62rb9RT9ehcpRHSLIyL86NYerMxqQ8NbpGQ7IuN8VyTOzZ1N+1k/v39akVHsRmXapJPe/cyfLg06RcWOXEob9hRL9bVb1YPubDuv79/JwwMK4lLP3699rDwrFlafv4+p9QS/nz8MVhZYYdIq0eIJkvcAEAAAXBSURBVHjalNdbY6JKDABgHK4dlqt4RUVERVSqomA9pfD//9VJZkCp+7R5cHctXzMzhIQVKKXb4Z9/iIVA6VB0XVVVXTc//I5VJ/BfuS5JkioKIFQJQ9WVrL9h0edx5pFl+Nk/K4Ll2bYkCl9MQBb1oAjZeTP6rWQtNc+b/hkYkICRT1fiJFeUDKI/wtgsTS5HJR3Ab0GDpEBSqTwHJGEkO4+Wy+XpTmOUm9HcnMOf/X6WGYIFKwMiNmSlKLAwJOcNISGlJRkR87T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pD4gSNC+TD2f6eXFe2fUzirZtQO2QBRJadr+7qyswSBDbt7UYUfxMIv3NyssVeQuyGFAVUFid4APpi8R3x152LQZrYB+2jv16zYu4SPDQ3YYFF6lm4ILt+9gr+mEkvgteL0NDZKGFIynME9QthwPct0fNczyts6EkB97pIJKn6s4KhYzVbSdZ4cJ4qtUTfYkPdPhI7ueBft5ek+oaenETagPXLmmjw9dRIXuQ/XrpRsh7wus/FT3gddKMblYEks+bWdkhJQ9mn9CeBa65ySO/f4ucN3gcPO06gk8g/+z3MQPamxMnQXTFyp3to6buGLF7k6vs4aTtk60O3mCEhtQykQlK1JOKFJCddgluRayTloOwSAocOp3INwwFNiy6BDu64NhKmG/K9o040m63hsCPLB1J3iPNFy0uCxB9+dckNYjbDiXOnoc3eYEW3EnVY5p+STqIkwqOFhxEIRcIPd8YPefoD+1IrRqrPz4W4ePxEtfd4rNTD45Hrq8fjgB8YwfoHgw1b9xNbXyXyQktqKDtX1fHtVIdPLCMWecHqFetNFb/YK1xjJFttgl/YifYZcMUh5VOsSaN2o+LB8+jsK7hwSKmw+Jf/iAzxTfh/AQYADd4StjMb1WUAAAAASUVORK5CYII=\"}}"
#attach any file to your message
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -F message[attachment]=@path/to/file
#create a message with a hashtag
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -H "Content-Type: application/json" -d '{"message":{"body":"Message with a #hashtag"}}'
#create a message with a link in it
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -H "Content-Type: application/json" -d '{"message":{"body":"Message with a [link](http://google.com)"}}'
#create a message with an at-mention of another user or group from your community
curl -X POST -v "https://demo.socialcast.com/api/webhooks/identifier/secret" -H "Content-Type: application/json" -d '{"message":{"body":"Message with an at-mention for @JenniferLawson"}}'