Skip to main content
GET
/
profiles
/
{user_id}
JavaScript
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.retrieve('user_id');

console.log(profile.profile);
{
  "profile": {},
  "preferences": {
    "categories": {
      "categories_key": {
        "status": "OPTED_IN",
        "rules": [
          {
            "start": "string",
            "until": "string"
          }
        ],
        "channel_preferences": [
          {
            "channel": "direct_message"
          }
        ]
      }
    },
    "notifications": {
      "notifications_key": {
        "status": "OPTED_IN",
        "rules": [
          {
            "start": "string",
            "until": "string"
          }
        ],
        "channel_preferences": [
          {
            "channel": "direct_message"
          }
        ]
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

user_id
string
required

A unique identifier representing the user associated with the requested profile.

Response

profile
object
required
preferences
RecipientPreferences · object | null