# Contacts

Source: https://developer.nylas.com/docs/reference/api/contacts/

The Nylas Contacts API allows you to create and manage contacts, and organize them into contact groups. Nylas uses the same commands to manage contacts across providers, and can refer to a specific contact using the provider's `contact_id`.

## Contacts scopes

The table below lists the Contacts endpoints and which scopes they require. The table shortens the full scope URI for space reasons, so add the prefix for the provider when requesting scopes.

The ☑️ in each column indicates the most restrictive scope you can request for each provider and still use that API. More permissive scopes appear under the minimum option. If you're already using one of the permissive scopes, you don't need to add the more restrictive scope.

| Endpoint                                                                                          | Google Scopes</br>`https://www.googleapis.com/auth/...`                                  | Microsoft Scopes</br>`https://graph.microsoft.com/...` |
| :------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------- | :----------------------------------------------------- |
| **GET** `/contacts`</br>**GET** `/contacts/<CONTACT_ID>`</br>**GET** `/contact_groups`            | `/contacts.readonly` ☑️</br>`/contacts.other.readonly` ☑️</br>`/directory.readonly`\* ☑️ | `Contacts.Read` ☑️</br>`People.Read`\* ☑️              |
| **POST** `/contacts`</br>**PUT** `/contacts/<CONTACT_ID>`</br>**DELETE** `/contacts/<CONTACT_ID>` | `/contacts` ☑️                                                                           | `Contacts.ReadWrite` ☑️                                |

<div id="admonition-info"> 📝 <b>Note</b>: To access Contacts with the <code>inbox</code> source, you must use the <code>contacts.other.readonly</code> Google scope and the <code>People.Read</code> Microsoft scope. For Contacts with the <code>domain</code> source, you must use the <code>directory.readonly</code> Google scope and the <code>People.Read</code> Microsoft scope.
</div>

For more information about scopes, see [Using scopes to request user data](/docs/dev-guide/scopes/).

## Contacts notifications

You can subscribe to the following triggers so Nylas notifies you about changes to your users' data:

- `contact.updated`
- `contact.deleted`

For more information, see the [Contact notification schemas](/docs/reference/notifications/#contact-notifications).


## Endpoints

- **GET** `/v3/grants/{grant_id}/contacts` - [Return all contacts](https://developer.nylas.com/docs/reference/api/contacts/list-contact/)
- **POST** `/v3/grants/{grant_id}/contacts` - [Create contact](https://developer.nylas.com/docs/reference/api/contacts/post-contact/)
- **GET** `/v3/grants/{grant_id}/contacts/{contact_id}` - [Return a contact](https://developer.nylas.com/docs/reference/api/contacts/get-contact/)
- **PUT** `/v3/grants/{grant_id}/contacts/{contact_id}` - [Update a contact](https://developer.nylas.com/docs/reference/api/contacts/put-contact/)
- **DELETE** `/v3/grants/{grant_id}/contacts/{contact_id}` - [Delete a contact](https://developer.nylas.com/docs/reference/api/contacts/delete-contact/)
- **GET** `/v3/grants/{grant_id}/contacts/groups` - [Return all Contact Groups](https://developer.nylas.com/docs/reference/api/contacts/list-contact-groups/)
