kustomer-client
    Preparing search index...

    Function getCustomers

    • Get customers Retrieves all customers in your organization. Results include customer data, such as their phone number, sentiment score, and the last message in a conversation.

      Any one of the following roles is required for this endpoint:

      Legacy Role Equivalent Permission Set Role
      org.user.customer.read org.permission.customer.read

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      activeUsers: unknown[];
                      conversationCounts: {
                          all: number;
                          done: number;
                          open: number;
                          snoozed: number;
                      };
                      createdAt: string;
                      displayColor: string;
                      displayIcon: string;
                      displayName: string;
                      emails: { email: string; type: string; verified: boolean }[];
                      externalIds: unknown[];
                      gender: string;
                      lastActivityAt: string;
                      lastConversation: {
                          sentiment: { [key: string]: unknown };
                          tags: unknown[];
                      };
                      lastMessageIn: { sentiment: { [key: string]: unknown } };
                      locale: string;
                      locations: { address: string; type: string }[];
                      modifiedAt: string;
                      name: string;
                      phones: { phone: string; type: string; verified: boolean }[];
                      preview: { [key: string]: unknown };
                      progressiveStatus: null | string;
                      recentLocation: { updatedAt: string };
                      rev: number;
                      sharedEmails: unknown[];
                      sharedExternalIds: unknown[];
                      sharedPhones: unknown[];
                      sharedSocials: unknown[];
                      socials: {
                          type: string;
                          url: string;
                          userid: string;
                          username: string;
                          verified: boolean;
                      }[];
                      tags: string[];
                      updatedAt: string;
                      urls: { type: string; url: string }[];
                      verified: boolean;
                      watchers: unknown[];
                  };
                  id: string;
                  links: { self: string };
                  relationships: {
                      createdBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      messages: { links: { self: string } };
                      modifiedBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              }[];
              links: {
                  first: string;
                  last: string;
                  next: null
                  | string;
                  prev: null | string;
                  self: string;
              };
              meta: {
                  page: number;
                  pageSize: number;
                  total: number;
                  totalPages: number;
              };
          },
          unknown,
          ThrowOnError,
      >