- API reference
- Threads
- Update a thread
https://api.us.nylas.com/v3/grants/{grant_id}/threads/{thread_id}Update a thread
Updates the specified thread.
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.
Path parameters
ID of the grant to access. Use /me/ to refer to the grant associated with an access token.
ID of the thread 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
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.
(Microsoft only) When provided, Nylas returns items from the specified shared folder ID.
Required when using shared_from.
This parameter only accepts a single folder ID.
Check out the Shared folders guide for more information.
(Microsoft only) When provided, Nylas returns items that were shared from the specified email address. It also accepts grant ID. This parameter only accepts single email address or grant ID. Check out the Shared folders guide for more information.
"41009df5-bf11-4c97-aa18-b285b5f2e386"idstringA globally unique object identifier for Microsoft accounts. An email address for Google accounts.
"5d3qmne77v32r8l4phyuksl2x, [email protected]"attachmentsarray<object>An array of Attachment objects. For Google, linked Google Drive files are not included. For Microsoft, linked OneDrive files are not included.
[{"content_disposition":"attachment","content_type":"text/calendar","id":"4kj2jrcoj9ve5j9yxqz5cuv98","size":1708},{"content_disposition":"attachment","content_type":"application/ics","filename":"invite.ics","id":"70jcsv367jaiavt4njeu4xswg","size":1708}]content_typestringThe MIME type of the attachment, used by the email client to determine how to display the attachment. If you don't provide a type, Nylas infers it from the file name.
The value of this field is exactly the same as the email attachment's Content-Type header.
The provider might set additional parameters, such as name and charset.
Nylas returns an empty content_type field if an attachment file name contains non-ASCII characters (for example, accented characters like ü). This is because Google can't detect its content type.
"image/png; name=\"pic.png\"""41009df5-bf11-4c97-aa18-b285b5f2e386"content_idstring(Inline attachments only) The alphanumeric cid from the <img> tag in the message's HTML. For
example, you might see something like <img src=\"cid:ce9b9547-9eeb-43b2-ac4e-58768bdf04e4\"> in
the message body.
Sometimes, the content_id value is contained in angle brackets (for example,
<ce9b9547-9eeb-43b2-ac4e-58768bdf04e4>).
"ce9b9547-9eeb-43b2-ac4e-58768bdf04e4"bodystringThe body of the message as either plain-text or HTML content. If the message has both plain-text and HTML, Nylas returns the HTML version.
"Hello, I just sent a message using Nylas!"dateintegerUnix timestamp in seconds that represents when the mail server received the message. This might be
different from the unified Date header in a raw Message object.
1635355739foldersarray<string>The IDs of the folders that the message appears in. Microsoft messages can be in a single folder only. Google allows a single message to appear in multiple folders.
["8l6c4d11y1p4dm4fxj52whyr9","d9zkcr2tljpu3m4qpj7l2hbr0"]"41009df5-bf11-4c97-aa18-b285b5f2e386"headersarray<object>An array of key-value pairs that contain the message headers. Nylas returns this field when you
set the fields query parameter to either include_headers or include_basic_headers.
fields=include_headers: Returns the full set of headers on the message.fields=include_basic_headers: Returns only the three RFC threading headers (Message-ID,In-Reply-To,References). Use this option when you only need to track message identity and thread relationships — payload size is significantly smaller thaninclude_headers.
A single message can sometimes have multiple headers with the same key name. Nylas adds all of
the headers to the headers array without merging or de-duplicating the data. When the headers
contain encoded data, Nylas adds it to the headers array without decoding it. If you need the
decoded data, you need to build decoding logic into your project.
Some headers might contain raw MIME information (for example,
=?Windows-1252?Q?Re:_Candidature_de_Mme_Leyah_Miller?=).
idstringA globally unique object identifier for Microsoft accounts. An email address for Google accounts.
"5d3qmne77v32r8l4phyuksl2x, [email protected]"in_reply_tostring(EWS only) The ID of the message that this message replies to. This ID is the same as the
In-Reply-To header.
"<[email protected]>"snippetstringA short snippet (the first 100 characters, with HTML tags removed) of the message body. This is useful for displaying a preview of the message.
"You have been invited to the following event. Welcome! WhenThu Oct 28, 2021\n7am - 8am Eastern Time - Toronto Joining info"starredbooleanIf true, shows that the message has been starred by the user. For EWS, this is only supported
on Microsoft Exchange 2010 or later.
falsethread_idstringA reference to the parent Thread object. Every message is associated with a thread, whether that
thread contains one message or many. If the message is new, Nylas assigns a thread_id to it.
"1t8tv3890q4vgmwq6pmdwm8qgsaer"snippetstringA short snippet (the first 100 characters, with HTML tags removed) of the body of the last received message. This is useful for displaying a preview of a message.
"jnlnnn --Sent with Nylas"Rate limited. The provider or Nylas throttled the request. If a provider throttles a request and
says how long to wait, the Retry-After header gives that number of seconds. When the header
is missing, retry with exponential backoff. See
429 rate limit errors by provider.