# Contact Query

### **Introduction**

Contacts are the company contact that a company user can add in our system. We provides ability to filter the contacts by externalId, email, id and fullSearch(first name and last name). Please make sure the paging option is used to fetch more items.

### Contact Query

To query a contacts from Everreal use contacts query

```graphql
type Query {
  contacts(input: ContactFilterListPaging): [Contact]
}
```

**Schema**

```graphql
type Contact {
  id: String
  externalId: String
  salutation: String
  title: String
  firstName: String
  lastName: String
  email: String
  userId: String
  companyId: String
  phoneNumber: String
  address: ContactAddress
  cellPhoneNumber: String
  birthDate: DateTime
  blacklistReason: String
  companyContactGroupId: String
  gdprAcceptedDate: String
  gdprAcceptedIpAddress: String
  isBlacklisted: String
  responsibleUserId: String
  createdAt: DateTime
  updatedAt: DateTime
  deletedAt: DateTime
}

type ContactAddress {
  streetName: String
  streetNumber: String
  zipCode: String
  city: String
  country: String
}

input ContactFilterListPaging {
  filter: ContactFilter
  paging: GraphPaging
  sort: GraphSorting
}

input ContactFilter {
  id: String
  externalId: String
  email: String
  fullSearch: String
}
```

***Example for contact query***

{% tabs %}
{% tab title="GraphQL" %}

```graphql
{
    contacts(input: { filter: { email: "test@acme.com"}, paging: {skip: 0, take: 5}}) {
    id
    firstName
    lastName
    salutation
    title
    email
    createdAt
    updatedAt   
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.everreal.co/endpoints/contacts/contact-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
