Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clarify IDs and explain how to create a company #611

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ https://api.intercom.io/export/content/data
#### Contacts

Note that this is a new resource compatible only with the new [Contacts API](https://developers.intercom.com/intercom-api-reference/reference#contacts-model) released in API v2.0.
- `user_id` refers to an attribute that you would have on your side to identify your users
- `user.id` refers to the internal ID used by intercom to identify users

```ruby
# Create a contact with "lead" role
Expand Down Expand Up @@ -198,7 +200,15 @@ intercom.visitors.convert(visitor, user)

#### Companies

Note that
- "company_id" refers to an attribute that you would have on your side
- company.id refers to the internal company ID used by Intercom


```ruby
# Create a company
company = intercom.companies.create(name: 'Intercom', company_id: 42)

# Find a company by company_id
company = intercom.companies.find(company_id: "44")

Expand Down