intercom

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 12 Imported by: 0

README

intercom-go

Idiomatic Go SDK for the Intercom API.

intercom-go wraps Intercom's published OpenAPI spec with a hand-shaped Go API. Generated OpenAPI code is kept internal, while callers use stable service wrappers such as client.Admins.Me(ctx), client.Contacts.Search(ctx, ...), and client.Conversations.Reply(ctx, ...).

Install

go get github.com/uffejaeger/intercom-go
import intercom "github.com/uffejaeger/intercom-go"

Quick Start

package main

import (
	"context"
	"fmt"
	"log"

	intercom "github.com/uffejaeger/intercom-go"
)

func main() {
	client, err := intercom.NewClientFromEnv(intercom.WithRegion(intercom.EU))
	if err != nil {
		log.Fatal(err)
	}

	admin, err := client.Admins.Me(context.Background())
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(*admin.Email)
}

NewClientFromEnv reads INTERCOM_ACCESS_TOKEN. To pass a token directly:

client, err := intercom.NewClient("access-token")

Examples

Retrieve and search contacts:

contact, err := client.Contacts.Get(ctx, "contact_id")

contacts, err := client.Contacts.Search(ctx, intercom.ContactSearch{
	Field:    "email",
	Operator: intercom.ContactSearchEquals,
	Value:    "customer@example.com",
	PerPage:  25,
})

Handle API errors:

contact, err := client.Contacts.Get(ctx, "missing")
if err != nil {
	var apiErr *intercom.ErrorResponse
	if errors.As(err, &apiErr) {
		log.Printf("intercom status=%d request_id=%s", apiErr.StatusCode, apiErr.RequestID)
	}
	return err
}

Runnable examples:

API Coverage

The SDK targets Intercom API version 2.15, pinned in spec/intercom.openapi.yaml. Public root-package services cover the pinned spec while generated client code stays internal under internal/generated/intercom.

See docs/coverage.md for the current public SDK coverage audit. See docs/generation.md for the generation workflow.

Development

go test ./...
make coverage
make generate-check

Before opening a PR, run:

make pre-push

License

MIT

Documentation

Overview

Package intercom provides an idiomatic Go client for the Intercom API.

Create a client with an Intercom access token:

client, err := intercom.NewClient("access-token")

Or read the token from INTERCOM_ACCESS_TOKEN:

client, err := intercom.NewClientFromEnv()

The client exposes service fields for Intercom resources, for example:

admin, err := client.Admins.Me(ctx)
contact, err := client.Contacts.Get(ctx, "contact_id")
conversations, err := client.Conversations.List(ctx)

Index

Constants

View Source
const (

	// DefaultAccessTokenEnv is the environment variable read by NewClientFromEnv.
	DefaultAccessTokenEnv = "INTERCOM_ACCESS_TOKEN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AIContentService

type AIContentService struct {
	// contains filtered or unexported fields
}

AIContentService exposes AI content import source and external page Intercom API operations.

func (*AIContentService) CreateContentImportSource

func (s *AIContentService) CreateContentImportSource(ctx context.Context, req ContentImportSourceCreate) (*ContentImportSource, error)

CreateContentImportSource creates a new content import source.

func (*AIContentService) CreateExternalPage

func (s *AIContentService) CreateExternalPage(ctx context.Context, req ExternalPageCreate) (*ExternalPage, error)

CreateExternalPage creates a new external page.

func (*AIContentService) DeleteContentImportSource

func (s *AIContentService) DeleteContentImportSource(ctx context.Context, sourceID string) error

DeleteContentImportSource deletes a content import source.

func (*AIContentService) DeleteExternalPage

func (s *AIContentService) DeleteExternalPage(ctx context.Context, pageID string) (*ExternalPage, error)

DeleteExternalPage deletes an external page.

func (*AIContentService) GetContentImportSource

func (s *AIContentService) GetContentImportSource(ctx context.Context, sourceID string) (*ContentImportSource, error)

GetContentImportSource retrieves a content import source by ID.

func (*AIContentService) GetExternalPage

func (s *AIContentService) GetExternalPage(ctx context.Context, pageID string) (*ExternalPage, error)

GetExternalPage retrieves an external page by ID.

func (*AIContentService) ListContentImportSources

func (s *AIContentService) ListContentImportSources(ctx context.Context) (*ContentImportSourceList, error)

ListContentImportSources returns all content import sources.

func (*AIContentService) ListExternalPages

func (s *AIContentService) ListExternalPages(ctx context.Context) (*ExternalPageList, error)

ListExternalPages returns all external pages.

func (*AIContentService) UpdateContentImportSource

func (s *AIContentService) UpdateContentImportSource(ctx context.Context, sourceID string, req ContentImportSourceUpdate) (*ContentImportSource, error)

UpdateContentImportSource updates a content import source.

func (*AIContentService) UpdateExternalPage

func (s *AIContentService) UpdateExternalPage(ctx context.Context, pageID string, req ExternalPageUpdate) (*ExternalPage, error)

UpdateExternalPage updates an external page.

type Admin

type Admin = gen.AdminWithAppSchema

Admin is the authenticated Intercom teammate account and workspace details.

type AdminActivityLogs

type AdminActivityLogs = gen.ActivityLogListSchema

AdminActivityLogs is a page of admin activity log entries.

type AdminDetail

type AdminDetail = gen.AdminSchema

AdminDetail is a single Intercom admin (without workspace details).

type AdminList

type AdminList = gen.AdminListSchema

AdminList is a list of Intercom admins.

type AdminSetAway

type AdminSetAway = gen.SetAwayAdminJSONRequestBody

AdminSetAway holds the fields for setting an admin's away status.

type AdminsService

type AdminsService struct {
	// contains filtered or unexported fields
}

AdminsService exposes admin-related Intercom API operations.

func (*AdminsService) List

func (s *AdminsService) List(ctx context.Context) (*AdminList, error)

List returns all admins for the workspace.

func (*AdminsService) ListActivityLogs

func (s *AdminsService) ListActivityLogs(ctx context.Context, createdAtAfter string) (*AdminActivityLogs, error)

ListActivityLogs returns activity logs for admins, starting from createdAtAfter (UNIX timestamp string).

func (*AdminsService) Me

func (s *AdminsService) Me(ctx context.Context) (*Admin, error)

Me identifies the currently authenticated admin.

func (*AdminsService) Retrieve

func (s *AdminsService) Retrieve(ctx context.Context, adminID string) (*AdminDetail, error)

Retrieve retrieves an admin by ID.

func (*AdminsService) SetAway

func (s *AdminsService) SetAway(ctx context.Context, adminID string, req AdminSetAway) (*AdminDetail, error)

SetAway sets the away status of an admin.

type Article

type Article = gen.ArticleSchema

Article is an Intercom article.

type ArticleCreate

type ArticleCreate = gen.CreateArticleRequestSchema

ArticleCreate holds the fields for creating an article.

type ArticleDeleted

type ArticleDeleted = gen.DeletedArticleObjectSchema

ArticleDeleted is the result of deleting an article.

type ArticleList

type ArticleList = gen.ArticleListSchema

ArticleList is a page of Intercom articles.

type ArticleSearch

type ArticleSearch struct {
	Phrase       string
	State        string
	HelpCenterID int
	Highlight    *bool
}

ArticleSearch holds the parameters for searching articles.

type ArticleSearchResult

type ArticleSearchResult = gen.ArticleSearchResponseSchema

ArticleSearchResult is the result of an article search.

type ArticleUpdate

type ArticleUpdate = gen.UpdateArticleRequestSchema

ArticleUpdate holds the fields for updating an article.

type ArticlesService

type ArticlesService struct {
	// contains filtered or unexported fields
}

ArticlesService exposes article-related Intercom API operations.

func (*ArticlesService) Create

func (s *ArticlesService) Create(ctx context.Context, article ArticleCreate) (*Article, error)

Create creates a new article.

func (*ArticlesService) Delete

func (s *ArticlesService) Delete(ctx context.Context, articleID string) (*ArticleDeleted, error)

Delete deletes an article.

func (*ArticlesService) List

func (s *ArticlesService) List(ctx context.Context) (*ArticleList, error)

List returns all articles.

func (*ArticlesService) Retrieve

func (s *ArticlesService) Retrieve(ctx context.Context, articleID string) (*Article, error)

Retrieve retrieves an article by ID.

func (*ArticlesService) Search

Search searches articles by phrase, state, help center, or highlight options.

func (*ArticlesService) Update

func (s *ArticlesService) Update(ctx context.Context, articleID string, article ArticleUpdate) (*Article, error)

Update updates an article.

type AwayStatusReason

type AwayStatusReason = gen.AwayStatusReasonSchema

AwayStatusReason is an Intercom away status reason.

type AwayStatusReasonsService

type AwayStatusReasonsService struct {
	// contains filtered or unexported fields
}

AwayStatusReasonsService exposes away status reason Intercom API operations.

func (*AwayStatusReasonsService) List

List returns all away status reasons for the workspace.

type Brand

type Brand = gen.BrandSchema

Brand is an Intercom brand.

type BrandList

type BrandList = gen.BrandListSchema

BrandList is a list of Intercom brands.

type BrandsService

type BrandsService struct {
	// contains filtered or unexported fields
}

BrandsService exposes brand-related Intercom API operations.

func (*BrandsService) List

func (s *BrandsService) List(ctx context.Context) (*BrandList, error)

List returns all brands for the workspace.

func (*BrandsService) Retrieve

func (s *BrandsService) Retrieve(ctx context.Context, brandID string) (*Brand, error)

Retrieve returns a brand by ID.

type Call

type Call = gen.CallSchema

Call is a phone call in Intercom.

type CallList

type CallList = gen.CallListSchema

CallList is a paginated list of calls.

type CallWithTranscript

type CallWithTranscript struct {
	AdminId             *string          `json:"admin_id,omitempty"`
	AnsweredAt          *gen.Datetime    `json:"answered_at,omitempty"`
	CallType            *string          `json:"call_type,omitempty"`
	ContactId           *string          `json:"contact_id,omitempty"`
	ConversationId      *string          `json:"conversation_id,omitempty"`
	CreatedAt           *gen.Datetime    `json:"created_at,omitempty"`
	Direction           *string          `json:"direction,omitempty"`
	EndedAt             *gen.Datetime    `json:"ended_at,omitempty"`
	EndedReason         *string          `json:"ended_reason,omitempty"`
	FinRecordingUrl     *string          `json:"fin_recording_url,omitempty"`
	FinTranscriptionUrl *string          `json:"fin_transcription_url,omitempty"`
	Id                  *string          `json:"id,omitempty"`
	InitiatedAt         *gen.Datetime    `json:"initiated_at,omitempty"`
	Phone               *string          `json:"phone,omitempty"`
	RecordingUrl        *string          `json:"recording_url,omitempty"`
	State               *string          `json:"state,omitempty"`
	Transcript          []map[string]any `json:"transcript,omitempty"`
	TranscriptStatus    *string          `json:"transcript_status,omitempty"`
	TranscriptionUrl    *string          `json:"transcription_url,omitempty"`
	Type                *string          `json:"type,omitempty"`
	UpdatedAt           *gen.Datetime    `json:"updated_at,omitempty"`
}

CallWithTranscript is a call with its full transcript data.

type CallWithTranscriptList

type CallWithTranscriptList struct {
	Data []CallWithTranscript `json:"data,omitempty"`
	Type *string              `json:"type,omitempty"`
}

CallWithTranscriptList is the response from ListWithTranscripts.

type CallsService

type CallsService struct {
	// contains filtered or unexported fields
}

CallsService exposes call-related Intercom API operations.

func (*CallsService) CollectFinVoiceCallByExternalID

func (s *CallsService) CollectFinVoiceCallByExternalID(ctx context.Context, externalID string) (*FinVoiceCall, error)

CollectFinVoiceCallByExternalID returns a registered Fin Voice call by external call ID.

func (*CallsService) CollectFinVoiceCallByID

func (s *CallsService) CollectFinVoiceCallByID(ctx context.Context, id int) (*FinVoiceCall, error)

CollectFinVoiceCallByID returns a registered Fin Voice call by its Intercom ID.

func (*CallsService) CollectFinVoiceCallByPhoneNumber

func (s *CallsService) CollectFinVoiceCallByPhoneNumber(ctx context.Context, phone string) (*FinVoiceCall, error)

CollectFinVoiceCallByPhoneNumber returns a registered Fin Voice call by phone number.

func (*CallsService) CollectFinVoiceCallsByConversationID

func (s *CallsService) CollectFinVoiceCallsByConversationID(ctx context.Context, conversationID string) ([]FinVoiceCall, error)

CollectFinVoiceCallsByConversationID returns all Fin Voice calls for a conversation.

func (*CallsService) Get

func (s *CallsService) Get(ctx context.Context, callID string) (*Call, error)

Get returns a single call by ID.

func (*CallsService) GetRecording

func (s *CallsService) GetRecording(ctx context.Context, callID string) ([]byte, error)

GetRecording downloads the recording for a call. The API returns a 302 redirect to a signed URL; this method follows it automatically.

func (*CallsService) GetTranscript

func (s *CallsService) GetTranscript(ctx context.Context, callID string) ([]byte, error)

GetTranscript downloads the raw transcript for a call.

func (*CallsService) List

func (s *CallsService) List(ctx context.Context) (*CallList, error)

List returns a paginated list of calls.

func (*CallsService) ListWithTranscripts

func (s *CallsService) ListWithTranscripts(ctx context.Context, conversationIDs []string) (*CallWithTranscriptList, error)

ListWithTranscripts returns calls with transcripts for up to 20 conversation IDs.

func (*CallsService) Recording

func (s *CallsService) Recording(ctx context.Context, callID string) ([]byte, error)

Recording retrieves the recording for a call.

func (*CallsService) RegisterFinVoiceCall

func (s *CallsService) RegisterFinVoiceCall(ctx context.Context, req RegisterFinVoiceCallRequest) (*FinVoiceCall, error)

RegisterFinVoiceCall registers a new Fin Voice call.

func (*CallsService) Transcript

func (s *CallsService) Transcript(ctx context.Context, callID string) ([]byte, error)

Transcript retrieves the transcript for a call.

type Client

type Client struct {
	Admins            *AdminsService
	AIContent         *AIContentService
	Articles          *ArticlesService
	AwayStatusReasons *AwayStatusReasonsService
	Brands            *BrandsService
	Calls             *CallsService
	Collections       *CollectionsService
	Companies         *CompaniesService
	Contacts          *ContactsService
	Conversations     *ConversationsService
	CustomObjects     *CustomObjectsService
	DataAttributes    *DataAttributesService
	DataEvents        *DataEventsService
	Emails            *EmailsService
	Fin               *FinService
	HelpCenters       *HelpCentersService
	InternalArticles  *InternalArticlesService
	Messages          *MessagesService
	News              *NewsService
	Notes             *NotesService
	PhoneSwitches     *PhoneSwitchesService
	Segments          *SegmentsService
	SubscriptionTypes *SubscriptionTypesService
	Tags              *TagsService
	Teams             *TeamsService
	Tickets           *TicketsService
	Visitors          *VisitorsService
	Workspace         *WorkspaceService
	// contains filtered or unexported fields
}

Client is the root Intercom API client.

func NewClient

func NewClient(token string, opts ...Option) (*Client, error)

NewClient creates an Intercom API client using bearer-token authentication.

func NewClientFromEnv

func NewClientFromEnv(opts ...Option) (*Client, error)

NewClientFromEnv creates an Intercom API client using an access token from the environment.

func NewClientFromEnvVar

func NewClientFromEnvVar(name string, opts ...Option) (*Client, error)

NewClientFromEnvVar creates an Intercom API client using an access token from the named environment variable.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the API base URL used by the client.

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do sends an HTTP request with Intercom authentication and default headers.

func (*Client) NewRequest

func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)

NewRequest creates a request relative to the Intercom API base URL.

type Collection

type Collection = gen.CollectionSchema

Collection is an Intercom help center collection.

type CollectionCreate

type CollectionCreate = gen.CreateCollectionRequestSchema

CollectionCreate holds the fields for creating a collection.

type CollectionList

type CollectionList = gen.CollectionListSchema

CollectionList is a list of Intercom collections.

type CollectionUpdate

type CollectionUpdate = gen.UpdateCollectionRequestSchema

CollectionUpdate holds the fields for updating a collection.

type CollectionsService

type CollectionsService struct {
	// contains filtered or unexported fields
}

CollectionsService exposes collection-related Intercom API operations.

func (*CollectionsService) Create

func (s *CollectionsService) Create(ctx context.Context, collection CollectionCreate) (*Collection, error)

Create creates a collection.

func (*CollectionsService) Delete

func (s *CollectionsService) Delete(ctx context.Context, collectionID string) error

Delete deletes a collection by ID.

func (*CollectionsService) List

List returns all collections.

func (*CollectionsService) Retrieve

func (s *CollectionsService) Retrieve(ctx context.Context, collectionID string) (*Collection, error)

Retrieve returns a collection by ID.

func (*CollectionsService) Update

func (s *CollectionsService) Update(ctx context.Context, collectionID string, collection CollectionUpdate) (*Collection, error)

Update updates a collection by ID.

type CompaniesService

type CompaniesService struct {
	// contains filtered or unexported fields
}

CompaniesService exposes company-related Intercom API operations.

func (*CompaniesService) AttachContact

func (s *CompaniesService) AttachContact(ctx context.Context, contactID, companyID string) (*Company, error)

AttachContact attaches a contact to a company.

func (*CompaniesService) CreateOrUpdate

func (s *CompaniesService) CreateOrUpdate(ctx context.Context, company CompanyCreate) (*Company, error)

CreateOrUpdate creates or updates a company.

func (*CompaniesService) Delete

func (s *CompaniesService) Delete(ctx context.Context, companyID string) (*CompanyDeleted, error)

Delete deletes a company by its Intercom-assigned ID.

func (*CompaniesService) DetachContact

func (s *CompaniesService) DetachContact(ctx context.Context, contactID, companyID string) (*Company, error)

DetachContact detaches a contact from a company.

func (*CompaniesService) ListAll

func (s *CompaniesService) ListAll(ctx context.Context) (*CompanyList, error)

ListAll returns all companies using cursor-based pagination.

func (*CompaniesService) ListContacts

func (s *CompaniesService) ListContacts(ctx context.Context, companyID string) (*CompanyContacts, error)

ListContacts returns contacts attached to a company.

func (*CompaniesService) ListForContact

func (s *CompaniesService) ListForContact(ctx context.Context, contactID string) (*ContactCompanies, error)

ListForContact returns companies a contact belongs to.

func (*CompaniesService) ListNotes

func (s *CompaniesService) ListNotes(ctx context.Context, companyID string) (*NoteList, error)

ListNotes returns notes for a company.

func (*CompaniesService) ListSegments

func (s *CompaniesService) ListSegments(ctx context.Context, companyID string) (*CompanySegmentsAttached, error)

ListSegments returns segments a company belongs to.

func (*CompaniesService) Retrieve

func (s *CompaniesService) Retrieve(ctx context.Context, companyID string) (*Company, error)

Retrieve retrieves a company by its Intercom-assigned ID.

func (*CompaniesService) RetrieveByID

func (s *CompaniesService) RetrieveByID(ctx context.Context, companyID string) (*CompanyList, error)

RetrieveByID retrieves companies matching the given company_id (external ID set by the caller).

func (*CompaniesService) Scroll

func (s *CompaniesService) Scroll(ctx context.Context) (*CompanyScroll, error)

Scroll returns companies using the scroll API for large datasets.

func (*CompaniesService) Update

func (s *CompaniesService) Update(ctx context.Context, companyID string, update CompanyUpdate) (*Company, error)

Update updates a company by its Intercom-assigned ID.

type Company

type Company = gen.CompanySchema

Company is an Intercom company.

type CompanyContacts

type CompanyContacts = gen.CompanyAttachedContactsSchema

CompanyContacts is a list of contacts attached to a company.

type CompanyCreate

CompanyCreate holds the fields for creating or updating a company.

type CompanyDeleted

type CompanyDeleted = gen.DeletedCompanyObjectSchema

CompanyDeleted is the result of deleting a company.

type CompanyList

type CompanyList = gen.CompanyListSchema

CompanyList is a page of Intercom companies.

type CompanyScroll

type CompanyScroll = gen.CompanyScrollSchema

CompanyScroll is a scroll page of Intercom companies.

type CompanySegmentsAttached

type CompanySegmentsAttached = gen.CompanyAttachedSegmentsSchema

CompanySegmentsAttached is a list of segments a company belongs to.

type CompanyUpdate

type CompanyUpdate = gen.UpdateCompanyRequestSchema

CompanyUpdate holds the fields for updating a company.

type Contact

type Contact = gen.ContactSchema

Contact is an Intercom contact.

type ContactArchived

type ContactArchived = gen.ContactArchived

ContactArchived is the result of archiving a contact.

type ContactBlocked

type ContactBlocked = gen.ContactBlockedSchema

ContactBlocked is the result of blocking a contact.

type ContactCompanies

type ContactCompanies = gen.ContactAttachedCompaniesSchema

ContactCompanies is the list of companies a contact belongs to.

type ContactCreate

type ContactCreate = gen.CreateContactRequestSchema

ContactCreate holds the fields for creating a contact.

type ContactDeleted

type ContactDeleted = gen.ContactDeleted

ContactDeleted is the result of deleting a contact.

type ContactList

type ContactList = gen.ContactListSchema

ContactList is a page of Intercom contacts.

type ContactSearch

type ContactSearch struct {
	Field         string
	Operator      ContactSearchOperator
	Value         any
	PerPage       int
	StartingAfter string
}

ContactSearch describes a single-filter contact search.

type ContactSearchOperator

type ContactSearchOperator string

ContactSearchOperator is an Intercom contact search operator.

const (
	ContactSearchEquals      ContactSearchOperator = "="
	ContactSearchNotEquals   ContactSearchOperator = "!="
	ContactSearchGreaterThan ContactSearchOperator = ">"
	ContactSearchLessThan    ContactSearchOperator = "<"
	ContactSearchContains    ContactSearchOperator = "~"
)

type ContactSegments

type ContactSegments = gen.ContactSegmentsSchema

ContactSegments is the list of segments a contact belongs to.

type ContactUnarchived

type ContactUnarchived = gen.ContactUnarchived

ContactUnarchived is the result of unarchiving a contact.

type ContactUpdate

type ContactUpdate = gen.UpdateContactRequestSchema

ContactUpdate holds the fields for updating a contact.

type ContactsService

type ContactsService struct {
	// contains filtered or unexported fields
}

ContactsService exposes contact-related Intercom API operations.

func (*ContactsService) Archive

func (s *ContactsService) Archive(ctx context.Context, contactID string) (*ContactArchived, error)

Archive archives a contact.

func (*ContactsService) AttachSubscription

func (s *ContactsService) AttachSubscription(ctx context.Context, contactID, subscriptionID, consentType string) (*SubscriptionType, error)

AttachSubscription attaches a subscription type to a contact.

func (*ContactsService) AttachTag

func (s *ContactsService) AttachTag(ctx context.Context, contactID, tagID string) (*Tag, error)

AttachTag attaches a tag to a contact.

func (*ContactsService) Block

func (s *ContactsService) Block(ctx context.Context, contactID string) (*ContactBlocked, error)

Block blocks a contact.

func (*ContactsService) Create

func (s *ContactsService) Create(ctx context.Context, contact ContactCreate) (*Contact, error)

Create creates a new contact.

func (*ContactsService) CreateNote

func (s *ContactsService) CreateNote(ctx context.Context, contactID string, body string, adminID string) (*Note, error)

CreateNote creates a note on a contact.

func (*ContactsService) Delete

func (s *ContactsService) Delete(ctx context.Context, contactID string) (*ContactDeleted, error)

Delete deletes a contact.

func (*ContactsService) DetachSubscription

func (s *ContactsService) DetachSubscription(ctx context.Context, contactID, subscriptionID string) (*SubscriptionType, error)

DetachSubscription detaches a subscription type from a contact.

func (*ContactsService) DetachTag

func (s *ContactsService) DetachTag(ctx context.Context, contactID, tagID string) (*Tag, error)

DetachTag detaches a tag from a contact.

func (*ContactsService) Get

func (s *ContactsService) Get(ctx context.Context, contactID string) (*Contact, error)

Get retrieves a contact by Intercom contact ID.

func (*ContactsService) GetByExternalID

func (s *ContactsService) GetByExternalID(ctx context.Context, externalID string) (*Contact, error)

GetByExternalID retrieves a contact by external ID.

func (*ContactsService) List

func (s *ContactsService) List(ctx context.Context) (*ContactList, error)

List returns contacts.

func (*ContactsService) ListNotes

func (s *ContactsService) ListNotes(ctx context.Context, contactID string) (*NoteList, error)

ListNotes returns notes for a contact.

func (*ContactsService) ListSegments

func (s *ContactsService) ListSegments(ctx context.Context, contactID string) (*ContactSegments, error)

ListSegments returns segments a contact belongs to.

func (*ContactsService) ListSubscriptions

func (s *ContactsService) ListSubscriptions(ctx context.Context, contactID string) (*SubscriptionTypeList, error)

ListSubscriptions returns subscription types for a contact.

func (*ContactsService) ListTags

func (s *ContactsService) ListTags(ctx context.Context, contactID string) (*TagList, error)

ListTags returns tags attached to a contact.

func (*ContactsService) Merge

func (s *ContactsService) Merge(ctx context.Context, from, into string) (*Contact, error)

Merge merges a lead (from) into a user (into).

func (*ContactsService) Search

func (s *ContactsService) Search(ctx context.Context, search ContactSearch) (*ContactList, error)

Search searches contacts using one Intercom search filter.

func (*ContactsService) Unarchive

func (s *ContactsService) Unarchive(ctx context.Context, contactID string) (*ContactUnarchived, error)

Unarchive unarchives a contact.

func (*ContactsService) Update

func (s *ContactsService) Update(ctx context.Context, contactID string, contact ContactUpdate) (*Contact, error)

Update updates an existing contact.

type ContentImportSource

type ContentImportSource = gen.ContentImportSourceSchema

ContentImportSource is an Intercom AI content import source.

type ContentImportSourceCreate

type ContentImportSourceCreate = gen.CreateContentImportSourceRequestSchema

ContentImportSourceCreate holds the fields for creating a content import source.

type ContentImportSourceList

type ContentImportSourceList = gen.ContentImportSourcesListSchema

ContentImportSourceList is a list of content import sources.

type ContentImportSourceUpdate

type ContentImportSourceUpdate = gen.UpdateContentImportSourceRequestSchema

ContentImportSourceUpdate holds the fields for updating a content import source.

type Conversation

type Conversation = gen.ConversationSchema

Conversation is an Intercom conversation.

type ConversationAdminReply

type ConversationAdminReply = gen.AdminReplyConversationRequestSchema

ConversationAdminReply holds the fields for replying to a conversation as an admin.

type ConversationAssign

type ConversationAssign = gen.AssignConversationRequestSchema

ConversationAssign holds the fields for assigning a conversation.

type ConversationAttachContact

type ConversationAttachContact = gen.AttachContactToConversationRequestSchema

ConversationAttachContact holds the fields for attaching a contact to a conversation.

type ConversationClose

type ConversationClose = gen.CloseConversationRequestSchema

ConversationClose holds the fields for closing a conversation.

type ConversationContactReply

type ConversationContactReply = gen.ContactReplyBaseRequestSchema

ConversationContactReply holds the fields for replying to a conversation as a contact.

type ConversationCreate

type ConversationCreate = gen.CreateConversationRequestSchema

ConversationCreate holds the fields for creating a conversation.

type ConversationDeleted

type ConversationDeleted = gen.ConversationDeletedSchema

ConversationDeleted is the result of deleting a conversation.

type ConversationDetachContact

type ConversationDetachContact = gen.DetachContactFromConversationRequest

ConversationDetachContact holds the fields for detaching a contact from a conversation.

type ConversationHandlingEvent

type ConversationHandlingEvent = gen.HandlingEventSchema

ConversationHandlingEvent is a pause or resume event recorded for a conversation.

type ConversationHandlingEventList

type ConversationHandlingEventList = gen.HandlingEventListSchema

ConversationHandlingEventList is a list of handling events for a conversation.

type ConversationList

type ConversationList = gen.ConversationListSchema

ConversationList is a page of Intercom conversations.

type ConversationMessage

type ConversationMessage = gen.MessageSchema

ConversationMessage is the result of creating a conversation.

type ConversationOpen

type ConversationOpen = gen.OpenConversationRequestSchema

ConversationOpen holds the fields for re-opening a conversation.

type ConversationRedactPart

type ConversationRedactPart = gen.RedactConversationRequest0

ConversationRedactPart holds the fields for redacting a conversation part.

type ConversationRedactSource

type ConversationRedactSource = gen.RedactConversationRequest1

ConversationRedactSource holds the fields for redacting a conversation source.

type ConversationSearchQuery

type ConversationSearchQuery = gen.SearchRequestSchema

ConversationSearchQuery holds the query for searching conversations.

type ConversationSnooze

type ConversationSnooze = gen.SnoozeConversationRequestSchema

ConversationSnooze holds the fields for snoozing a conversation.

type ConversationToTicket

type ConversationToTicket = gen.ConvertConversationToTicketRequestSchema

ConversationToTicket holds the fields for converting a conversation to a ticket.

type ConversationUpdate

type ConversationUpdate = gen.UpdateConversationRequestSchema

ConversationUpdate holds the fields for updating a conversation.

type ConversationsService

type ConversationsService struct {
	// contains filtered or unexported fields
}

ConversationsService exposes conversation-related Intercom API operations.

func (*ConversationsService) Assign

func (s *ConversationsService) Assign(ctx context.Context, conversationID string, assign ConversationAssign) (*Conversation, error)

Assign assigns a conversation to an admin or team.

func (*ConversationsService) AttachContact

func (s *ConversationsService) AttachContact(ctx context.Context, conversationID string, req ConversationAttachContact) (*Conversation, error)

AttachContact attaches a contact to a conversation.

func (*ConversationsService) AttachTag

func (s *ConversationsService) AttachTag(ctx context.Context, conversationID, tagID, adminID string) (*Tag, error)

AttachTag attaches a tag to a conversation.

func (*ConversationsService) Close

func (s *ConversationsService) Close(ctx context.Context, conversationID string, req ConversationClose) (*Conversation, error)

Close closes a conversation.

func (*ConversationsService) ConvertToTicket

func (s *ConversationsService) ConvertToTicket(ctx context.Context, conversationID string, req ConversationToTicket) (*Ticket, error)

ConvertToTicket converts a conversation to a ticket.

func (*ConversationsService) Create

Create creates a new conversation initiated from a contact.

func (*ConversationsService) Delete

func (s *ConversationsService) Delete(ctx context.Context, conversationID string) (*ConversationDeleted, error)

Delete deletes a conversation.

func (*ConversationsService) DetachContact

func (s *ConversationsService) DetachContact(ctx context.Context, conversationID, contactID string, req ConversationDetachContact) (*Conversation, error)

DetachContact detaches a contact from a conversation.

func (*ConversationsService) DetachTag

func (s *ConversationsService) DetachTag(ctx context.Context, conversationID, tagID, adminID string) (*Tag, error)

DetachTag detaches a tag from a conversation.

func (*ConversationsService) Get

func (s *ConversationsService) Get(ctx context.Context, conversationID string) (*Conversation, error)

Get retrieves a conversation by Intercom conversation ID.

func (*ConversationsService) List

List returns all conversations.

func (*ConversationsService) ListHandlingEvents

func (s *ConversationsService) ListHandlingEvents(ctx context.Context, conversationID string) (*ConversationHandlingEventList, error)

ListHandlingEvents returns pause and resume events for a conversation.

func (*ConversationsService) Open

func (s *ConversationsService) Open(ctx context.Context, conversationID string, req ConversationOpen) (*Conversation, error)

Open re-opens a snoozed or closed conversation.

func (*ConversationsService) RedactPart

RedactPart redacts a message part from a conversation.

func (*ConversationsService) RedactSource

RedactSource redacts a source message from a conversation.

func (*ConversationsService) Reply

func (s *ConversationsService) Reply(ctx context.Context, conversationID string, reply ConversationAdminReply) (*Conversation, error)

Reply sends an admin reply to a conversation.

func (*ConversationsService) ReplyAsContact

func (s *ConversationsService) ReplyAsContact(ctx context.Context, conversationID string, reply ConversationContactReply) (*Conversation, error)

ReplyAsContact sends a contact reply to a conversation.

func (*ConversationsService) Search

Search searches conversations using an Intercom search query.

func (*ConversationsService) Snooze

func (s *ConversationsService) Snooze(ctx context.Context, conversationID string, req ConversationSnooze) (*Conversation, error)

Snooze snoozes a conversation until the given time.

func (*ConversationsService) Update

func (s *ConversationsService) Update(ctx context.Context, conversationID string, conversation ConversationUpdate) (*Conversation, error)

Update updates an existing conversation.

type CustomObjectInstance

type CustomObjectInstance = gen.CustomObjectInstanceSchema

CustomObjectInstance is an Intercom custom object instance.

type CustomObjectInstanceCreateOrUpdate

type CustomObjectInstanceCreateOrUpdate = gen.CreateOrUpdateCustomObjectInstanceRequestSchema

CustomObjectInstanceCreateOrUpdate holds the fields for creating or updating a custom object instance.

type CustomObjectInstanceDeleted

type CustomObjectInstanceDeleted = gen.CustomObjectInstanceDeletedSchema

CustomObjectInstanceDeleted is a deleted Intercom custom object instance response.

type CustomObjectsService

type CustomObjectsService struct {
	// contains filtered or unexported fields
}

CustomObjectsService exposes custom-object instance Intercom API operations.

func (*CustomObjectsService) CreateOrUpdate

func (s *CustomObjectsService) CreateOrUpdate(ctx context.Context, customObjectType string, instance CustomObjectInstanceCreateOrUpdate) (*CustomObjectInstance, error)

CreateOrUpdate creates or updates a custom object instance for a custom object type.

func (*CustomObjectsService) Delete

func (s *CustomObjectsService) Delete(ctx context.Context, customObjectType, instanceID string) (*CustomObjectInstanceDeleted, error)

Delete deletes a custom object instance by Intercom ID.

func (*CustomObjectsService) DeleteByExternalID

func (s *CustomObjectsService) DeleteByExternalID(ctx context.Context, customObjectType, externalID string) (*CustomObjectInstanceDeleted, error)

DeleteByExternalID deletes a custom object instance by external ID.

func (*CustomObjectsService) Get

func (s *CustomObjectsService) Get(ctx context.Context, customObjectType, instanceID string) (*CustomObjectInstance, error)

Get returns a custom object instance by Intercom ID.

func (*CustomObjectsService) GetByExternalID

func (s *CustomObjectsService) GetByExternalID(ctx context.Context, customObjectType, externalID string) (*CustomObjectInstance, error)

GetByExternalID returns a custom object instance by external ID.

type DataAttribute

type DataAttribute = gen.DataAttributeSchema

DataAttribute is an Intercom data attribute.

type DataAttributeCreate

type DataAttributeCreate struct {
	Name              string
	Model             DataAttributeModel
	DataType          DataAttributeDataType
	Description       *string
	MessengerWritable *bool
	Options           []string
}

DataAttributeCreate holds the fields for creating a data attribute.

type DataAttributeDataType

type DataAttributeDataType string

DataAttributeDataType identifies the stored value type for a data attribute.

const (
	DataAttributeDataTypeString  DataAttributeDataType = "string"
	DataAttributeDataTypeInteger DataAttributeDataType = "integer"
	DataAttributeDataTypeFloat   DataAttributeDataType = "float"
	DataAttributeDataTypeBoolean DataAttributeDataType = "boolean"
	DataAttributeDataTypeDate    DataAttributeDataType = "date"
	DataAttributeDataTypeList    DataAttributeDataType = "list"
)

type DataAttributeList

type DataAttributeList = gen.DataAttributeListSchema

DataAttributeList is a list of Intercom data attributes.

type DataAttributeListParams

type DataAttributeListParams struct {
	Model           DataAttributeModel
	IncludeArchived bool
}

DataAttributeListParams configures data attribute listing.

type DataAttributeModel

type DataAttributeModel string

DataAttributeModel identifies which Intercom model a data attribute belongs to.

const (
	DataAttributeModelContact      DataAttributeModel = "contact"
	DataAttributeModelCompany      DataAttributeModel = "company"
	DataAttributeModelConversation DataAttributeModel = "conversation"
)

type DataAttributeUpdate

type DataAttributeUpdate struct {
	Archived          *bool
	Description       *string
	MessengerWritable *bool
	Options           []string
}

DataAttributeUpdate holds the fields for updating a data attribute.

type DataAttributesService

type DataAttributesService struct {
	// contains filtered or unexported fields
}

DataAttributesService exposes data-attribute Intercom API operations.

func (*DataAttributesService) Create

Create creates a new contact or company data attribute.

func (*DataAttributesService) List

List returns data attributes for the workspace.

func (*DataAttributesService) Update

func (s *DataAttributesService) Update(ctx context.Context, dataAttributeID string, attribute DataAttributeUpdate) (*DataAttribute, error)

Update updates or archives a data attribute.

type DataEvent

type DataEvent = gen.DataEventSchema

DataEvent is an Intercom data event.

type DataEventCreate

type DataEventCreate struct {
	EventName string
	CreatedAt *int
	UserID    *string
	Email     *string
	ID        *string
	Metadata  map[string]any
}

DataEventCreate holds the fields for submitting a data event.

type DataEventListFilter

type DataEventListFilter struct {
	UserID         string
	IntercomUserID string
	Email          string
	Summary        bool
}

DataEventListFilter identifies which user's events to query.

type DataEventSummariesCreate

type DataEventSummariesCreate struct {
	UserID         string
	EventSummaries []DataEventSummaryCreate
}

DataEventSummariesCreate holds the fields for creating event summaries.

type DataEventSummary

type DataEventSummary = gen.DataEventSummarySchema

DataEventSummary is an Intercom data event summary response.

type DataEventSummaryCreate

type DataEventSummaryCreate struct {
	EventName string
	Count     int
	First     *int
	Last      *int
}

DataEventSummaryCreate holds the fields for a single summary item.

type DataEventSummaryItem

type DataEventSummaryItem = gen.DataEventSummaryItemSchema

DataEventSummaryItem is a summarized data event.

type DataEventsService

type DataEventsService struct {
	// contains filtered or unexported fields
}

DataEventsService exposes Intercom data-event API operations.

func (*DataEventsService) Create

func (s *DataEventsService) Create(ctx context.Context, event DataEventCreate) error

Create submits a data event.

func (*DataEventsService) CreateSummaries

func (s *DataEventsService) CreateSummaries(ctx context.Context, summaries DataEventSummariesCreate) error

CreateSummaries submits summarized data events for a user.

func (*DataEventsService) List

List returns data event summaries for a user or lead.

type DataExport

type DataExport = gen.DataExportSchema

DataExport is an Intercom content data export job.

type DataExportCreate

type DataExportCreate = gen.CreateDataExportsRequestSchema

DataExportCreate holds the fields for creating a content data export.

type EmailList

type EmailList = gen.EmailListSchema

EmailList is a list of Intercom sender email settings.

type EmailSetting

type EmailSetting = gen.EmailSettingSchema

EmailSetting is an Intercom sender email setting.

type EmailsService

type EmailsService struct {
	// contains filtered or unexported fields
}

EmailsService exposes email-setting Intercom API operations.

func (*EmailsService) List

func (s *EmailsService) List(ctx context.Context) (*EmailList, error)

List returns sender email settings for the workspace.

func (*EmailsService) Retrieve

func (s *EmailsService) Retrieve(ctx context.Context, emailID string) (*EmailSetting, error)

Retrieve fetches a sender email setting by ID.

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

Error describes one Intercom API error.

type ErrorResponse

type ErrorResponse struct {
	StatusCode int
	Type       string  `json:"type"`
	RequestID  string  `json:"request_id"`
	Errors     []Error `json:"errors"`
	Body       string  `json:"-"`
}

ErrorResponse is returned when Intercom responds with a non-2xx status code.

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type ExternalPage

type ExternalPage = gen.ExternalPageSchema

ExternalPage is an Intercom AI external page.

type ExternalPageCreate

type ExternalPageCreate = gen.CreateExternalPageRequestSchema

ExternalPageCreate holds the fields for creating an external page.

type ExternalPageList

type ExternalPageList = gen.ExternalPagesListSchema

ExternalPageList is a list of external pages.

type ExternalPageUpdate

type ExternalPageUpdate = gen.UpdateExternalPageRequestSchema

ExternalPageUpdate holds the fields for updating an external page.

type FinAttachment

type FinAttachment = gen.FinAgentAttachmentSchema

FinAttachment is an attachment included with a Fin request.

type FinAttachmentType

type FinAttachmentType = gen.FinAgentAttachmentType

FinAttachmentType identifies the type of attachment included with a Fin request.

const (
	FinAttachmentTypeFile FinAttachmentType = gen.File
	FinAttachmentTypeURL  FinAttachmentType = gen.Url
)

type FinConversationAttributeErrors

type FinConversationAttributeErrors struct {
	Attributes *map[string]string `json:"attributes,omitempty"`
}

FinConversationAttributeErrors groups validation errors for a Fin object.

type FinConversationErrors

type FinConversationErrors struct {
	Conversation *FinConversationAttributeErrors `json:"conversation,omitempty"`
	User         *FinConversationAttributeErrors `json:"user,omitempty"`
}

FinConversationErrors groups validation errors returned by Fin conversation endpoints.

type FinConversationMetadata

type FinConversationMetadata = gen.FinAgentConversationMetadataSchema

FinConversationMetadata provides extra context for a Fin conversation.

type FinConversationResponse

type FinConversationResponse struct {
	ConversationID     *string                `json:"conversation_id,omitempty"`
	CreatedAtMs        *string                `json:"created_at_ms,omitempty"`
	Errors             *FinConversationErrors `json:"errors,omitempty"`
	SSESubscriptionURL *string                `json:"sse_subscription_url,omitempty"`
	Status             *string                `json:"status,omitempty"`
	UserID             *string                `json:"user_id,omitempty"`
}

FinConversationResponse is the response from Fin conversation APIs.

type FinMessage

type FinMessage = gen.FinAgentMessageSchema

FinMessage is a message exchanged within a Fin conversation.

type FinMessageAuthor

type FinMessageAuthor = gen.FinAgentMessageAuthor

FinMessageAuthor identifies who sent a Fin conversation message.

const (
	FinMessageAuthorAgent FinMessageAuthor = gen.FinAgentMessageAuthorAgent
	FinMessageAuthorFin   FinMessageAuthor = gen.FinAgentMessageAuthorFin
	FinMessageAuthorUser  FinMessageAuthor = gen.FinAgentMessageAuthorUser
)

type FinReply

type FinReply struct {
	Attachments    *[]FinAttachment `json:"attachments,omitempty"`
	ConversationId string           `json:"conversation_id"`
	Message        FinMessage       `json:"message"`
	User           FinUser          `json:"user"`
}

FinReply is a request to continue a Fin conversation.

type FinService

type FinService struct {
	// contains filtered or unexported fields
}

FinService exposes Fin-related Intercom API operations.

func (*FinService) GetVoiceCallByExternalID

func (s *FinService) GetVoiceCallByExternalID(ctx context.Context, externalID string) (*FinVoiceCall, error)

GetVoiceCallByExternalID retrieves a Fin voice call by external ID.

func (*FinService) GetVoiceCallByID

func (s *FinService) GetVoiceCallByID(ctx context.Context, id string) (*FinVoiceCall, error)

GetVoiceCallByID retrieves a Fin voice call by ID.

func (*FinService) GetVoiceCallByPhoneNumber

func (s *FinService) GetVoiceCallByPhoneNumber(ctx context.Context, phoneNumber string) (*FinVoiceCall, error)

GetVoiceCallByPhoneNumber retrieves a Fin voice call lookup by phone number.

func (*FinService) ListVoiceCallsByConversation

func (s *FinService) ListVoiceCallsByConversation(ctx context.Context, conversationID string) ([]FinVoiceCall, error)

ListVoiceCallsByConversation returns Fin voice calls for a conversation.

func (*FinService) RegisterVoiceCall

func (s *FinService) RegisterVoiceCall(ctx context.Context, req RegisterFinVoiceCallRequest) (*FinVoiceCall, error)

RegisterVoiceCall registers a Fin voice call.

func (*FinService) Reply

Reply continues a Fin conversation.

func (*FinService) StartConversation

func (s *FinService) StartConversation(ctx context.Context, req FinStartConversation) (*FinConversationResponse, error)

StartConversation starts a Fin conversation.

type FinStartConversation

type FinStartConversation struct {
	Attachments          *[]FinAttachment         `json:"attachments,omitempty"`
	ConversationId       string                   `json:"conversation_id"`
	ConversationMetadata *FinConversationMetadata `json:"conversation_metadata,omitempty"`
	Message              FinMessage               `json:"message"`
	User                 FinUser                  `json:"user"`
}

FinStartConversation is a request to start a Fin conversation.

type FinUser

type FinUser = gen.FinAgentUserSchema

FinUser identifies the user participating in a Fin conversation.

type FinVoiceCall

type FinVoiceCall = gen.AiCallResponseSchema

FinVoiceCall is the response for a Fin Voice call registration or lookup.

type FinVoiceCallSource

type FinVoiceCallSource = gen.RegisterFinVoiceCallRequestSource

FinVoiceCallSource identifies the call provider for Fin Voice calls.

const (
	FinVoiceCallSourceAWSConnect FinVoiceCallSource = gen.AwsConnect
	FinVoiceCallSourceFive9      FinVoiceCallSource = gen.Five9
	FinVoiceCallSourceZoomPhone  FinVoiceCallSource = gen.ZoomPhone
)

type HelpCenter

type HelpCenter = gen.HelpCenterSchema

HelpCenter is an Intercom help center.

type HelpCenterList

type HelpCenterList = gen.HelpCenterListSchema

HelpCenterList is a list of Intercom help centers.

type HelpCentersService

type HelpCentersService struct {
	// contains filtered or unexported fields
}

HelpCentersService exposes help-center-related Intercom API operations.

func (*HelpCentersService) List

List returns all help centers.

func (*HelpCentersService) Retrieve

func (s *HelpCentersService) Retrieve(ctx context.Context, helpCenterID string) (*HelpCenter, error)

Retrieve returns a help center by ID.

type IPAllowlist

type IPAllowlist = gen.IpAllowlistSchema

IPAllowlist is the workspace IP allowlist configuration.

type InternalArticle

type InternalArticle = gen.InternalArticleSchema

InternalArticle is an Intercom internal article.

type InternalArticleCreate

type InternalArticleCreate = gen.CreateInternalArticleRequestSchema

InternalArticleCreate holds the fields for creating an internal article.

type InternalArticleDeleted

type InternalArticleDeleted = gen.DeletedInternalArticleObjectSchema

InternalArticleDeleted is the result of deleting an internal article.

type InternalArticleList

type InternalArticleList = gen.InternalArticleListSchema

InternalArticleList is a list of internal articles.

type InternalArticleSearchResult

type InternalArticleSearchResult = gen.InternalArticleSearchResponseSchema

InternalArticleSearchResult is the result of an internal article search.

type InternalArticleUpdate

type InternalArticleUpdate = gen.UpdateInternalArticleRequestSchema

InternalArticleUpdate holds the fields for updating an internal article.

type InternalArticlesService

type InternalArticlesService struct {
	// contains filtered or unexported fields
}

InternalArticlesService exposes internal-article-related Intercom API operations.

func (*InternalArticlesService) Create

Create creates an internal article.

func (*InternalArticlesService) Delete

Delete deletes an internal article by ID.

func (*InternalArticlesService) List

List returns all internal articles.

func (*InternalArticlesService) Retrieve

func (s *InternalArticlesService) Retrieve(ctx context.Context, articleID string) (*InternalArticle, error)

Retrieve returns an internal article by ID.

func (*InternalArticlesService) Search

Search searches internal articles.

func (*InternalArticlesService) Update

Update updates an internal article by ID.

type Job

type Job = gen.JobsSchema

Job is an Intercom async job.

type Message

type Message = gen.MessageSchema

Message is an Intercom outbound message.

type MessageCreate

type MessageCreate = gen.CreateMessageJSONRequestBody

MessageCreate holds the fields for creating a message.

type MessagesService

type MessagesService struct {
	// contains filtered or unexported fields
}

MessagesService exposes message-related Intercom API operations.

func (*MessagesService) Create

func (s *MessagesService) Create(ctx context.Context, message MessageCreate) (*Message, error)

Create creates a message.

type NewsCursorPages

type NewsCursorPages = gen.CursorPagesSchema

NewsCursorPages holds pagination details for a paginated news response.

type NewsItem

type NewsItem = gen.NewsItemSchema

NewsItem is an Intercom news item.

type NewsItemCreate

type NewsItemCreate = gen.NewsItemRequestSchema

NewsItemCreate holds the fields for creating a news item.

type NewsItemList

type NewsItemList struct {
	Data       *[]NewsItem      `json:"data,omitempty"`
	Pages      *NewsCursorPages `json:"pages,omitempty"`
	TotalCount *int             `json:"total_count,omitempty"`
	Type       *NewsListType    `json:"type,omitempty"`
}

NewsItemList is a paginated list of Intercom news items.

type NewsItemUpdate

type NewsItemUpdate = gen.NewsItemRequestSchema

NewsItemUpdate holds the fields for updating a news item.

type NewsListType

type NewsListType = gen.PaginatedResponseType

NewsListType identifies the type of a paginated news response.

type NewsService

type NewsService struct {
	// contains filtered or unexported fields
}

NewsService exposes news-related Intercom API operations.

func (*NewsService) CreateItem

func (s *NewsService) CreateItem(ctx context.Context, item NewsItemCreate) (*NewsItem, error)

CreateItem creates a news item.

func (*NewsService) DeleteItem

func (s *NewsService) DeleteItem(ctx context.Context, newsItemID string) error

DeleteItem deletes a news item by ID.

func (*NewsService) ListFeedItems

func (s *NewsService) ListFeedItems(ctx context.Context, newsfeedID string) (*NewsItemList, error)

ListFeedItems returns live items for a newsfeed.

func (*NewsService) ListFeeds

func (s *NewsService) ListFeeds(ctx context.Context) (*NewsfeedList, error)

ListFeeds returns all newsfeeds.

func (*NewsService) ListItems

func (s *NewsService) ListItems(ctx context.Context) (*NewsItemList, error)

ListItems returns all news items.

func (*NewsService) RetrieveFeed

func (s *NewsService) RetrieveFeed(ctx context.Context, newsfeedID string) (*Newsfeed, error)

RetrieveFeed returns a newsfeed by ID.

func (*NewsService) RetrieveItem

func (s *NewsService) RetrieveItem(ctx context.Context, newsItemID string) (*NewsItem, error)

RetrieveItem returns a news item by ID.

func (*NewsService) UpdateItem

func (s *NewsService) UpdateItem(ctx context.Context, newsItemID string, item NewsItemUpdate) (*NewsItem, error)

UpdateItem updates a news item by ID.

type Newsfeed

type Newsfeed = gen.NewsfeedSchema

Newsfeed is an Intercom newsfeed.

type NewsfeedList

type NewsfeedList struct {
	Data       *[]Newsfeed      `json:"data,omitempty"`
	Pages      *NewsCursorPages `json:"pages,omitempty"`
	TotalCount *int             `json:"total_count,omitempty"`
	Type       *NewsListType    `json:"type,omitempty"`
}

NewsfeedList is a paginated list of Intercom newsfeeds.

type Note

type Note = gen.NoteSchema

Note is an Intercom note on a contact.

type NoteList

type NoteList = gen.NoteListSchema

NoteList is a list of notes.

type NotesService

type NotesService struct {
	// contains filtered or unexported fields
}

NotesService exposes note-related Intercom API operations.

func (*NotesService) Retrieve

func (s *NotesService) Retrieve(ctx context.Context, noteID string) (*Note, error)

Retrieve returns a note by ID.

type Option

type Option func(*Client) error

Option configures a Client.

func WithAPIVersion

func WithAPIVersion(version string) Option

WithAPIVersion configures the Intercom-Version header.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL configures a custom API base URL.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient configures the HTTP client used to send requests.

func WithRegion

func WithRegion(region Region) Option

WithRegion configures the Intercom API region.

func WithUserAgent

func WithUserAgent(userAgent string) Option

WithUserAgent configures the User-Agent header.

type PageInfo

type PageInfo struct {
	Type       string             `json:"type,omitempty"`
	Page       int                `json:"page,omitempty"`
	PerPage    int                `json:"per_page,omitempty"`
	TotalPages int                `json:"total_pages,omitempty"`
	Next       *StartingAfterPage `json:"next,omitempty"`
}

PageInfo describes cursor pagination metadata returned by many Intercom list endpoints.

func (PageInfo) HasNext

func (p PageInfo) HasNext() bool

HasNext reports whether another cursor page is available.

type PhoneSwitch

type PhoneSwitch = gen.PhoneSwitchSchema

PhoneSwitch is an Intercom phone switch response.

type PhoneSwitchCreate

type PhoneSwitchCreate = gen.CreatePhoneSwitchRequestSchema

PhoneSwitchCreate holds the fields for creating a phone switch.

type PhoneSwitchesService

type PhoneSwitchesService struct {
	// contains filtered or unexported fields
}

PhoneSwitchesService exposes phone-switch-related Intercom API operations.

func (*PhoneSwitchesService) Create

Create creates a phone switch.

type Region

type Region string

Region identifies an Intercom API region.

const (
	US Region = "us"
	EU Region = "eu"
	AU Region = "au"
)

type RegisterFinVoiceCallRequest

type RegisterFinVoiceCallRequest = gen.RegisterFinVoiceCallRequestSchema

RegisterFinVoiceCallRequest holds the fields for registering a Fin Voice call.

type ReportingDataset

type ReportingDataset struct {
	Attributes             *[]ReportingDatasetAttribute `json:"attributes,omitempty"`
	DefaultTimeAttributeID *string                      `json:"default_time_attribute_id,omitempty"`
	Description            *string                      `json:"description,omitempty"`
	ID                     *string                      `json:"id,omitempty"`
	Name                   *string                      `json:"name,omitempty"`
}

ReportingDataset is a reporting dataset.

type ReportingDatasetAttribute

type ReportingDatasetAttribute struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

ReportingDatasetAttribute is a reporting dataset attribute.

type ReportingDatasetList

type ReportingDatasetList struct {
	Data *[]ReportingDataset `json:"data,omitempty"`
	Type *string             `json:"type,omitempty"`
}

ReportingDatasetList is a list of reporting datasets.

type ReportingExportCreate

type ReportingExportCreate = gen.PostExportReportingDataEnqueueJSONBody

ReportingExportCreate holds the fields for creating a reporting export job.

type ReportingExportJob

type ReportingExportJob struct {
	DownloadExpiresAt *string `json:"download_expires_at,omitempty"`
	DownloadURL       *string `json:"download_url,omitempty"`
	JobIdentifier     *string `json:"job_identifier,omitempty"`
	Status            *string `json:"status,omitempty"`
}

ReportingExportJob is a reporting export job.

type Segment

type Segment = gen.SegmentSchema

Segment is an Intercom segment.

type SegmentList

type SegmentList = gen.SegmentListSchema

SegmentList is a list of Intercom segments.

type SegmentsService

type SegmentsService struct {
	// contains filtered or unexported fields
}

SegmentsService exposes segment-related Intercom API operations.

func (*SegmentsService) List

func (s *SegmentsService) List(ctx context.Context) (*SegmentList, error)

List returns all segments for the workspace.

func (*SegmentsService) Retrieve

func (s *SegmentsService) Retrieve(ctx context.Context, segmentID string) (*Segment, error)

Retrieve returns a segment by ID.

type StartingAfterPage

type StartingAfterPage struct {
	PerPage       int    `json:"per_page,omitempty"`
	StartingAfter string `json:"starting_after,omitempty"`
}

StartingAfterPage describes the next cursor page in Intercom responses.

type SubscriptionType

type SubscriptionType = gen.SubscriptionTypeSchema

SubscriptionType is an Intercom subscription type.

type SubscriptionTypeList

type SubscriptionTypeList = gen.SubscriptionTypeListSchema

SubscriptionTypeList is a list of subscription types.

type SubscriptionTypesService

type SubscriptionTypesService struct {
	// contains filtered or unexported fields
}

SubscriptionTypesService exposes subscription-type-related Intercom API operations.

func (*SubscriptionTypesService) List

List returns all subscription types for the workspace.

type Tag

type Tag = gen.TagSchema

Tag is an Intercom tag.

type TagCompanyReference

type TagCompanyReference struct {
	CompanyID *string `json:"company_id,omitempty"`
	ID        *string `json:"id,omitempty"`
}

TagCompanyReference identifies a company in a tag company request.

type TagCompanyRequest

type TagCompanyRequest struct {
	Companies []TagCompanyReference `json:"companies"`
	Name      string                `json:"name"`
}

TagCompanyRequest tags one or more companies with a tag name.

type TagCompanyUntagReference

type TagCompanyUntagReference struct {
	CompanyID *string `json:"company_id,omitempty"`
	ID        *string `json:"id,omitempty"`
	Untag     bool    `json:"untag"`
}

TagCompanyUntagReference identifies a company to untag.

type TagCompanyUntagRequest

type TagCompanyUntagRequest struct {
	Companies []TagCompanyUntagReference `json:"companies"`
	Name      string                     `json:"name"`
}

TagCompanyUntagRequest removes a tag from one or more companies.

func (TagCompanyUntagRequest) MarshalJSON

func (r TagCompanyUntagRequest) MarshalJSON() ([]byte, error)

MarshalJSON ensures Intercom's required `untag: true` flag is always present.

type TagCreateOrUpdateRequest

type TagCreateOrUpdateRequest struct {
	ID   *string `json:"id,omitempty"`
	Name string  `json:"name"`
}

TagCreateOrUpdateRequest creates a new tag or renames an existing one.

type TagCreateRequest

type TagCreateRequest interface {
	// contains filtered or unexported methods
}

TagCreateRequest is a supported request body for the tag create/update endpoint.

type TagDetail

type TagDetail = gen.TagBasicSchema

TagDetail is a single Intercom tag returned by the tag lookup endpoint.

type TagList

type TagList = gen.TagListSchema

TagList is a list of tags.

type TagUserReference

type TagUserReference struct {
	ID string `json:"id"`
}

TagUserReference identifies a contact in a tag users request.

type TagUsersRequest

type TagUsersRequest struct {
	Name  string             `json:"name"`
	Users []TagUserReference `json:"users"`
}

TagUsersRequest tags one or more contacts with a tag name.

type TagsService

type TagsService struct {
	// contains filtered or unexported fields
}

TagsService exposes tag-related Intercom API operations.

func (*TagsService) Create

func (s *TagsService) Create(ctx context.Context, req TagCreateRequest) (*TagDetail, error)

Create creates or updates a tag, or applies tag operations supported by the endpoint.

func (*TagsService) Delete

func (s *TagsService) Delete(ctx context.Context, tagID string) error

Delete deletes a tag by ID.

func (*TagsService) List

func (s *TagsService) List(ctx context.Context) (*TagList, error)

List returns all tags for the workspace.

func (*TagsService) Retrieve

func (s *TagsService) Retrieve(ctx context.Context, tagID string) (*TagDetail, error)

Retrieve returns a tag by ID.

type Team

type Team = gen.TeamSchema

Team is an Intercom team.

type TeamList

type TeamList = gen.TeamListSchema

TeamList is a list of Intercom teams.

type TeamsService

type TeamsService struct {
	// contains filtered or unexported fields
}

TeamsService exposes team-related Intercom API operations.

func (*TeamsService) List

func (s *TeamsService) List(ctx context.Context) (*TeamList, error)

List returns all teams for the workspace.

func (*TeamsService) Retrieve

func (s *TeamsService) Retrieve(ctx context.Context, teamID string) (*Team, error)

Retrieve returns a team by ID.

type Ticket

type Ticket = gen.TicketSchema

Ticket is an Intercom ticket.

type TicketAdminReply

type TicketAdminReply struct {
	AdminID        string                 `json:"admin_id"`
	AttachmentURLs *[]string              `json:"attachment_urls,omitempty"`
	Body           *string                `json:"body,omitempty"`
	CreatedAt      *int                   `json:"created_at,omitempty"`
	CrossPost      *bool                  `json:"cross_post,omitempty"`
	MessageType    TicketReplyMessageType `json:"message_type"`
	ReplyOptions   *[]TicketReplyOption   `json:"reply_options,omitempty"`
}

TicketAdminReply replies to a ticket on behalf of an admin.

type TicketContact

type TicketContact = gen.CreateTicketRequest_Contacts_Item

TicketContact is a contact selector included in a ticket create request.

func NewTicketContactByEmail

func NewTicketContactByEmail(email string) TicketContact

NewTicketContactByEmail constructs a ticket contact selector from a contact email.

func NewTicketContactByExternalID

func NewTicketContactByExternalID(externalID string) TicketContact

NewTicketContactByExternalID constructs a ticket contact selector from an external contact ID.

func NewTicketContactByID

func NewTicketContactByID(id string) TicketContact

NewTicketContactByID constructs a ticket contact selector from an Intercom contact ID.

type TicketContactEmail

type TicketContactEmail = gen.CreateTicketRequestContacts2

TicketContactEmail selects a ticket contact by email address.

type TicketContactExternalID

type TicketContactExternalID = gen.CreateTicketRequestContacts1

TicketContactExternalID selects a ticket contact by external ID.

type TicketContactID

type TicketContactID = gen.CreateTicketRequestContacts0

TicketContactID selects a ticket contact by Intercom contact ID.

type TicketContactReply

type TicketContactReply struct {
	AttachmentURLs *[]string            `json:"attachment_urls,omitempty"`
	Body           string               `json:"body"`
	Contact        TicketReplyContact   `json:"-"`
	CreatedAt      *int                 `json:"created_at,omitempty"`
	ReplyOptions   *[]TicketReplyOption `json:"reply_options,omitempty"`
}

TicketContactReply replies to a ticket on behalf of a contact.

type TicketCreate

type TicketCreate = gen.CreateTicketJSONBody

TicketCreate holds the fields for creating a ticket.

type TicketEnqueued

type TicketEnqueued = gen.JobsSchema

TicketEnqueued is an async ticket creation job.

type TicketList

type TicketList = gen.TicketListSchema

TicketList is a list of Intercom tickets.

type TicketReply

type TicketReply = gen.TicketReplySchema

TicketReply is the result of replying to a ticket.

type TicketReplyContact

type TicketReplyContact struct {
	Email          *string `json:"email,omitempty"`
	IntercomUserID *string `json:"intercom_user_id,omitempty"`
	UserID         *string `json:"user_id,omitempty"`
}

TicketReplyContact identifies the contact replying to a ticket.

func NewTicketReplyContactByEmail

func NewTicketReplyContactByEmail(email string) TicketReplyContact

NewTicketReplyContactByEmail constructs a ticket reply contact selector from an email address.

func NewTicketReplyContactByIntercomUserID

func NewTicketReplyContactByIntercomUserID(intercomUserID string) TicketReplyContact

NewTicketReplyContactByIntercomUserID constructs a ticket reply contact selector from an Intercom contact ID.

func NewTicketReplyContactByUserID

func NewTicketReplyContactByUserID(userID string) TicketReplyContact

NewTicketReplyContactByUserID constructs a ticket reply contact selector from an external user ID.

type TicketReplyMessageType

type TicketReplyMessageType string

TicketReplyMessageType identifies the kind of reply sent to a ticket.

const (
	// TicketReplyMessageTypeComment posts a visible comment reply to the ticket.
	TicketReplyMessageTypeComment TicketReplyMessageType = "comment"
	// TicketReplyMessageTypeNote posts an internal note on the ticket.
	TicketReplyMessageTypeNote TicketReplyMessageType = "note"
	// TicketReplyMessageTypeQuickReply posts a reply that includes quick-reply options.
	TicketReplyMessageTypeQuickReply TicketReplyMessageType = "quick_reply"
)

type TicketReplyOption

type TicketReplyOption struct {
	Text string `json:"text"`
	UUID string `json:"uuid"`
}

TicketReplyOption is a quick-reply option included in a ticket reply.

type TicketReplyRequest

type TicketReplyRequest interface {
	// contains filtered or unexported methods
}

TicketReplyRequest is a supported request body for the ticket reply endpoint.

type TicketSearchQuery

type TicketSearchQuery = gen.SearchRequestSchema

TicketSearchQuery holds the query for searching tickets.

type TicketState

type TicketState = gen.TicketStateDetailedSchema

TicketState is an Intercom ticket state.

type TicketStateList

type TicketStateList = gen.TicketStateListSchema

TicketStateList is a list of ticket states.

type TicketTagAttachRequest

type TicketTagAttachRequest = gen.AttachTagToTicketJSONBody

TicketTagAttachRequest holds the fields for attaching a tag to a ticket.

type TicketTagDetachRequest

type TicketTagDetachRequest = gen.DetachTagFromTicketJSONBody

TicketTagDetachRequest holds the fields for detaching a tag from a ticket.

type TicketType

type TicketType = gen.TicketTypeSchema

TicketType is an Intercom ticket type.

type TicketTypeAttribute

type TicketTypeAttribute = gen.TicketTypeAttributeSchema

TicketTypeAttribute is an Intercom ticket type attribute.

type TicketTypeAttributeCreate

type TicketTypeAttributeCreate = gen.CreateTicketTypeAttributeRequestSchema

TicketTypeAttributeCreate holds the fields for creating a ticket type attribute.

type TicketTypeAttributeUpdate

type TicketTypeAttributeUpdate = gen.UpdateTicketTypeAttributeRequestSchema

TicketTypeAttributeUpdate holds the fields for updating a ticket type attribute.

type TicketTypeCreate

type TicketTypeCreate = gen.CreateTicketTypeRequestSchema

TicketTypeCreate holds the fields for creating a ticket type.

type TicketTypeList

type TicketTypeList = gen.TicketTypeListSchema

TicketTypeList is a list of ticket types.

type TicketTypeUpdate

type TicketTypeUpdate = gen.UpdateTicketTypeRequestSchema

TicketTypeUpdate holds the fields for updating a ticket type.

type TicketUpdate

type TicketUpdate = gen.UpdateTicketJSONBody

TicketUpdate holds the fields for updating a ticket.

type TicketsService

type TicketsService struct {
	// contains filtered or unexported fields
}

TicketsService exposes ticket-related Intercom API operations.

func (*TicketsService) AttachTag

func (s *TicketsService) AttachTag(ctx context.Context, ticketID string, req TicketTagAttachRequest) (*Tag, error)

AttachTag attaches a tag to a ticket.

func (*TicketsService) Create

func (s *TicketsService) Create(ctx context.Context, ticket TicketCreate) (*Ticket, error)

Create creates a ticket.

func (*TicketsService) CreateType

func (s *TicketsService) CreateType(ctx context.Context, ticketType TicketTypeCreate) (*TicketType, error)

CreateType creates a ticket type.

func (*TicketsService) CreateTypeAttribute

func (s *TicketsService) CreateTypeAttribute(ctx context.Context, ticketTypeID string, attribute TicketTypeAttributeCreate) (*TicketTypeAttribute, error)

CreateTypeAttribute creates an attribute for a ticket type.

func (*TicketsService) Delete

func (s *TicketsService) Delete(ctx context.Context, ticketID string) error

Delete deletes a ticket by ID.

func (*TicketsService) DetachTag

func (s *TicketsService) DetachTag(ctx context.Context, ticketID, tagID string, req TicketTagDetachRequest) (*Tag, error)

DetachTag detaches a tag from a ticket.

func (*TicketsService) EnqueueCreate

func (s *TicketsService) EnqueueCreate(ctx context.Context, ticket TicketCreate) (*TicketEnqueued, error)

EnqueueCreate enqueues asynchronous ticket creation.

func (*TicketsService) Get

func (s *TicketsService) Get(ctx context.Context, ticketID string) (*Ticket, error)

Get retrieves a ticket by ID.

func (*TicketsService) GetType

func (s *TicketsService) GetType(ctx context.Context, ticketTypeID string) (*TicketType, error)

GetType retrieves a ticket type by ID.

func (*TicketsService) ListStates

func (s *TicketsService) ListStates(ctx context.Context) (*TicketStateList, error)

ListStates returns all ticket states for the workspace.

func (*TicketsService) ListTypes

func (s *TicketsService) ListTypes(ctx context.Context) (*TicketTypeList, error)

ListTypes returns all ticket types for the workspace.

func (*TicketsService) Reply

func (s *TicketsService) Reply(ctx context.Context, ticketID string, req TicketReplyRequest, skipNotifications *bool) (*TicketReply, error)

Reply replies to a ticket.

func (*TicketsService) Search

func (s *TicketsService) Search(ctx context.Context, query TicketSearchQuery) (*TicketList, error)

Search searches tickets using an Intercom search query.

func (*TicketsService) Update

func (s *TicketsService) Update(ctx context.Context, ticketID string, ticket TicketUpdate) (*Ticket, error)

Update updates a ticket by ID.

func (*TicketsService) UpdateType

func (s *TicketsService) UpdateType(ctx context.Context, ticketTypeID string, ticketType TicketTypeUpdate) (*TicketType, error)

UpdateType updates a ticket type by ID.

func (*TicketsService) UpdateTypeAttribute

func (s *TicketsService) UpdateTypeAttribute(ctx context.Context, ticketTypeID, attributeID string, attribute TicketTypeAttributeUpdate) (*TicketTypeAttribute, error)

UpdateTypeAttribute updates an attribute for a ticket type.

type Visitor

type Visitor = gen.VisitorSchema

Visitor is an Intercom visitor.

type VisitorConvert

type VisitorConvert struct {
	Type    string                `json:"type"`
	User    VisitorConvertContact `json:"user"`
	Visitor VisitorConvertSource  `json:"visitor"`
}

VisitorConvert holds the fields for converting a visitor.

type VisitorConvertContact

type VisitorConvertContact struct {
	Email  *string `json:"email,omitempty"`
	ID     *string `json:"id,omitempty"`
	UserID *string `json:"user_id,omitempty"`
}

VisitorConvertContact identifies the contact retained after converting a visitor.

type VisitorConvertSource

type VisitorConvertSource struct {
	Email  *string `json:"email,omitempty"`
	ID     *string `json:"id,omitempty"`
	UserID *string `json:"user_id,omitempty"`
}

VisitorConvertSource identifies the visitor to convert.

type VisitorConverted

type VisitorConverted = gen.ContactSchema

VisitorConverted is the contact returned after converting a visitor.

type VisitorUpdate

type VisitorUpdate struct {
	CustomAttributes *map[string]string `json:"custom_attributes,omitempty"`
	ID               *string            `json:"id,omitempty"`
	Name             *string            `json:"name,omitempty"`
	UserID           *string            `json:"user_id,omitempty"`
}

VisitorUpdate holds the fields for updating a visitor.

type VisitorsService

type VisitorsService struct {
	// contains filtered or unexported fields
}

VisitorsService exposes visitor-related Intercom API operations.

func (*VisitorsService) Convert

Convert converts a visitor into a contact.

func (*VisitorsService) GetByUserID

func (s *VisitorsService) GetByUserID(ctx context.Context, userID string) (*Visitor, error)

GetByUserID retrieves a visitor by user ID.

func (*VisitorsService) Update

func (s *VisitorsService) Update(ctx context.Context, update VisitorUpdate) (*Visitor, error)

Update updates a visitor.

type WorkflowExport

type WorkflowExport = gen.WorkflowExportSchema

WorkflowExport is an exported workflow.

type WorkspaceService

type WorkspaceService struct {
	// contains filtered or unexported fields
}

WorkspaceService exposes workspace-level Intercom API operations.

func (*WorkspaceService) CancelDataExport

func (s *WorkspaceService) CancelDataExport(ctx context.Context, jobIdentifier string) (*DataExport, error)

CancelDataExport cancels a content data export job.

func (*WorkspaceService) CreateDataExport

func (s *WorkspaceService) CreateDataExport(ctx context.Context, req DataExportCreate) (*DataExport, error)

CreateDataExport creates a content data export job.

func (*WorkspaceService) CreateReportingExport

func (s *WorkspaceService) CreateReportingExport(ctx context.Context, req ReportingExportCreate) (*ReportingExportJob, error)

CreateReportingExport creates a reporting export job.

func (*WorkspaceService) DownloadDataExport

func (s *WorkspaceService) DownloadDataExport(ctx context.Context, jobIdentifier string) ([]byte, error)

DownloadDataExport downloads the raw content data export payload.

func (*WorkspaceService) DownloadReportingExport

func (s *WorkspaceService) DownloadReportingExport(ctx context.Context, jobIdentifier, appID string) ([]byte, error)

DownloadReportingExport downloads the raw reporting export payload.

func (*WorkspaceService) ExportWorkflow

func (s *WorkspaceService) ExportWorkflow(ctx context.Context, workflowID string) (*WorkflowExport, error)

ExportWorkflow exports a workflow by ID.

func (*WorkspaceService) GetDataExport

func (s *WorkspaceService) GetDataExport(ctx context.Context, jobIdentifier string) (*DataExport, error)

GetDataExport retrieves a content data export job by identifier.

func (*WorkspaceService) GetIPAllowlist

func (s *WorkspaceService) GetIPAllowlist(ctx context.Context) (*IPAllowlist, error)

GetIPAllowlist returns the workspace IP allowlist configuration.

func (*WorkspaceService) GetReportingExportJob

func (s *WorkspaceService) GetReportingExportJob(ctx context.Context, jobIdentifier, appID, clientID string) (*ReportingExportJob, error)

GetReportingExportJob retrieves a reporting export job by identifier.

func (*WorkspaceService) JobStatus

func (s *WorkspaceService) JobStatus(ctx context.Context, jobID string) (*Job, error)

JobStatus retrieves the status of an async job.

func (*WorkspaceService) ListReportingDatasets

func (s *WorkspaceService) ListReportingDatasets(ctx context.Context) (*ReportingDatasetList, error)

ListReportingDatasets returns reporting datasets available for export.

func (*WorkspaceService) UpdateIPAllowlist

func (s *WorkspaceService) UpdateIPAllowlist(ctx context.Context, allowlist IPAllowlist) (*IPAllowlist, error)

UpdateIPAllowlist updates the workspace IP allowlist configuration.

Directories

Path Synopsis
examples
identify_admin command
search_contacts command
internal
generated/intercom
Package intercom provides primitives to interact with the openapi HTTP API.
Package intercom provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL