import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const profile = await client.profiles.create('user_id', { profile: { foo: 'bar' } });
console.log(profile.status);{
"status": "SUCCESS"
}Merge the supplied values with an existing profile or create a new profile if one doesnโt already exist.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const profile = await client.profiles.create('user_id', { profile: { foo: 'bar' } });
console.log(profile.status);{
"status": "SUCCESS"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier representing the user associated with the requested profile.
SUCCESS