Iris msg API

Iris msg API – v1

A set of endpoints to manage Iris msg organisations and sent messages to subscribers through the donor network

Auth

get /users/me users.me Me

Fetches the current authenticated user

post /users/login/request users.login_request Request login

Requests a login sms to be sent and creates a new user if it doesn't exist

nametypedescription
phoneNumberstringThe local phone number of the user
countryCodestringThe ISO_3166-2 country where the phone is

post /users/login/check users.login_check Check login

Checks a login sms code and logs in the user and optionally verifies the user

nametypedescription
codenumberThe sms code to check

post /users/update_fcm users.update_fcm Set fcm token

Updates the fcm token for the current user

nametypedescription
newTokenstringThe updated fcm token

Organisations

get /organisations/ orgs.index Index

Fetches organisations the current user is part of

get /organisations/:org_id orgs.show Show

Fetches a specific organisation that the user is part of

nametypedescription
org_idstringThe id of the organisation ti fetch

get /organisations/:org_id/members orgs.members Members

Fetches the members of an organisation with their phone numbers

nametypedescription
org_idstringThe id of the organisation ti fetch

post /organisations/ orgs.create Create

Creates a new organisation with the current user as a coordinator

nametypedescription
namestringThe name of the new organisation
infostringA longer description of the new organisation

delete /organisations/:org_id orgs.destroy Destroy

Deletes an organisation (using a soft delete)

nametypedescription
org_idstringThe id of the delete

Membership

post /organisations/:org_id/members members.create Create

Invites a member to an organisation

nametypedescription
org_idstringThe id of the organisation to be added to
nametypedescription
phoneNumberstringThe phone number of the person to invite
countryCodestringThe ISO_3166-2 country where the phone is
rolestringThe role of the new user (coordinator|donor|subscriber)
labelstringA label for the new member

delete /organisations/:org_id/members/:mem_id members.destroy Destroy

Remove a member from an organisation (uses a soft delete)

nametypedescription
org_idstringThe id of the organisation to be removed from
mem_idstringThe id of the membership to be removed

post /accept/:token members.acceptInvite Accept Invite

Accept an invitation to join an organisation and returns UserAuth

nametypedescription
tokenstringThe invite token the user was sent

get /unsub/:token members.unsubscribe Unsubscribe

Unsubscribes a member from an organisation (uses a soft delete)

nametypedescription
tokenstringThe unsubscribe token the user was sent

get /invite/:token members.showInvite Show Invite

Gets the information for a deep-linked donation accept screen

nametypedescription
tokenstringThe invite token the user was sent

Messages

get /messages/ messages.create Create

Creates a message and sends out fcm `new_donations` messages to donors

nametypedescription
orgIdstringThe id of the organisation to send to
contentstringThe message to be sent

get /messages/attempts messages.attempts_index Pending Attempts

Gets the pending messages you have to send as a donor

post /messages/attempts messages.attempts_update Update Attempts

Sets the state of a set of MessageAttempts

nametypedescription
updatesarrayThe updates to perform
updates[n].attemptstringThe id of the attempt to update
updates[n].newStatestringThe new state of the attempt (success|failed|rejected|no_service|no_sms_data|radio_off)