POST
https://ushahididocs.api.ushahidi.io/api/v3/messages
parent_id
String
The parent identifier
datetime
String
Date and time
user_id
String
user ID
title
String
Massage title
data_source_message_id
String
Data source message identifier
message
String
The main message you would like to add
contact_id
Integer
The post contact identifier
data_source
String
Data source
post_id
String
post ID
notification_post_id
String
Notification post identifier
additional_data
String
Additional information
direction
String
Message direction e.g. "outgoing"
status
String
Message status
type
String
Message type e.g. "sms"
contact_type
String
Contact type
contact
String
Message contact
{
"id": 20,
"url": "http://localhost:8000/api/v3/messages/20",
"user": {
"id": 2,
"url": "http://localhost:8000/api/v3/users/2"
},
"parent_id": null,
"contact_id": 3,
"post_id": null,
"data_source": null,
"data_source_message_id": null,
"title": null,
"message": "Another test message",
"datetime": null,
"type": "sms",
"status": "pending",
"direction": "outgoing",
"created": "2022-11-02T15:20:45+00:00",
"additional_data": null,
"notification_post_id": null,
"contact": null,
"contact_type": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/messages/18
parent_id
String
The parent identifier
datetime
String
Date and time
user_id
String
user ID
title
String
Massage title
data_source_message_id
String
Data source message identifier
message
String
The main message you would like to add
contact_id
Integer
The post contact identifier
data_source
String
Data source
post_id
String
post ID
notification_post_id
String
Notification post identifier
additional_data
String
Additional information
direction
String
Message direction e.g. "outgoing"
status
String
Message status
type
String
Message type e.g. "sms"
contact_type
String
Contact type
contact
String
Message contact
{
"id": 20,
"url": "http://localhost:8000/api/v3/messages/20",
"user": {
"id": 2,
"url": "http://localhost:8000/api/v3/users/2"
},
"parent_id": null,
"contact_id": 3,
"post_id": null,
"data_source": null,
"data_source_message_id": null,
"title": null,
"message": "Another test message",
"datetime": null,
"type": "sms",
"status": "pending",
"direction": "outgoing",
"created": "2022-11-02T15:20:45+00:00",
"additional_data": null,
"notification_post_id": null,
"contact": null,
"contact_type": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
Sorting parameter Available values : entity fields Default value : id
id
Sorting parameter Available values : [ASC,DESC] Default value : ASC
asc
Paging parameter Default value : null
2
Paging parameter Default value : 0
3
Filter Parameter Available values : [outbox,inbox,archived]
outbox
Filter Parameter Available values : [all,received,archived,pending,sent]
received
Filter Parameter check the contact id
1
Filter Parameter check the parent id
2
Filter Parameter check the post id
1
Filter Parameter check the type Available values : [sms,twitter,email]
sms
Filter Parameter check the value if it likes contact, title, message
test
Filter Parameter check the data_source Available values : [sms,twitter,email]
smssync
GET /api/v3/messages HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"results": [
{
"id": 1,
"url": "text",
"parent_id": "text",
"contact_id": 1,
"post_id": "text",
"user_id": "text",
"data_source": "text",
"data_source_message_id": "text",
"title": "text",
"message": "text",
"datetime": {
"date": "text",
"timezone_type": 1,
"timezone": "text"
},
"type": "text",
"status": "text",
"direction": "text",
"created": "text",
"additional_data": "text",
"notification_post_id": "text",
"contact": "text",
"contact_type": "text",
"allowed_privileges": [
"text"
],
"user": {
"id": 1,
"url": "text"
}
}
],
"limit": "text",
"offset": 1,
"order": "text",
"orderby": "text",
"curr": "text",
"next": "text",
"prev": "text",
"total_count": 1
}
GET /api/v3/messages/2 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 2,
"url": "http://localhost:8000/api/v3/messages/2",
"contact_id": 3,
"title": "",
"message": "Another test message",
"type": "sms",
"status": "received",
"direction": "incoming",
"created": "1970-01-01T00:00:00+00:00",
"allowed_privileges": [
"read",
"create",
"delete",
"search"
]
}
GET /api/v3/messages/4/post HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 110,
"url": "http://localhost:8000/api/v3/posts/110",
"user": {
"id": 1,
"url": "http://localhost:8000/api/v3/users/1"
},
"form": {
"id": 1,
"url": "http://localhost:8000/api/v3/forms/1"
},
"message": {
"id": 4,
"url": "http://localhost:8000/api/v3/messages/4"
},
"type": "report",
"title": "ACL test post",
"content": "Testing oauth posts api access",
"status": "published",
"created": "2012-12-17T11:18:40+00:00",
"locale": "en_us",
"values": {
"last_location": [
"Trisolaris"
]
},
"post_date": "2012-12-17T03:18:40+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"source": "sms",
"contact": {
"id": 3,
"url": "http://localhost:8000/api/v3/contact/3"
},
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}