Visitors
Everything about your Visitors
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /visitors | Retrieve a visitor with User ID |
PUT | /visitors | Update a visitor |
POST | /visitors/convert | Convert a visitor |
Example
Retrieve a visitor with User ID, with the TypeScript SDK:
ts
import { Intercom } from "@octridev/intercom";
const client = new Intercom({
// Optional: replaces the default server and any server an operation declares.
baseUrl: "https://api.intercom.io",
auth: { bearerAuth: process.env.API_TOKEN! },
});
const result = await client.visitors.retrieveWithUserId({
userId: "user-1",
});
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.