Contacts

add contact

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

Request Body

NameTypeDescription

user_id

Integer

The user identifier

country_code

String

Country code

can_notify

Boolean

Set True to enable contact notification and False to disable

contact

String

Contact number

type

String

The type of contact e.g. "phone"

data_source

String

The data source

{
    "id": 1,
    "url": "http://localhost:8000/api/v3/contacts/1",
    "user": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/users/1"
    },
    "data_source": null,
    "type": "phone",
    "contact": "123456789",
    "created": "1970-01-01T00:00:00+00:00",
    "updated": null,
    "can_notify": false,
    "country_code": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}

edit contact

PUT https://ushahididocs.api.ushahidi.io/api/v3/contacts/3

Request Body

NameTypeDescription

user_id

Integer

The user identifier

country_code

String

Country code

can_notify

Boolean

Set True to enable contact notification and False to disable

contact

String

Contact number

type

String

The type of contact e.g. "phone"

data_source

String

The data source

{
    "id": 1,
    "url": "http://localhost:8000/api/v3/contacts/1",
    "user": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/users/1"
    },
    "data_source": null,
    "type": "phone",
    "contact": "123456789",
    "created": "1970-01-01T00:00:00+00:00",
    "updated": null,
    "can_notify": false,
    "country_code": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search"
    ]
}