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

Create contact

Create a contact in a user's address book. New contacts use source=address_book. See Contact sources for provider-specific behavior.

You can attach Nylas-managed metadata to the Contact object. Nylas stores metadata separately from the provider contact, so the provider write and metadata write are not atomic.

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.

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_name*string

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."
sourcestring

Contacts created through the API are saved to the provider address book.

address_book
Default: "address_book"
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
POSThttps://api.us.nylas.com/v3/grants/{grant_id}/contacts

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.

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.