This operation sends a message to an external endpoint (phone number or email address) or a contact (secure messaging). Only one of secureEndpoint or smsOrEmailEndpoint should be specified. You will need to also specify the appropriate internal endpoint from the list of available internal endpoints for an organization.

NOTE: Message attachments are not yet supported in the API.

Send a secure message

The deliveryMethod can be one of the following:

  • (Default) any_available_secure_conversation: The system will first try to deliver messages using conversations from the specified internal endpoint. Then it will try to deliver to any existing secure conversation with the recipient. Then, if no conversation exists, a new secure conversation will be created.
  • only_conversations_matching_internal_endpoint: The system will deliver messages in conversations from the specified internal endpoint. If such a conversation doesn't yet exist, a new one will be created.
  • new_conversation: This option will create a new conversation, separate from any existing conversation.

Send an SMS

  • Get the appropriate Spruce phone number from the list of internal endpoints for an organization (of channel type phone)
  • Specify the internal endpoint's endpoint.Id in the internalEndpointId path parameter
  • Specify the phone number to send the the message to in the destination.smsOrEmailEndpoint body parameter

Send an email

  • Get the appropriate Spruce phone number from the list of internal endpoints for an organization (of channel type email)
  • Specify the internal endpoint's endpoint.Id in the internalEndpointId path parameter
  • Specify the email address to send the the message to in the destination.smsOrEmailEndpoint body parameter
Language
Authorization
Bearer
Click Try It! to start a request and see the response here!