HTTP API v1
Send data to Movalio from your website via HTTP.
Endpoint
To get your API endpoint you need to:
- Sign in to your Movalio account
- Navigate to Integrations > Movalio API
- Find the enpoint URL for HTTP API v1
All API requests need to be sent to this endpoint with HTTP method POST
Request
Include the following headers in all requests:
Content-type | application/json |
Accept | application/json |
Authentication | APP_ID:CLIENT_KEY |
Get your APP_ID and SECRET_KEY values from Integrations > Movalio API
.
Response
Response | Status | Description |
---|---|---|
200 | OK | The request has succeeded |
201 | Created | The request has succeeded, resulting in the creation of a new resource |
400 | Bad request | Invalid parameters, fields or filters |
401 | Unauthorized | Authorization error |
404 | Not found | The requested resource could not be found |
500 | Server Error | Unable to handle the HTTP request due to an error |
Example:
Actions
Create subscriber
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscribe |
type | String | Yes | Subscriber type (mobile_push, email, sms) |
token | String | * | Registration token that uniquely identifies the app instance. * Required for type=mobile_push |
platform | String | * | iOS or Android for type=mobile_push, Email for type=email |
String | * | The email address of the subscriber. * Required if type=email | |
firstname | String | No | Subscriber first name |
lastname | String | No | Subscriber last name |
phone | String | * | Subscriber phone. *Required if type=sms |
language | String | No | Language code (ISO 639-1) - Country code (ISO 3166-1 alpha-2) |
currency | String | No | Currency code (ISO 4217) |
timezone | Int | No | Timezone offset from UTC in minute |
ua | String | No | Device user agent. |
tags | Map | No | Initial tags (attributes) to assign for the subscriber. |
user_id | String | No | External account id |
Example
Request body:
{
"action": "subscribe",
"type": "email",
"email": "bob@email.com",
"firstname": "Bon",
"lastname": "Dylan",
"phone": "0756892314",
"language": "en-US",
"currency": "USD",
"timezone": -180,
"tags": {
"tag_name_1": "tag_value_1",
"tag_name_2": "tag_value_2"
}
}
Response with success (HTTP 201):
{
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02"
}
Response with error (HTTP 400):
{ "message":"Validation error","errors":{"email": ["This field is required", "The email must be a valid email address.", "A subscriber with this email already exists."]}}
Update subscriber
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:update |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
token | String | No | Registration token that uniquely identifies the app instance |
firstname | String | No | Subscriber first name |
lastname | String | No | Subscriber last name |
language | String | No | Language code (ISO 639-1) - Country code (ISO 3166-1 alpha-2) |
currency | String | No | Currency code (ISO 4217) |
timezone | Int | No | Timezone offset from UTC in minute |
ua | String | No | Device user agent |
- if you want to link an external user ID to a subscriber, both the uuid and user_id parameters must be given
Unsubscribe subscriber
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | unsubscribe |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
Resubscribe subscriber
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | resubscribe |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
campaign_id | Int | Yes | ID of the campaign to which you will resubscribe. If the data provided for this field is 0 then the subscriber will be resubscribed for all campaigns. |
Delete subscriber
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:delete |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
Get subscriber details
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:details |
uuid | String | Yes | Subscriber ID received on registration |
Example:
{
"action": "subscriber:details",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02"
}
Response:
{
"unsubscribed": 0,
"email": "subscriber@email.com",
"tags": [
{
"name": "tag_name_1",
"value": "tag_value_1",
"id": 3
},
{
"name": "tag1",
"value": null,
"id": 1
},
{
"name": "tag3",
"value": "tag_value_3",
"id": 2
}
],
"updated_at": "2021-03-08T09:19:58.000000Z"
}
Send subscriber tags
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:tag |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
tags | Map | Yes | Key value pairs that will be saved as tags for the current profile |
Example:
{
"action": "subscriber:tag",
"user_id": 4212451,
"tags": {
"tag_name_1": "tag_value_1",
"tag_name_2": "tag_value_2"
}
}
Remove subscriber tags
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:remove-tag |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
tags | Array | Yes | List of tags to remove |
Example:
{
"action": "subscriber:remove-tag",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
"tags": ["tag_name_1", "tag_name_2"]
}
Send subscriber events
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | subscriber:event |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
event | String | Yes | Name of the event |
value | Number | No | Custom value for this event |
tags | Map | No | Key value pairs that will be saved as tags for the current profile |
Example:
{
"action": "subscriber:event",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
"event": "search_results_viewed ",
"value": 100
}
Send notification events
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | notification:show, notification:close, notification:click |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
n_id | String | Yes | notification id (received with the push notification) |
Request body example:
{
"action": "notification:show",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
"n_id": 167
}
Send product event
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | product:event |
event | String | Yes | viewed_product, added_to_cart, ordered_product |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
product_id | Int | Yes | ID of product whitch made the event |
variant_id | Int | Yes | Product variant ID |
Example:
{
"action": "product:event",
"event": "added_to_cart",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
"product_id": 12321,
"variant_id": 323321
}
Send shopping cart content
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | cart:sync |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
content | Json | Yes | Content of the cart |
Request body example:
{
"action": "cart:sync",
"uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
"content": {
"items": [
{
"id": 6979750199462, // external product ID
"title": "Red shirt",
"link": "https://...",
"price": "12 USD",
"totalPrice": "24 USD", // price with currency
"image": null, // null or link
"quantity": 2,
"variant_id": 41002705944742, // external product variant ID or null
"_totalPrice": 24, // price without currency
"currency": "USD"
},
],
"totalPrice": "24 USD",
"itemCount": 2,
"uniqueItemCount": 1,
"link": "https://...",
"currency": "USD"
},
}
Trigger transactional campaign
Parameter | Type | Required | Description |
---|---|---|---|
action | String | Yes | campaign:send |
uuid (user_id) | String | Yes | Subscriber ID received on registration (External user ID) |
campaign_id | Int | Yes | Id of campaign to be sent |
template_data | Json | No | Tags to be replaced in campaign |
Example:
{
"action": "campaign:send",
"campaign_id": 1212313,
"uuid": "39bb6fb0-6283-406e-88a3-fce830e08aaa",
"template_data": {
"first_name": "Timo",
"last_name": "Werner"
}
}
Response:
{
"message": "Campaign was queued for sending."
}