POST
https://ushahididocs.api.ushahidi.io/oauth/token
This endpoint allows you to get an authorization token for the client without a user login. It allows you to execute the same actions as any non-logged in user.
Name | Type | Description |
---|---|---|
POST
https://ushahididocs.api.ushahidi.io/oauth/token
This endpoint allows you to get an authentication token. All fields are required.
Name | Type | Description |
---|---|---|
POST
https://ushahididocs.api.ushahidi.io/api/v3/passwordreset
POST
https://ushahididocs.api.ushahidi.io/api/v3/passwordreset/confirm
POST
https://ushahididocs.api.ushahidi.io/api/v3/register
Register your Ushahidi platform users with this endpoint.
GET
https://ushahididocs.api.ushahidi.io/api/v3/collections
GET
https://ushahididocs.api.ushahidi.io/api/v3/posts?order=desc&orderby=created&set=15
POST
https://ushahididocs.api.ushahidi.io/api/v3/collections
DELETE
https://ushahididocs.api.ushahidi.io/api/v3/collections/:collectionId
Delete the collection by its id.
GET
https://ushahididocs.api.ushahidi.io/api/v3/config
GET
https://ushahididocs.api.ushahidi.io/api/v3/contacts/:contactId
Only used by deployments that require messaging capabilities such as receiving posts by SMS or Twitter.
GET
https://ushahididocs.api.ushahidi.io/api/v3/country-codes
This is only used to get a list of country codes that we can use for the UI of targeted surveys, a SaaS platform feature for sending surveys in steps to groups of people that they can respond to from their phones.
GET
https://ushahididocs.api.ushahidi.io/api/v3/exports/jobs?user=me
This returns all the metadata for exports of the current user
PUT
https://ushahididocs.api.ushahidi.io/api/v3/csv/:id/import
This returns all the metadata for exports of the current user
GET
https://ushahididocs.api.ushahidi.io/api/v3/dataproviders/[:id]
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms/:id
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms/:id/attributes
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms/:id/stages
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms/:id/stats
GET
https://ushahididocs.api.ushahidi.io/api/v3/forms/:id/roles
POST
https://ushahididocs.api.ushahidi.io/api/v3/forms
Create a survey in the backend.
PUT
https://ushahididocs.api.ushahidi.io/api/v3/forms/:form_id
Create a survey in the backend.
DELETE
https://ushahididocs.api.ushahidi.io/api/v3/forms/:form_id
POST
https://ushahididocs.api.ushahidi.io/api/v3/messages
Used in the "Conversation with author" UX in the platform.
GET
https://ushahididocs.api.ushahidi.io/api/v3/messages
Used in the "Conversation with author" UX in the platform.
GET
https://ushahididocs.api.ushahidi.io/api/v3/messages/:messageId/post
Used in the "Conversation with author" UX in the platform.
POST
https://ushahididocs.api.ushahidi.io/api/v3/posts
Create a new post in the ushahidi platform. This method works with a user's password_grant token or with a client_credentials token generated with the client id and secret.
Example payload:
{"title":"My title","content":"My content","values":{},"form":{"id":4}}
GET
https://ushahididocs.api.ushahidi.io/api/v3/posts
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
grant_type
string
Expected value for this type: "client_credentials"
client_secret
string
The client secret you added for your deployment in the database. Default value: "35e7f0bca957836d05ca0492211b0ac707671261"
client_id
string
The client_id you created for your deployment. Default value: "ushahidiui"
scope
string
All allowed scopes for this type: "posts country_codes media forms api tags savedsearches sets users stats layers config messages notifications webhooks contacts permissions csv"
scope
string
Default value: *
client_secret
string
Your client secret. Default value: 35e7f0bca957836d05ca0492211b0ac707671261
client_id
string
Your client ID. Default value: ushahidiui
grant_type
string
Fixed. Send value: password
password
string
Your Ushahidi platform password
username
string
Your Ushahidi platform username
string
example: youremail@example.com
password
string
The new password
token
string
The reset token sent by email
string
Authorization
string
Bearer <your-auth-token>
set
string
:collectionId (required to get posts from a collection)
orderby
string
Options: desc, asc
limit
string
:number
Authorization
string
Bearer <your-auth-token>
orderby
string
Options: desc, asc
limit
string
:number
Authorization
string
Bearer <your-auth-token>
user_id
string
The owner of the collection
name
string
Collection's name
role
array
The role id that is allowed to see and use it
view
string
Options: map,data
collectionId
number
The collection id.. can appear as set_id in other places
Authorization
string
Bearer <your-auth-token>
string
contact_id
number
The contact id that you want to retrieve
Authorization
string
Bearer: <your-auth-token>
string
Auth
string
Bearer <your-auth-token>
:jobId
number
Export ID
user
string
Value: me
Authorization
string
Bearer: <your-auth-token>
user
string
Value: me
Authorization
string
Bearer: <your-auth-token>
id
string
Dataprovider id
Authorization
string
Bearer: <your-auth-token>
Authorization
string
Bearer: <your-auth-token>
id
number
The survey id
Authorization
string
Bearer: <your-auth-token>
id
number
The form id
Authorization
string
Bearer: <your-auth-token>
id
number
The form id
Authorization
string
Bearer: <your-auth-token>
id
number
The form id
Authorization
string
Bearer: <your-auth-token>
id
number
The form id
Authorization
string
Bearer: <your-auth-token>
string
Authorization
string
Bearer: <your-auth-token>
name
string
The survey name
tasks.$n.id
string
A frontend generated ID to identify it while its being created. Example interim_id_2
tasks.$n.is_public
boolean
Is the task open to everyone? Default: true
tasks.$n.attributes
array
A list of attributes for the task. Takes the same options as form attributes for each.
tasks.$n.task_is_internal_only
boolean
Default: false
tasks.$n.show_when_published
boolean
Default: true
tasks.$n.type
string
post
tasks.$n.required
boolean
Default: false
tasks.$n.priority
number
The order of the task in the form
tasks.$n.label
string
The stage label
tasks
array
Array of stages (tasks) with options. Look for tasks.$n.$x in this list of params to see the attributes available for tasks
everyone_can_create
string
Can any user create posts? Default: true
require_approvel
boolean
Does the data in this survey auto-publish or is it saved as draft (default: false)
color
string
The survey color (shown in map and data view)
form_id
number
The survey id.
Authorization
string
Bearer: <your-auth-token>
name
string
The survey name
tasks.$n.id
string
A frontend generated ID to identify it while its being created. Example interim_id_2
tasks.$n.is_public
boolean
Is the task open to everyone? Default: true
tasks.$n.attributes
array
A list of attributes for the task. Takes the same options as form attributes for each.
tasks.$n.task_is_internal_only
boolean
Default: false
tasks.$n.show_when_published
boolean
Default: true
tasks.$n.type
string
post
tasks.$n.required
boolean
Default: false
tasks.$n.priority
number
The order of the task in the form
tasks.$n.label
string
The stage label
tasks
array
Array of stages (tasks) with options. Look for tasks.$n.$x in this list of params to see the attributes available for tasks
everyone_can_create
string
Can any user create posts? Default: true
require_approvel
boolean
Does the data in this survey auto-publish or is it saved as draft (default: false)
color
string
The survey color (shown in map and data view)
form_id
number
The survey id.
Authorization
string
Bearer: <your-auth-token>
Authorization
string
Bearer: <your-auth-token>
parent_id
number
The id of the message you are responding to.
contact_id
number
The contact id of the person you want to send a message to. You can get this in the "Get messages for a post contact" endpoint below this one.
direction
string
Use "outgoing" for sending messages. We use "incoming" when a datasource fetches a message.
message
string
The message you want to send
orderby
string
Options: "created", "updated"
order
string
Options: "desc", "asc"
limit
number
Pagination limit
offset
number
Pagination offset
contact
number
The contact id. You can get it from the post the message is linked to.
Authorization
string
Bearer: <your-auth-token>
orderby
string
Options: "created", "updated"
order
string
Options: "desc", "asc"
limit
number
Pagination limit
offset
number
Pagination offset
contact
number
The contact id. You can get it from the post the message is linked to.
Authorization
string
Bearer: <your-auth-token>
Authorization
string
Bearer: <your-auth-token>
form
object
Format: {id: <formId>} . Sending the id of the form we want to add posts to is required.
values
object
a key:value map of fields and their content. This is used for all fields other than content and title and follows the format fieldKey: value. You can get a field's get by requesting all attributes of a form. Can be an empty object literal if a form has no other fields.
content
string
The post's description field
title
string
The post's title field
orderby
string
Options: desc, asc
limit
string
:number
Authorization
string
Bearer <your-auth-token>