contacts
ListContactGroupsQueryParams = ListQueryParams
module-attribute
The available query parameters for listing contact groups.
UpdateContactRequest = CreateContactRequest
module-attribute
Interface for updating a Nylas contact.
Contact
dataclass
Class representation of a Nylas contact object.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Globally unique object identifier. |
grant_id |
str
|
Grant ID representing the user's account. |
object |
str
|
The type of object. |
birthday |
Optional[str]
|
The contact's birthday. |
company_name |
Optional[str]
|
The contact's company name. |
display_name |
Optional[str]
|
The contact's display name. |
emails |
Optional[List[ContactEmail]]
|
The contact's email addresses. |
im_addresses |
Optional[List[InstantMessagingAddress]]
|
The contact's instant messaging addresses. |
given_name |
Optional[str]
|
The contact's given name. |
job_title |
Optional[str]
|
The contact's job title. |
manager_name |
Optional[str]
|
The contact's manager name. |
metadata |
Optional[Dict[str, str]]
|
Nylas-owned metadata associated with the contact. Metadata is not written to the provider and does not follow a contact if its public ID changes. |
middle_name |
Optional[str]
|
The contact's middle name. |
nickname |
Optional[str]
|
The contact's nickname. |
notes |
Optional[str]
|
The contact's notes. |
office_location |
Optional[str]
|
The contact's office location. |
picture_url |
Optional[str]
|
The contact's picture URL. |
picture |
Optional[str]
|
The contact's picture. |
suffix |
Optional[str]
|
The contact's suffix. |
surname |
Optional[str]
|
The contact's surname. |
source |
Optional[SourceType]
|
The contact's source. |
phone_numbers |
Optional[List[PhoneNumber]]
|
The contact's phone numbers. |
physical_addresses |
Optional[List[PhysicalAddress]]
|
The contact's physical addresses. |
web_pages |
Optional[List[WebPage]]
|
The contact's web pages. |
groups |
Optional[List[ContactGroupId]]
|
The contact's groups. |
Source code in nylas/models/contacts.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
ContactEmail
dataclass
An email address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
email |
Optional[str]
|
The email address. |
type |
Optional[str]
|
The type of email address. |
Source code in nylas/models/contacts.py
74 75 76 77 78 79 80 81 82 83 84 85 86 | |
ContactGroup
dataclass
Class representation of a Nylas contact group object.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Globally unique object identifier. |
grant_id |
str
|
Grant ID representing the user's account. |
object |
str
|
The type of object. |
group_type |
Optional[GroupType]
|
The type of contact group. |
name |
Optional[str]
|
The name of the contact group. |
path |
Optional[str]
|
The path of the contact group. |
Source code in nylas/models/contacts.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |
ContactGroupId
dataclass
A contact group ID for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The contact group ID. |
Source code in nylas/models/contacts.py
89 90 91 92 93 94 95 96 97 98 99 | |
CreateContactRequest
Bases: TypedDict
Interface for creating a Nylas contact.
Attributes:
| Name | Type | Description |
|---|---|---|
birthday |
NotRequired[str]
|
The contact's birthday. |
company_name |
NotRequired[str]
|
The contact's company name. |
display_name |
NotRequired[str]
|
The contact's display name. |
emails |
NotRequired[List[WriteableContactEmail]]
|
The contact's email addresses. |
im_addresses |
NotRequired[List[WriteableInstantMessagingAddress]]
|
The contact's instant messaging addresses. |
given_name |
NotRequired[str]
|
The contact's given name. |
job_title |
NotRequired[str]
|
The contact's job title. |
manager_name |
NotRequired[str]
|
The contact's manager name. |
metadata |
NotRequired[Optional[Dict[str, str]]]
|
Nylas-owned metadata for the contact. On update, omission or None preserves existing metadata, an object replaces it, and an empty object clears it. |
middle_name |
NotRequired[str]
|
The contact's middle name. |
nickname |
NotRequired[str]
|
The contact's nickname. |
notes |
NotRequired[str]
|
The contact's notes. |
office_location |
NotRequired[str]
|
The contact's office location. |
picture_url |
NotRequired[str]
|
The contact's picture URL. |
picture |
NotRequired[str]
|
The contact's picture. |
suffix |
NotRequired[str]
|
The contact's suffix. |
surname |
NotRequired[str]
|
The contact's surname. |
source |
NotRequired[SourceType]
|
The contact's source. |
phone_numbers |
NotRequired[List[WriteablePhoneNumber]]
|
The contact's phone numbers. |
physical_addresses |
NotRequired[List[WriteablePhysicalAddress]]
|
The contact's physical addresses. |
web_pages |
NotRequired[List[WriteableWebPage]]
|
The contact's web pages. |
groups |
NotRequired[List[WriteableContactGroupId]]
|
The contact's groups. |
Source code in nylas/models/contacts.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |
FindContactQueryParams
Bases: TypedDict
The available query parameters for finding a contact. Attributes: profile_picture: If true and picture_url is present, the response includes a Base64 binary data blob that you can use to view information as an image file. select: Comma-separated list of fields to return in the response. This allows you to receive only the portion of object data that you're interested in.
Source code in nylas/models/contacts.py
180 181 182 183 184 185 186 187 188 189 190 191 | |
GroupType
Bases: str, Enum
Enum representing the different types of contact groups.
Source code in nylas/models/contacts.py
368 369 370 371 372 373 | |
InstantMessagingAddress
dataclass
An instant messaging address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
im_address |
Optional[str]
|
The instant messaging address. |
type |
Optional[str]
|
The type of instant messaging address. |
Source code in nylas/models/contacts.py
102 103 104 105 106 107 108 109 110 111 112 113 114 | |
ListContactsQueryParams
Bases: ListQueryParams
Interface representing the query parameters for listing contacts.
Attributes:
| Name | Type | Description |
|---|---|---|
email |
NotRequired[str]
|
Return contacts with matching email address. |
phone_number |
NotRequired[str]
|
Return contacts with matching phone number. |
source |
NotRequired[SourceType]
|
Return contacts from a specific source. |
group |
NotRequired[str]
|
Return contacts from a specific group. |
recurse |
NotRequired[bool]
|
Return contacts from all sub-groups of the specified group. |
metadata_pair |
NotRequired[Dict[str, str]]
|
Filter by one indexed metadata key/value pair. Use one of key1 through key5. This cannot be combined with provider-side contact filters; pagination parameters are supported. |
select |
NotRequired[str]
|
Comma-separated list of fields to return in the response. This allows you to receive only the portion of object data that you're interested in. |
limit |
NotRequired[int]
|
The maximum number of objects to return. This field defaults to 50. The maximum allowed value is 200. |
page_token |
NotRequired[str]
|
An identifier that specifies which page of data to return. This value should be taken from a ListResponse object's next_cursor parameter. |
Source code in nylas/models/contacts.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | |
PhoneNumber
dataclass
A phone number for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
number |
Optional[str]
|
The phone number. |
type |
Optional[str]
|
The type of phone number. |
Source code in nylas/models/contacts.py
19 20 21 22 23 24 25 26 27 28 29 30 31 | |
PhysicalAddress
dataclass
A physical address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
Optional[str]
|
The format of the address. |
street_address |
Optional[str]
|
The street address of the contact. |
city |
Optional[str]
|
The city of the contact. |
postal_code |
Optional[str]
|
The postal code of the contact. |
state |
Optional[str]
|
The state of the contact. |
country |
Optional[str]
|
The country of the contact. |
type |
Optional[str]
|
The type of address. |
Source code in nylas/models/contacts.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
SourceType
Bases: str, Enum
Enum representing the different types of sources for a contact.
Source code in nylas/models/contacts.py
11 12 13 14 15 16 | |
WebPage
dataclass
A web page for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
Optional[str]
|
The URL of the web page. |
type |
Optional[str]
|
The type of web page. |
Source code in nylas/models/contacts.py
59 60 61 62 63 64 65 66 67 68 69 70 71 | |
WriteableContactEmail
Bases: TypedDict
An email address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
email |
NotRequired[str]
|
The email address. |
type |
NotRequired[str]
|
The type of email address. |
Source code in nylas/models/contacts.py
243 244 245 246 247 248 249 250 251 252 253 | |
WriteableContactGroupId
Bases: TypedDict
A contact group ID for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The contact group ID. |
Source code in nylas/models/contacts.py
256 257 258 259 260 261 262 263 264 | |
WriteableInstantMessagingAddress
Bases: TypedDict
An instant messaging address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
im_address |
NotRequired[str]
|
The instant messaging address. |
type |
NotRequired[str]
|
The type of instant messaging address. |
Source code in nylas/models/contacts.py
267 268 269 270 271 272 273 274 275 276 277 | |
WriteablePhoneNumber
Bases: TypedDict
A phone number for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
number |
NotRequired[str]
|
The phone number. |
type |
NotRequired[str]
|
The type of phone number. |
Source code in nylas/models/contacts.py
194 195 196 197 198 199 200 201 202 203 204 | |
WriteablePhysicalAddress
Bases: TypedDict
A physical address for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
NotRequired[str]
|
The format of the address. |
street_address |
NotRequired[str]
|
The street address of the contact. |
city |
NotRequired[str]
|
The city of the contact. |
postal_code |
NotRequired[str]
|
The postal code of the contact. |
state |
NotRequired[str]
|
The state of the contact. |
country |
NotRequired[str]
|
The country of the contact. |
type |
NotRequired[str]
|
The type of address. |
Source code in nylas/models/contacts.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
WriteableWebPage
Bases: TypedDict
A web page for a contact.
Attributes:
| Name | Type | Description |
|---|---|---|
url |
NotRequired[str]
|
The URL of the web page. |
type |
NotRequired[str]
|
The type of web page. |
Source code in nylas/models/contacts.py
230 231 232 233 234 235 236 237 238 239 240 | |