cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
425
Views
0
Helpful
1
Replies

Can a card can be setup to send as a message

sandiban
Cisco Employee
Cisco Employee

query from @dakota Reeves (@navyfederal.org) in #webex4devs space

Dakota Reeves • Can a card be setup to simply send a response in message format instead of pointing to a webhook?

1 Reply 1

sandiban
Cisco Employee
Cisco Employee

Hi Dakota,

If my understanding is correct, then you mean you want to send a Card via message or, as a message response to a space or, to a direct contact.

If yes, it's very much possible and we've the /create-a-message REST api endpoint as provided here - https://developer.webex.com/docs/api/v1/messages/create-a-message

This API helps to create a message to any space or, to a person directly using his/her personId or, personEmail.

If you check the very last field/attribute for this API, it's "attachments".

So, in the attachments field, you can keep the code block for your Card and Run the API with POST request and instead of message, a card should be sent to the Receiver.

Hope this provided information help you here.

Any further assistance on this, please let us know by replying back on this question.

Regards,
Sandip