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-typeapplication/json
Acceptapplication/json
AuthenticationAPP_ID:CLIENT_KEY

Get your APP_ID and SECRET_KEY values from Integrations > Movalio API.

Response

ResponseStatusDescription
200OKThe request has succeeded
201CreatedThe request has succeeded, resulting in the creation of a new resource
400Bad requestInvalid parameters, fields or filters
401UnauthorizedAuthorization error
404Not foundThe requested resource could not be found
500Server ErrorUnable to handle the HTTP request due to an error

Example:

Actions

Create subscriber

ParameterTypeRequiredDescription
actionStringYessubscribe
typeStringYesSubscriber type (mobile_push, email, sms)
tokenString*Registration token that uniquely identifies the app instance.
* Required for type=mobile_push
platformString*iOS or Android for type=mobile_push, Email for type=email
emailString*The email address of the subscriber.
* Required if type=email
firstnameStringNoSubscriber first name
lastnameStringNoSubscriber last name
phoneString*Subscriber phone.
*Required if type=sms
languageStringNoLanguage code (ISO 639-1) - Country code (ISO 3166-1 alpha-2)
currencyStringNoCurrency code (ISO 4217)
timezoneIntNoTimezone offset from UTC in minute
uaStringNoDevice user agent.
tagsMapNoInitial tags (attributes) to assign for the subscriber.
user_idStringNoExternal 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

ParameterTypeRequiredDescription
actionStringYessubscriber:update
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
tokenStringNoRegistration token that uniquely identifies the app instance
firstnameStringNoSubscriber first name
lastnameStringNoSubscriber last name
languageStringNoLanguage code (ISO 639-1) - Country code (ISO 3166-1 alpha-2)
currencyStringNoCurrency code (ISO 4217)
timezoneIntNoTimezone offset from UTC in minute
uaStringNoDevice 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

ParameterTypeRequiredDescription
actionStringYesunsubscribe
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)

Resubscribe subscriber

ParameterTypeRequiredDescription
actionStringYesresubscribe
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
campaign_idIntYesID 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

ParameterTypeRequiredDescription
actionStringYessubscriber:delete
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)

Get subscriber details

ParameterTypeRequiredDescription
actionStringYessubscriber:details
uuidStringYesSubscriber 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

ParameterTypeRequiredDescription
actionStringYessubscriber:tag
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
tagsMapYesKey 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

ParameterTypeRequiredDescription
actionStringYessubscriber:remove-tag
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
tagsArrayYesList 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

ParameterTypeRequiredDescription
actionStringYessubscriber:event
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
eventStringYesName of the event
valueNumberNoCustom value for this event
tagsMapNoKey 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

ParameterTypeRequiredDescription
actionStringYesnotification:show, notification:close, notification:click
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
n_idStringYesnotification id (received with the push notification)

Request body example:

{
  "action": "notification:show",
  "uuid": "d7a5d9ec-ad3b-4e39-bb7e-a5bcabab3f02",
  "n_id": 167
}

Send product event

ParameterTypeRequiredDescription
actionStringYesproduct:event
eventStringYesviewed_product, added_to_cart, ordered_product
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
product_idIntYesID of product whitch made the event
variant_idIntYesProduct 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

ParameterTypeRequiredDescription
actionStringYescart:sync
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
contentJsonYesContent 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

ParameterTypeRequiredDescription
actionStringYescampaign:send
uuid
(user_id)
StringYesSubscriber ID received on registration
(External user ID)
campaign_idIntYesId of campaign to be sent
template_dataJsonNoTags 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."
}