Versions in this module Expand all Collapse all v2 v2.3.0 Apr 9, 2026 Changes in this version + func BaseURI(baseURI string) option + func Bool(value bool) *bool + func SetHTTPClient(httpClient interfaces.HTTPClient) option + func TraceHTTP(trace bool) option + type Admin struct + Avatar *AdminAvatar + Email string + ID json.Number + Name string + TeamPriorityLevel map[string]interface{} + Type string + func (a Admin) IsNobodyAdmin() bool + func (a Admin) MessageAddress() MessageAddress + func (a Admin) String() string + type AdminAPI struct + type AdminAvatar struct + ImageURL string + type AdminList struct + Admins []Admin + type AdminRepository interface + type AdminService struct + Repository AdminRepository + func (c *AdminService) List() (AdminList, error) + type Article struct + AuthorID int64 + Body string + CreatedAt int64 + Description string + ID string + ParentID int64 + ParentIDs []int64 + ParentType string + State string + Statistics ArticleStatistics + Title string + Type string + URL string + UpdatedAt int64 + WorkspaceID string + func (a Article) String() string + type ArticleAPI struct + type ArticleList struct + Articles []Article + Pages PageParams + TotalCount int64 + type ArticleRepository interface + type ArticleService struct + Repository ArticleRepository + func (s *ArticleService) Find(id string) (Article, error) + func (s *ArticleService) List(params PageParams) (ArticleList, error) + type ArticleStatistics struct + Conversations int64 + HappyReactionPercentage float64 + NeutralReactionPercentage float64 + Reactions int64 + SadReactionPercentage float64 + Views int64 + type Client struct + AccessToken string + AdminRepository AdminRepository + Admins AdminService + ArticleRepository ArticleRepository + Articles ArticleService + CollectionRepository CollectionRepository + Collections CollectionService + Companies CompanyService + CompanyRepository CompanyRepository + ContactRepository ContactRepository + Contacts ContactService + ConversationRepository ConversationRepository + Conversations ConversationService + EventRepository EventRepository + Events EventService + HTTPClient interfaces.HTTPClient + JobRepository JobRepository + Jobs JobService + MessageRepository MessageRepository + Messages MessageService + SegmentRepository SegmentRepository + Segments SegmentService + TagRepository TagRepository + Tags TagService + func NewClient(accessToken string) *Client + func NewClientWithHTTPClient(accessToken string, httpClient interfaces.HTTPClient) *Client + func (c *Client) Option(opts ...option) (previous option) + type Collection struct + CreatedAt int64 + Description string + ID string + Icon string + Name string + Order int64 + ParentID *string + Type string + URL string + UpdatedAt int64 + WorkspaceID string + func (c Collection) String() string + type CollectionAPI struct + type CollectionList struct + Collections []Collection + Pages PageParams + TotalCount int64 + type CollectionRepository interface + type CollectionService struct + Repository CollectionRepository + func (s *CollectionService) Find(id string) (Collection, error) + func (s *CollectionService) List(params PageParams) (CollectionList, error) + type Company struct + CompanyID string + CreatedAt int64 + CustomAttributes map[string]interface{} + ID string + Industry string + LastRequestAt int64 + MonthlySpend int64 + Name string + Plan *Plan + RemoteCreatedAt int64 + Remove *bool + Segments *SegmentList + SessionCount int64 + Size int64 + Tags *TagList + UpdatedAt int64 + UserCount int64 + Website string + func (c Company) String() string + type CompanyAPI struct + type CompanyIdentifiers struct + CompanyID string + ID string + Name string + type CompanyList struct + Companies []Company + Pages PageParams + type CompanyRepository interface + type CompanyService struct + Repository CompanyRepository + func (c *CompanyService) FindByCompanyID(companyID string) (Company, error) + func (c *CompanyService) FindByID(id string) (Company, error) + func (c *CompanyService) FindByName(name string) (Company, error) + func (c *CompanyService) List(params PageParams) (CompanyList, error) + func (c *CompanyService) ListBySegment(segmentID string, params PageParams) (CompanyList, error) + func (c *CompanyService) ListByTag(tagID string, params PageParams) (CompanyList, error) + func (c *CompanyService) ListContactsByCompanyID(companyID string, params PageParams) (ContactList, error) + func (c *CompanyService) ListContactsByID(id string, params PageParams) (ContactList, error) + func (c *CompanyService) Save(user *Company) (Company, error) + type Contact struct + Avatar *ContactAvatar + Browser string + BrowserLanguage string + BrowserVersion string + Companies *CompanyList + CreatedAt int64 + CustomAttributes map[string]interface{} + Email string + EmailDomain string + EnabledPushMessaging *bool + ExternalID string + FormattedPhone string + HasHardBounced bool + ID string + LanguageOverride string + LastContactedAt int64 + LastEmailClickedAt int64 + LastEmailOpenedAt int64 + LastRepliedAt int64 + LastSeenAt int64 + Location *ContactLocation + MarkedEmailAsSpam bool + Name string + OS string + OwnerID int64 + Phone string + Referrer string + Role string + Segments *SegmentList + SignedUpAt int64 + SocialProfiles *SocialProfileList + Tags *TagList + Type string + UTMCampaign string + UTMContent string + UTMMedium string + UTMSource string + UTMTerm string + UnsubscribedFromEmails *bool + UpdatedAt int64 + WorkspaceID string + func (c Contact) MessageAddress() MessageAddress + func (c Contact) String() string + type ContactAPI struct + type ContactAvatar struct + ImageURL string + Type string + type ContactCompany struct + CompanyID string + Name string + Remove *bool + func MakeContactCompaniesFromCompanies(companies []Company) []ContactCompany + func MakeUserCompaniesFromCompanies(companies []Company) []ContactCompany + type ContactIdentifiers struct + ExternalID string + ID string + type ContactList struct + Contacts []Contact + Pages CursorPages + TotalCount int64 + type ContactLocation struct + City string + ContinentCode string + Country string + CountryCode string + Region string + Type string + type ContactRepository interface + type ContactService struct + Repository ContactRepository + func (c *ContactService) Archive(id string) (Contact, error) + func (c *ContactService) Create(contact *Contact) (Contact, error) + func (c *ContactService) Delete(id string) (Contact, error) + func (c *ContactService) FindByExternalID(externalID string) (Contact, error) + func (c *ContactService) FindByID(id string) (Contact, error) + func (c *ContactService) List(params PageParams) (ContactList, error) + func (c *ContactService) ListByEmail(email string, params PageParams) (ContactList, error) + func (c *ContactService) Merge(sourceID, targetID string) (Contact, error) + func (c *ContactService) Unarchive(id string) (Contact, error) + func (c *ContactService) Update(contact *Contact) (Contact, error) + type Conversation struct + AdminAssigneeID int64 + Contacts ContactList + ConversationMessage ConversationMessage + ConversationParts ConversationPartList + CreatedAt int64 + ID string + Open bool + Read bool + SnoozedUntil int64 + State string + TagList *TagList + TeamAssigneeID int64 + Title string + UpdatedAt int64 + WaitingSince int64 + type ConversationAPI struct + type ConversationList struct + Conversations []Conversation + Pages CursorPages + TotalCount int64 + type ConversationListParams struct + AdminID string + DisplayAs string + Email string + IntercomUserID string + Open *bool + Type string + Unread *bool + type ConversationListState int + const SHOW_ALL + const SHOW_CLOSED + const SHOW_OPEN + const SHOW_UNREAD + type ConversationMessage struct + Author MessageAddress + Body string + ID string + Subject string + URL string + type ConversationPart struct + AssignedTo Admin + Author MessageAddress + Body string + CreatedAt int64 + ID string + NotifiedAt int64 + PartType string + UpdatedAt int64 + type ConversationPartList struct + Parts []ConversationPart + type ConversationRepository interface + type ConversationService struct + Repository ConversationRepository + func (c *ConversationService) Assign(id string, assigner, assignee *Admin) (Conversation, error) + func (c *ConversationService) Close(id string, closer *Admin) (Conversation, error) + func (c *ConversationService) Find(id string) (Conversation, error) + func (c *ConversationService) ListAll(pageParams PageParams) (ConversationList, error) + func (c *ConversationService) ListByAdmin(admin *Admin, state ConversationListState, pageParams PageParams) (ConversationList, error) + func (c *ConversationService) ListByContact(contact *Contact, state ConversationListState, pageParams PageParams) (ConversationList, error) + func (c *ConversationService) MarkRead(id string) (Conversation, error) + func (c *ConversationService) Open(id string, opener *Admin) (Conversation, error) + func (c *ConversationService) Reply(id string, author MessagePerson, replyType ReplyType, body string) (Conversation, error) + func (c *ConversationService) ReplyWithAttachmentURLs(id string, author MessagePerson, replyType ReplyType, body string, ...) (Conversation, error) + type CursorPages struct + Next *StartingAfterParam + Page int64 + PerPage int64 + TotalPages int64 + Type string + type Data struct + Item json.RawMessage + type Event struct + CreatedAt int64 + Email string + EventName string + ID string + Metadata map[string]interface{} + UserID string + func (e Event) String() string + type EventAPI struct + type EventRepository interface + type EventService struct + Repository EventRepository + func (e *EventService) Save(event *Event) error + type IntercomError interface + Error func() string + GetCode func() string + GetMessage func() string + GetStatusCode func() int + type JobAPI struct + type JobData struct + ID string + type JobItem struct + Data interface{} + DataType string + Method string + func NewContactJobItem(contact *Contact, method JobItemMethod) *JobItem + func NewEventJobItem(event *Event) *JobItem + type JobItemMethod int + const JOB_DELETE + const JOB_POST + func (state JobItemMethod) String() string + type JobRepository interface + type JobRequest struct + Items []*JobItem + JobData *JobData + type JobResponse struct + AppID string + ClosingAt int64 + CompletedAt int64 + CreatedAt int64 + ID string + Links map[string]string + Name string + State string + UpdatedAt int64 + func (j JobResponse) String() string + type JobService struct + Repository JobRepository + func (js *JobService) AppendEvents(id string, items ...*JobItem) (JobResponse, error) + func (js *JobService) AppendUsers(id string, items ...*JobItem) (JobResponse, error) + func (js *JobService) Find(id string) (JobResponse, error) + func (js *JobService) NewEventJob(items ...*JobItem) (JobResponse, error) + func (js *JobService) NewUserJob(items ...*JobItem) (JobResponse, error) + type JobState int + const COMPLETED + const FAILED + const PENDING + const RUNNING + func (state JobState) String() string + type MessageAPI struct + type MessageAddress struct + Email string + ID string + Type string + type MessagePerson interface + MessageAddress func() MessageAddress + type MessageRepository interface + type MessageRequest struct + Body string + From MessageAddress + MessageType string + Subject string + Template string + To MessageAddress + func NewContactMessage(from MessagePerson, body string) MessageRequest + func NewEmailMessage(template MessageTemplate, from, to MessagePerson, subject, body string) MessageRequest + func NewInAppMessage(from, to MessagePerson, body string) MessageRequest + type MessageResponse struct + Body string + CreatedAt int64 + ID string + MessageType string + Owner MessageAddress + Subject string + Template MessageTemplate + func (m MessageResponse) String() string + type MessageService struct + Repository MessageRepository + func (m *MessageService) Save(message *MessageRequest) (MessageResponse, error) + type MessageTemplate int + const NO_TEMPLATE + const PERSONAL_TEMPLATE + const PLAIN_TEMPLATE + func (template *MessageTemplate) UnmarshalJSON(b []byte) error + func (template MessageTemplate) String() string + type Notification struct + Company *Company + Contact *Contact + Conversation *Conversation + CreatedAt int64 + DeliveryAttempts int64 + Event *Event + FirstSentAt int64 + ID string + RawData *Data + Tag *Tag + Topic string + func NewNotification(r io.Reader) (*Notification, error) + type PageParams struct + Page int64 + PerPage int64 + TotalPages int64 + type Plan struct + ID string + Name string + func (p Plan) String() string + type Reply struct + AdminID string + AssigneeID string + AttachmentURLs []string + Body string + Email string + IntercomID string + ReplyType string + Type string + type ReplyType int + const CONVERSATION_ASSIGN + const CONVERSATION_CLOSE + const CONVERSATION_COMMENT + const CONVERSATION_NOTE + const CONVERSATION_OPEN + func (reply ReplyType) String() string + type Segment struct + CreatedAt int64 + ID string + Name string + PersonType string + UpdatedAt int64 + func (s Segment) String() string + type SegmentAPI struct + type SegmentList struct + Segments []Segment + type SegmentRepository interface + type SegmentService struct + Repository SegmentRepository + func (t *SegmentService) Find(id string) (Segment, error) + func (t *SegmentService) List() (SegmentList, error) + type SocialProfile struct + ID string + Name string + URL string + Username string + type SocialProfileList struct + SocialProfiles []SocialProfile + type StartingAfterParam struct + PerPage int64 + StartingAfter string + func (s *StartingAfterParam) UnmarshalJSON(data []byte) error + type Tag struct + ID string + Name string + func (t Tag) String() string + type TagAPI struct + type TagList struct + Tags []Tag + type TagRepository interface + type TagService struct + Repository TagRepository + func (t *TagService) Delete(id string) error + func (t *TagService) List() (TagList, error) + func (t *TagService) Save(tag *Tag) (Tag, error) + func (t *TagService) Tag(taggingList *TaggingList) (Tag, error) + type Tagging struct + CompanyID string + Email string + ID string + Untag *bool + UserID string + type TaggingList struct + Companies []Tagging + Name string + Users []Tagging + type UserCompany = ContactCompany Other modules containing this package github.com/karnott/intercom-go