Email API
-
- UpdatedAug 1, 2024
- 5 minutes to read
- Xanadu
- API reference
The Email API provides endpoints that enable you to receive and send email messages using REST.
Users must have the email_api_send role to send email.
Email - GET /now/email/{id}
Returns the email details for the specified email record.
URL format
Versioned URL: /api/now/{api_version}/email/{id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
id | Sys_id of the email for which to return details. Located in the Email [sys_email] table. |
Name | Description |
---|---|
sysparm_fields | Comma-separated list of fields to return in the response. Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: Sample cURL request
Email - POST /now/email
Creates an email record using the passed information.
URL format
Versioned URL: /api/now/{api_version}/email
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.