cURL
curl --request POST \ --url https://api.usecobalt.com/v1/messages \ --header 'Content-Type: application/json' \ --header 'access_token: <api-key>' \ --header 'client_id: <api-key>' \ --header 'client_secret: <api-key>' \ --data '{ "provider": "<string>", "subject": "<string>", "message": "<string>" }'
{ "success": true, "message": "<string>", "data": { "message_id": "<string>" } }
Sends a message to the specified provider.
curl -X POST https://api.usecobalt.com/v1/messages \ -H 'Content-Type: application/json' \ -H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \ -H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \ -H 'access_token: 493JKLHIU98789hLKH9HHJH' \ -d '{ "provider": "123456789", "subject": "Test Message", "message": "This is a test message content." }'
{ "success": true, "message": "Message sent successfully", "data": { "message_id": "msg_123456789" } }
/messages
Successful response
The response is of type object.
object