Messages

add message

POST https://ushahididocs.api.ushahidi.io/api/v3/messages

Request Body

NameTypeDescription

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"
    ]
}

edit message

PUT https://ushahididocs.api.ushahidi.io/api/v3/messages/18

Request Body

NameTypeDescription

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"
    ]
}