Skip to content

Commit 146a9d4

Browse files
authored
Merge pull request #188 from intercom/bv/add_custom_attributes_readme
added custom_attributes example to users and lead creation
2 parents f4f1819 + 8b5a65a commit 146a9d4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ $client = new IntercomClient(<insert_token_here>, null);
5353
```php
5454
// Create/update a user
5555
$client->users->create([
56-
"email" => "[email protected]"
56+
"email" => "[email protected]",
57+
"custom_attributes" => ['foo' => 'bar']
5758
]);
5859

5960
// Delete a user by ID
@@ -72,10 +73,10 @@ $client->users->create([
7273
]
7374
]);
7475

75-
// Find a single user by email
76+
// Find a single user by email
7677
$client->users->getUsers(["email" => "[email protected]"]);
7778

78-
// List all users
79+
// List all users
7980
$client->users->getUsers([]);
8081
```
8182

@@ -84,7 +85,10 @@ $client->users->getUsers([]);
8485
```php
8586
// Create/update a lead
8687
// See more options here: https://developers.intercom.io/reference#create-lead
87-
$client->leads->create([]);
88+
$client->leads->create([
89+
"email" => "[email protected]",
90+
"custom_attributes" => ['foo' => 'bar']
91+
]);
8892

8993
// List leads
9094
// See more options here: https://developers.intercom.io/reference#list-leads

0 commit comments

Comments
 (0)