Skip to main content

Relationships

POST /relationships

This API is used to manage the relationship between two users.

Endpoint URL

 https://api.mixin.one/relationships

Authentication and options

Authorization
Authorized
LimitationNo limitation

According to different payload, the API have different behaviors.

Add a Friend and set an alias

Payload

{
"user_id": "user's user_id"
"full_name": "the alias of the friend, optinal."
"phone": "the phone number the friend, optinal."
"action": "ADD"
}

Delete a Friend

Payload

{
"user_id": "user's user_id"
"action": "REMOVE"
}

Block a User

Payload

{
"user_id": "user's user_id"
"action": "BLOCK"
}

Unblock a User

Payload

{
"user_id": "user's user_id"
"action": "UNBLOCK"
}

Example request

curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" https://api.mixin.one/relationships --data REQUEST_BODY
Response
{
"data":{
"type": "user",
"user_id": "773e5e77-4107-45c2-b648-8fc722ed77f5",
"identity_number": "7000",
"phone": "+8613801380138",
"full_name": "Team Mixin",
"biography": "",
"avatar_url": "https://images.mixin.one/E2y0BnTopFK9qey0YI-8xV3M82kudNnTaGw0U5SU065864SsewNUo6fe9kDF1HIzVYhXqzws4lBZnLj1lPsjk-0=s256",
"relationship": "STRANGER",
"mute_until": "0001-01-01T00:00:00Z",
"created_at": "2017-12-23T18:23:26.996149Z",
"is_verified": true,
"is_scam": false,
"session_id": "a34c07a9-755d-4b54-94c5-e45e9a2dd43e",
"pin_token_base64": "",
"code_id": "dabcf1c2-6a5e-4ea3-ad51-6e6641a06c7c",
"code_url": "https://mixin.one/codes/dabcf1c2-6a5e-4ea3-ad51-6e6641a06c7c",
"has_pin": true,
"device_status": "ACTIVE",
"has_emergency_contact": true,
"receive_message_source": "CONTACTS",
"accept_conversation_source": "CONTACTS",
"accept_search_source": "CONTACTS",
"fiat_currency": "USD",
"transfer_notification_threshold": 0,
"transfer_confirmation_threshold": 0,
}
}

GET /blocking_users

Get blocked users.

Endpoint URL

 https://api.mixin.one/blocking_users

Authentication and options

Authorization
CONTACTS:READ
LimitationNo limitation

Example request

curl -i -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" https://api.mixin.one/blocking_users
Response
{
"data":{
"type": "user",
"user_id": "773e5e77-4107-45c2-b648-8fc722ed77f5",
"identity_number": "7000",
"phone": "+8613801380138",
"full_name": "Team Mixin",
"biography": "",
"avatar_url": "https://images.mixin.one/E2y0BnTopFK9qey0YI-8xV3M82kudNnTaGw0U5SU065864SsewNUo6fe9kDF1HIzVYhXqzws4lBZnLj1lPsjk-0=s256",
"relationship": "STRANGER",
"mute_until": "0001-01-01T00:00:00Z",
"created_at": "2017-12-23T18:23:26.996149Z",
"is_verified": true,
"is_scam": false,
"session_id": "a34c07a9-755d-4b54-94c5-e45e9a2dd43e",
"pin_token_base64": "",
"code_id": "dabcf1c2-6a5e-4ea3-ad51-6e6641a06c7c",
"code_url": "https://mixin.one/codes/dabcf1c2-6a5e-4ea3-ad51-6e6641a06c7c",
"has_pin": true,
"device_status": "ACTIVE",
"has_emergency_contact": true,
"receive_message_source": "CONTACTS",
"accept_conversation_source": "CONTACTS",
"accept_search_source": "CONTACTS",
"fiat_currency": "USD",
"transfer_notification_threshold": 0,
"transfer_confirmation_threshold": 0,
}
}