Skip to content
Skip to main content
PUT
https://api.us.nylas.com/v3/grants/{grant_id}/contacts/{contact_id}

Update a contact

Updates the specified contact from the user's address book.

When you make a PUT request, Nylas replaces all data in the nested object with the information included in your request. For more information, see Updating objects.

For metadata, omission preserves the existing object, a supplied object replaces it, and {} clears it. A request containing only metadata updates Nylas-managed metadata without writing to the provider. Provider fields and metadata are stored by different systems, so a request that changes both is not atomic.

See Contact sources for source-specific update behavior.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

contact_id*string

ID of the contact to access. Nylas recommends you URL-encode this field, or you might receive a 404 error if the ID contains special characters (for example, #).

Query parameters

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

Request body

birthdaystring

The contact's birthday in ISO-8601 format.

Example: "1980-12-31"
company_namestring

The name of the company that the contact is affiliated with (for example, their workplace).

Example: "Nylas"
emailsarray<object>
given_namestring

The contact's given name.

Example: "John"
groupsarray<object>

The IDs of existing explicit provider-backed groups that the contact should belong to. Address-book containers and aggregate views such as iCloud All Contacts are not groups.

im_addressesarray<object>
job_titlestring

The contact's occupation or job title.

Example: "Software Engineer"
manager_namestring

The name of the contact's manager. Native iCloud and Yahoo CardDAV contacts don't support this field. See Contacts limitations for more information.

Example: "Bill"
metadataobject

The metadata associated with the object. For more information, see Metadata.

middle_namestring

The contact's middle name.

Example: "Jacob"
nicknamestring

A custom nickname for the contact.

Example: "JD"
notesstring

Notes about with the contact (for example, their favorite food).

Example: "Loves Ramen"
office_locationstring

The location of the office where the contact works. Native iCloud and Yahoo CardDAV contacts don't support this field. See Contacts limitations for more information.

Example: "123 Main Street"
phone_numbersarray<object>
physical_addressesarray<object>
suffixstring

(Not supported for EWS) The suffix of a contact's name, if applicable.

Example: "Jr."
surnamestring

The contact's surname.

Example: "Doe"
web_pagesarray<object>

An array of the contact's websites. Different providers may have different limits on the number of web pages.

  • Google/iCloud/Yahoo: multiple web pages per contact.
  • IMAP: at most one web page per contact.
  • Microsoft/EWS: at most one web page per contact. The type must be work.

Responses

request_idstring

The request ID.

dataobject
PUThttps://api.us.nylas.com/v3/grants/{grant_id}/contacts/{contact_id}

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

contact_idrequiredstring

ID of the contact to access. Nylas recommends you URL-encode this field, or you might receive a `404` error if the ID contains special characters (for example, #).

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.