import Honcho from 'honcho-ai';
const client = new Honcho({
apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});
async function main() {
const metamessage = await client.apps.users.metamessages.create('app_id', 'user_id', {
content: 'content',
metamessage_type: 'x',
});
console.log(metamessage.id);
}
main();
Create a new metamessage associated with a user.
Optionally link to a session and message by providing those IDs in the request body.
POST
/
v1
/
apps
/
{app_id}
/
users
/
{user_id}
/
metamessages
JavaScript
import Honcho from 'honcho-ai';
const client = new Honcho({
apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});
async function main() {
const metamessage = await client.apps.users.metamessages.create('app_id', 'user_id', {
content: 'content',
metamessage_type: 'x',
});
console.log(metamessage.id);
}
main();