Update the status of messages

Purpose: Use this API to update the status of a message that you sent to your driver. You must specify the ID of the message for which you want to update the status in the query parameters. Refer to the query parameters section for more info.

require 'uri'
require 'net/http'
require 'json'

url = URI('https://api.gomotive.com/v1/messages')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
request['X-User-Id']     = <api user id>
request['Content-Type']  = 'application/json'
params = {
  :ids 		=> ['layer:///messages/06adc4a7-80c1-4026-9328-2d123d0f31c8'],
  :status => 'delivered',
}
request.body = params.to_json

response = http.request(request)
puts response.read_body

Response Parameters

success

  • Type: Boolean
  • Description: Denotes if the status of the message was updated or not. In most cases, the bool value will be "true".

Query Params
ids[]
array of int32s
required

Specify the unique identifier of the message for which you want to update the status..

ids[]*
string
required

Specify the status of the message. This can be either "read" or "delivered".

Headers
string

Time zone used to format timestamps.

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the user who is accessing this endpoint.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json