Skip to content

Instantly share code, notes, and snippets.

@madeindjs
Last active February 11, 2020 11:20
Show Gist options
  • Save madeindjs/4a710b67b9c858e2233b7e4d01b28287 to your computer and use it in GitHub Desktop.
Save madeindjs/4a710b67b9c858e2233b7e4d01b28287 to your computer and use it in GitHub Desktop.
const Intercom = require('intercom-client');
const myAdminId = 3385260;
const client = new Intercom.Client({ token: '...=' });
const until = new Date(2020, 3, 15);
const conversationId = 25726415330;
client.conversations.reply({
id: conversationId,
message_type: 'snoozed',
snoozed_until: until.getTime(),
admin_id: myAdminId,
})
.then(() => console.log('success'))
.catch(e => console.error(e.body))
// {
// type: 'error.list',
// request_id: '00062udkp728do6dr380',
// errors: [ { code: 'server_error', message: 'Server Error' } ]
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment