Skip to content
Skip to main content

Message headers for Agent Accounts

Agent AccountsEmail

Agent Account grants now return message headers through the fields query parameter, the same way Google, Microsoft, and EAS grants do. Your agent can read the RFC threading chain straight off a message instead of tracking thread_id alone, which helps when a conversation crosses systems or you need to prove which message a reply answered.

  • fields=include_headers on Agent Accounts returns the full header set on Get Message, Get all Messages, and Send Message. Agent Accounts join Google, Microsoft, and EAS as the providers that return the complete set. EWS and IMAP still return only the headers Nylas generates for MIME.

    curl --request GET \
    --url 'https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/messages/<MESSAGE_ID>/?fields=include_headers' \
    --header 'Authorization: Bearer <NYLAS_API_KEY>'
  • fields=include_basic_headers on Agent Accounts returns only the three RFC threading headers, Message-ID, In-Reply-To, and References. Use it when you’re matching replies to sent messages and don’t need the full header payload, which is often larger than the message body itself. With this addition, include_basic_headers works on all six providers: Google, Microsoft, EAS, EWS, IMAP, and Agent Accounts.

  • Both options work on the Send Message endpoint, so an agent gets the threading headers on the send response instead of making a follow-up GET call. This applies to synchronous sends; the parameter has no effect when you set send_at.