Skip to main content

rapidpro@1.0.8

Functions​

addContact(params, callback)
sendBroadcast(params, callback)
startFlow(params, callback)
upsertContact(params, callback)

addContact​

addContact(params, callback) β‡’ Operation Adds a new contact to RapidPro

Kind: global function
Access: public

ParamTypeDescription
paramsobjectdata to create the new resource
callbackfunction(Optional) callback function

Example

addContact({
name: "Mamadou",
language: "ENG",
urns: ["tel:+250788123123"]
});

sendBroadcast​

sendBroadcast(params, callback) β‡’ Operation Sends a message to a list of contacts and/or URNs

Kind: global function
Access: public

ParamTypeDescription
paramsobjectdata to create the new resource
callbackfunction(Optional) callback function

Example

sendBroadcast({
text: "Hello world",
urns: ["twitter:sirmixalot"],
contacts: ["a052b00c-15b3-48e6-9771-edbaa277a353"]
});

startFlow​

startFlow(params, callback) β‡’ Operation Start a RapidPro flow for a number of contacts

Kind: global function
Access: public

ParamTypeDescription
paramsobjectdata to create the new resource
callbackfunction(Optional) callback function

Example

startFlow({
flow: "f5901b62-ba76-4003-9c62-72fdacc1b7b7",
restart_participants: false,
contacts: ["a052b00c-15b3-48e6-9771-edbaa277a353"]
});

upsertContact​

upsertContact(params, callback) β‡’ Operation Upserts a contact to RapidPro by URN

Kind: global function
Access: public

ParamTypeDescription
paramsobjectdata to upsert a contact
callbackfunction(Optional) callback function

Example

upsertContact({
name: "Mamadou",
language: "ENG",
urns: ["tel:+250788123123"]
});