Skip to content

Commit e52c8a7

Browse files
authored
Merge pull request #149 from intercom/bulk-api-readme-code
Add sample code for Bulk API to readme
2 parents cc970d1 + 34dd250 commit e52c8a7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,19 @@ $client->counts->getCounts([])
184184
// Bulk create/update users
185185
// See more options here: https://developers.intercom.io/reference#bulk-user-operations
186186
$client->bulk->users([
187-
"items" => [ /* ... */ ]
187+
"items" => [
188+
["method" => "post","data_type" => "user","data" => ['email' => '[email protected]']],
189+
["method" => "post","data_type" => "user","data" => ['email' => '[email protected]']]
190+
]
188191
]);
189192

190193
// Bulk create/update users
191194
// See more options here: https://developers.intercom.io/reference#bulk-event-operations
192195
$client->bulk->events([
193-
"items" => [ /* ... */ ]
196+
"items" => [
197+
["method" => "post","data_type" => "event","data" => ['event_name' => 'test-event', "email" => "[email protected]", "created_at" => 1468055411]],
198+
["method" => "post","data_type" => "event","data" => ['event_name' => 'test-event', "email" => "[email protected]", "created_at" => 1467969011]]
199+
]
194200
]);
195201
```
196202

0 commit comments

Comments
 (0)