Get Email Header
Purpose
This API is used to retrieve the header of a specific email using the message ID.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.READ
ALL - Full access to the messages.
READ - Read the message header using the message ID.
To generate Authtoken, refer here.
Request URL
Method: GET
https://mail360.zoho.com/api/accounts/{account_key}/messages/{messageId}/header
Path Parameters
- account_key* string
- This key is used to identify the account from which the emails have to be retrieved. It is generated during account addition.
- This parameter can be fetched from Get all accounts API.
- messageId* long
- This is the unique key used to identify a specific email.
* - Mandatory parameter
Note:
While the Messages APIs focus on individual messages, the Threads APIs deal with entire conversation threads, each of which contains multiple messages.
Sample request
Copiedcurl "https://mail360.zoho.com/api/accounts/x7**0s/messages/15**40001/header" \
-X GET \
-H "Accept: application/json" \
-H "Authorization:Zoho-oauthtoken 80**896d59"
Sample response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": {
"messageId": "1675764701732140010",
"headerContent": "Delivered-To: paula@gmail.com\r\nReceived: by 2002:a05:6022:39c:b0:37:1a24:8eb9 with SMTP id 28csp4027121lak;\r\n Tue, 7 Feb 2023 02:06:24 -0800 (PST)\r\nX-Google-Smtp-Source: AK7set/UP2SBw1uyLF3fCkbMN8pvpDnI695vLnTdm+0NnettI+5LOfecBRFpgHQI+1yPGpkOkFZ9\r\nX-Received: by 2002:a17:90b:30c2:b0:230:caa5:5213 with SMTP id hi2-20020a17090b30c200b00230caa55213mr3551131pjb.24.1675764384037;\r\n Tue, 07 Feb 2023 02:06:24 -0800 (PST)\r\nARC-Seal: i=2; a=rsa-sha256; t=1675764384; cv=pass;\r\n d=google.com; s=arc-20160816;\r\n b=FJjmP873eHJJgAqJJzDWkb2MxjBMZBilULLLBW+Rw3pvc+k/TUbwXztDQtNqmxKb2l\r\n IFZZkfOAIM52CeWrAPz+YliPthP4KoH2OOn1Sm4h/t5XLXtfGsqT+853D1ij+jvJdvJ4\r\n DBKOTyO2cyxl5A6zEvlAxKjB8XHYl4a5irUYxp8A7iemIATp7cOL0uQRDqd4dhfyxl7C\r\n mRJAcggfWlk/Qx2MsEWngmdv0XVbf7TR7yZswNoUlgCiMZvFGeb0x0/vs/n8DJOcKl4w\r\n gBnOx6Mh+5UwCFtb+aW+Qsm5ziiOaTfzDBvpTI3U5zA9y6NheZgm6ZZcOlzR6UDyJif+\r\n Bxyg==\r\nARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;\r\n h=tm-mail-jid:original-envelope-id:content-transfer-encoding\r\n :mime-version:subject:message-id:to:from:date:dkim-signature;\r\n bh=gIvsCnhQt5nzGaUClWDzhsrpB+sWB8lBo4CyhOCSfVE=;\r\n b=BLf7L2FXzR4OLhr7P2RpqqgHXdJbcXic/AODD2ilvnx67E/IED/M3xcEUqbwfiB8w4\r\n AE3VWGiVb6/4sp1ZRGailFVcTSd1TW01bUp3Uq896y6m/56tqKZpTNL5T4Y0Z9VbxOFo\r\n Xlkj2pXXlkmB3LhLFy6VoEhUikgj61hVyKjbtDGkpFBMs3yb5m78PArgs0baXohF7B19\r\n ovRn+MN0qtl88Q05f5pnPr4LB0Z0EwhupCouB4+7tgyDimaYATlhVp5bMOy5gV7vIG02\r\n wrwnxDZz0uo2gRkcLeOwUyip6ciec/lEnbs0UkH0kbep1YO0eU8tHEIkC2QiDJn5nMpa\r\n zfsw==\r\nARC-Authentication-Results: i=2; mx.google.com;\r\n dkim=pass header.i=@checkzepto.zylker.com header.s=14201810 header.b=WwSUO4+x;\r\n arc=pass (i=1 spf=pass spfdomain=mailapps.zylker.com dkim=pass dkdomain=checkzepto.zylker.com dmarc=pass fromdomain=checkzepto.zylker.com>);\r\n spf=pass (google.com: domain of test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com designates 136.143.184.132 as permitted sender) smtp.mailfrom=test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com;\r\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zylker.com\r\nReturn-Path: <test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com>\r\nReceived: from sender3-g1-132.zohomail360.com (sender3-g1-132.zohomail360.com. [136.143.184.132])\r\n by mx.google.com with ESMTPS id t2-20020a63b242000000b004e67f9c47d8si14505786pgo.265.2023.02.07.02.06.23\r\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\r\n Tue, 07 Feb 2023 02:06:24 -0800 (PST)\r\nReceived-SPF: pass (google.com: domain of test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com designates 136.143.184.132 as permitted sender) client-ip=136.143.184.132;\r\nAuthentication-Results: mx.google.com;\r\n dkim=pass header.i=@checkzepto.zylker.com header.s=14201810 header.b=WwSUO4+x;\r\n arc=pass (i=1 spf=pass spfdomain=mailapps.zylker.com dkim=pass dkdomain=checkzepto.zylker.com dmarc=pass fromdomain=checkzepto.zylker.com>);\r\n spf=pass (google.com: domain of test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com designates 136.143.184.132 as permitted sender) smtp.mailfrom=test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com;\r\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zylker.com\r\nARC-Seal: i=1; a=rsa-sha256; t=1675764382; cv=none; \r\n\td=zohomail360.com; s=zohoarc; \r\n\tb=DgDBwJl9wkzxSv4f1QsoaFDY7nNWA6v+vdVwBSEjADsE1Ztx0B00oN2vMZ5ONnGo5FjW6LIlH9DF1ssY5jlo0eS4FmXpKoWpiUW63V1vm4TuR/tOVVwLhY9cGCRbApj0RLLi9z7VOQDcR4EpSXBxtiN/nXl44hHsTZYlqtixb/w=\r\nARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail360.com; s=zohoarc; \r\n\tt=1675764382; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; \r\n\tbh=gIvsCnhQt5nzGaUClWDzhsrpB+sWB8lBo4CyhOCSfVE=; \r\n\tb=VCnBTLDhnrjhK8mTkEzG7GN1Q0AKtDNqE5R5PpL+w1GDqhm8UWr5WzaabYDdt+yai7UudbaeDy/+w1V8RiQobU+kpZnkQNYPGPqdydG6V68wSK95wylB/OU7OBy/RNi672oteQcOk4G3IL3cE8OSI+XDU9M6z3xkEK49OxUgYoY=\r\nARC-Authentication-Results: i=1; mx.zohomail360.com;\r\n\tdkim=pass header.i=checkzepto.zylker.com;\r\n\tspf=pass smtp.mailfrom=test+01f70380-a6cf-11ed-a008-5254000e3179_vt1@mailapps.zylker.com;\r\n\tdmarc=pass header.from=<noreply@checkzepto.zylker.com>\r\nReceived: from [10.47.36.141] (10.47.36.141 [10.47.36.141]) by mx.zohomail.com\r\n\twith SMTPS id 167576438090015.062799275904695; Tue, 7 Feb 2023 02:06:20 -0800 (PST)\r\nDKIM-Signature: a=rsa-sha256; b=WwSUO4+xIY5jtK3M+82gKSo56rpufvOEPtuvXPIC518gVD3D0muHBYjfpjQomdyoXSHHhoJFcVzeDYFfGGpnBCvZaeWrBS/+3Edsxp3P5wAHpOH+ZSsg+zjEDI/QrfxdZiEEtsxHOgC6g1CMFtRWWoIYmyisdXSiCE3iRMifSJY=; c=relaxed/relaxed; s=14201810; d=checkzepto.zylker.com; v=1; bh=gIvsCnhQt5nzGaUClWDzhsrpB+sWB8lBo4CyhOCSfVE=; h=date:from:reply-to:to:cc:message-id:subject:mime-version:content-type:date:from:reply-to:to:cc:message-id:subject;\r\nDate: Tue, 7 Feb 2023 02:06:20 -0800 (PST)\r\nFrom: noreply <noreply@checkzepto.zylker.com>\r\nTo: <zaarazen.mail@gmail.com>, \r\n\t <paula@gmail.com>, \r\n\tpaula <paula@zylker.com>, paula <paula@zylker.com>\r\nMessage-ID: <2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8@mailapps.zylker.com>\r\nSubject: Test Email\r\nMIME-Version: 1.0\r\nContent-Type: text/html;charset=\"UTF-8\"\r\nContent-Transfer-Encoding: quoted-printable\r\nOriginal-Envelope-Id: 2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8\r\nX-Report-Abuse: <mailto:abuse+2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8@zeptomail.com>\r\nTM-MAIL-JID: 2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8\r\nX-JID: 2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8\r\nX-App-Message-ID: 2d6f.29241e3e.m1.01f70380-a6cf-11ed-a008-5254000e3179.1862b56cbb8\r\nX-ZohoMailClient: External"
}
}
Sample Failure Response
Copied{
"status": {
"code": 500,
"description": "Internal Error"
},
"data": {
"moreInfo": "Internal Error"
}
}