createEmailMessage
Creates an email message.
POST
https://api.pushwoosh.com/json/1.3/createEmailMessage
Request Body
Name | Type | Description |
---|
auth* | string | API access token from Pushwoosh Control Panel. |
application* | string | Pushwoosh application code. |
notifications* | array | JSON array of email message parameters. Look at the request example below for more info. |
Tag conditions
Each tag condition is an array like [tagName, operator, operand]
where
- tagName: name of a tag
- operator: “EQ” | “IN” | “NOTEQ” | “NOTIN” | “LTE” | “GTE” | “BETWEEN”
- operand: string | integer | array | date
Operand description
- EQ: tag value is equal to operand;
- IN: tag value intersects with operand (operand must always be an array);
- NOTEQ: tag value is not equal to an operand;
- NOTIN: tag value does not intersect with operand (operand must always be an array);
- GTE: tag value is greater than or equal to operand;
- LTE: tag value is less than or equal to operand;
- BETWEEN: tag value is greater than or equal to min operand value but less than or equal to max operand value (operand must always be an array).
Valid operators: EQ, IN, NOTEQ, NOTIN
Valid operands:
- EQ, NOTEQ: operand must be a string;
- IN, NOTIN: operand must be an array of strings like
["value 1", "value 2", "value N"]
;
Valid operators: EQ, IN, NOTEQ, NOTIN, BETWEEN, GTE, LTE
Valid operands:
- EQ, NOTEQ, GTE, LTE: operand must be an integer;
- IN, NOTIN: operand must be an array of integers like
[value 1, value 2, value N]
;
- BETWEEN: operand must be an array of integers like
[min_value, max_value]
.
Valid operators: EQ, IN, NOTEQ, NOTIN, BETWEEN, GTE, LTE
Valid operands:
"YYYY-MM-DD 00:00"
(string)
- unix timestamp
1234567890
(integer)
"N days ago"
(string) for operators EQ, BETWEEN, GTE, LTE
Valid operators: EQ
Valid operands: 0, 1, true, false
Valid operators: IN
Valid operands: operand must be an array of strings like ["value 1", "value 2", "value N"]
.
registerEmail
Registers email address for the app.
POST
https://api.pushwoosh.com/json/1.3/registerEmail
Request Body
Name | Type | Description |
---|
application* | string | Pushwoosh application code. |
email* | string | Email address. |
language | string | Language locale of the device. Must be a lowercase two-letter code according to ISO-639-1 standard. |
userId | string | User ID to associate with the email address. |
tz_offset | integer | Timezone offset in seconds. |
tags | object | Tag values to assign to the device registered. |
deleteEmail
Removes email address from your user base.
POST
https://api.pushwoosh.com/json/1.3/deleteEmail
Request Body
Name | Type | Description |
---|
application | string | Pushwoosh application code. |
email | string | Email address used in /registerEmail request. |
Sets tag values for the email address.
POST
https://api.pushwoosh.com/json/1.3/setEmailTags
Request Body
Name | Type | Description |
---|
auth | string | API access token. |
application | string | Pushwoosh application code. |
email | string | Email address. |
tags | object | JSON object of tags to set, send ‘null’ to remove the value. |
userId | string | User ID associated with the email address. |
registerEmailUser
Associates an external User ID with a specified email address.
POST
https://api.pushwoosh.com/json/1.3/registerEmailUser
Can be used in /createEmailMessage
API call (the ‘users’ parameter).
Request Body
Name | Type | Description |
---|
auth* | string | API access token. |
application* | string | Pushwoosh application code. |
email* | string | Email address. |
userId* | string | User ID to associate with the email address. |
tz_offset | integer | Timezone offset in seconds. |