Subscriber Update API

Prerequisites

Function

The Subscriber Update API allows an external application to update Pushnami subscriber variables.

Endpoint

PUT https://api.pushnami.com/api/push/v2/subscriber/variables

Requirements

  • The request uses HTTP method PUT
  • The request uses HTTPS to protect data in transit
  • A psid (Pushnami Subscriber ID) value must be supplied in the body of the request
  • Headers.authorization must be a valid API Token.
  • Update parameters and values are supplied in the JSON body

Sample Request

curl -X PUT \
  https://api.pushnami.com/api/push/v2/subscriber/variables \
  -H 'authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9… \
  -F psid=590fd6d539db85102d12180b \
  -F q=Automotive \
  -F l=78704

For example, this query would update the subscriber 590fd6d539db85102d12180b (Note: not a real subscriber) with the q value ‘Automotive’ and the l value ‘78704

Note, multiple subscribers can be specified in this API call, for example:

curl -X PUT \
  https://api.pushnami.com/api/push/v2/subscriber/variables \
  -H 'authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9… \
  -F psid=590fd6d539db85102d12180b \
  -F psid=590fd6d539db85102d121182 \
  -F q=Automotive \
  -F l=78704

This would update subscribers 590fd6d539db85102d12180b, and 590fd6d539db85102d121182 (Note: not real subscribers)