Update User MOCK

PATCH User to update existing user's documents or permissions

Previous Step: Create User and OAuth User

Use this endpoint to update a user's KYC or permissions.

API ENDPOINT

https://uat-api.synapsefi.com/v3.1/users/:user_id

PATH PARAMETER

user_id :
required
string

The user ID of the user you wish to update documents for

BODY PARAMETER

documents :
required
string

User KYC documents. See full Base Document or Sub-Document Object below

BASE DOCUMENT OBJECT

refresh_token :
string

User's refresh_token

update.legal_name :
string

Updated legal name of the user

update.login.email :
string

Updated login email of the user

update.login.password :
string

Updated login password of the user

update.login.read_only :
boolean

If this is a read-only user or an admin user. By default all users added via this API call are admin users

update.phone_number :
string

Updated phone number of the user

update.remove_login.email :
string

Login email that you wish to remove

update.remove_phone_number :
string

Phone number that you wish to remove

update.remove_legal_name :
string

Legal name that you wish to remove

update.cip_tag :
integer

Updated CIP tag of the user

update.is_hidden :
boolean

Value denotes if the user can be searched by email/name on Synapse services

update.public_note :
string

Any note that you wish to attach to the user (returned with user object)

permission :
string

This field only accepts LOCKED and MAKE-IT-GO-AWAY. Any other value will be ignored. LOCKED locks a user account, MAKE-IT-GO-AWAY will unindex it.

SUB-DOCUMENT OBJECT

document_type :
required
string

Type of Document (physical, virtual, or social)

document_value :
required
string

Value of the document (if physical document, submit the padded base64 value of the file you wish to upload)

Example #1: Update User Documents

UPDATE USER REQUEST

PATCH /v3.1/users/594e0fa2838454002ea317a0 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_1mtgLwhYHDVKop04XOEjyWJSsnQqZbGkfRF5ux9v|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "email":"[email protected]"
  }]
}
PATCH /v3.1/users/594e0fa2838454002ea317a0 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_1mtgLwhYHDVKop04XOEjyWJSsnQqZbGkfRF5ux9v|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "documents":[{
    "id":"d02f580c1335a625ab2da2d7e53472d4e7fd664e633387654ebebe15ea696c91",
    "virtual_docs":[{
      "id":"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
      "document_value":"111-11-2222",
      "document_type":"SSN"
    }]
  }]
}
PATCH /v3.1/users/594e0fa2838454002ea317a0 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_1mtgLwhYHDVKop04XOEjyWJSsnQqZbGkfRF5ux9v|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "documents":[{
    "id":"d02f580c1335a625ab2da2d7e53472d4e7fd664e633387654ebebe15ea696c91",
    "social_docs":[{
      "id":"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
      "document_value":"901.111.1111",
      "document_type":"PHONE_NUMBER_2FA",
      "mfa_answer":"123456"
    }]
  }]
}

Client Library Examples:

body = {
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "email":"[email protected]"
  }]
}

user.update_info(body)
user.updateUser({
  documents: [{
    id: '<BASE_DOC_ID>',
    email: '[email protected]'
  }]
});
body = {
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "email":"[email protected]"
  }]
}

user.user_update(payload: body)
$body = array (
  'documents' =>
  array (
    array (
      'id' => '2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8',
      'email' => '[email protected]'
    )
  )
);

UPDATE USER RESPONSE

A successful response will include the full user object with the updated fields.

{
    "_id": "589dc8817562960020cb00c9",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/589dc8817562960020cb00c9"
        }
    },
    "client": {
        "id": "589acd9ecb3cd400fa75ac06",
        "name": "SynapseFI"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "id": "bd8d12dc29d2730c6d7b6156d022990b0d20d89bc89da9fb76df82955f587d8f",
            "name": "Charlie Brown",
            "permission_scope": "SEND|RECEIVE|1000|DAILY",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "4b3b10ab8990e43900d626ad23dbf7457c1d19671ffc07bbf74364d7171a7e65",
                    "last_updated": 1486735666802,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "GOVT_ID",
                    "id": "d40fa68bf1963d3368bd5e805e5ec3dfbe99c26f6968c837fb8484ba9564e164",
                    "last_updated": 1486735662589,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "9dd593112385cfed22721355d279e79d33acd2c48cffe9c007b6c4acbfde826c",
                    "last_updated": 1486735666804,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "EMAIL",
                    "id": "fcabe34058c1abee46eb2d2bb29cc91aa2ac422e6bc0c2f934d191c9226cc7f2",
                    "last_updated": 1486735666804,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "FACEBOOK",
                    "id": "0c32234c59b71311b0f3057635c206e6a0d39ecef0bc336fe2bb375c92968117",
                    "last_updated": 1486735666804,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
                    "last_updated": 1486735666800,
                    "status": "SUBMITTED|VALID"
                }
            ]
        },
        {
            "id": "bd8d12dc29d2730c6d7b6156d022990b0d20d89bc89da9fb76df82955f587d8f",
            "name": "Charlie Brown",
            "permission_scope": "SEND|RECEIVE|1000|DAILY",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "1449fd8d4caf0c232b73dde6f3572f45b47414be9bf87f02b5bdbacf662ae0ae",
                    "last_updated": 1486735666153,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "EMAIL",
                    "id": "fcabe34058c1abee46eb2d2bb29cc91aa2ac422e6bc0c2f934d191c9226cc7f2",
                    "last_updated": 1486735747561,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "FACEBOOK",
                    "id": "0c32234c59b71311b0f3057635c206e6a0d39ecef0bc336fe2bb375c92968117",
                    "last_updated": 1486735666155,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "9dd593112385cfed22721355d279e79d33acd2c48cffe9c007b6c4acbfde826c",
                    "last_updated": 1486735748216,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
                    "last_updated": 1486735666151,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1486735484343,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1486735747555,
        "supp_id": "122eddfgbeafrfvbbb"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "SEND-AND-RECEIVE",
    "phone_numbers": [
        "901.942.8167"
    ],
    "photos": [],
    "refresh_token": "refresh_e36f207aef9911e6aac58a1ffc37511f"
}

Base Document & Sub-Document IDs

Base document or sub-document IDs will change if the document is updated.

Example #2: Lock/Remove User

Lock the User: To lock a user from performing further actions with the API, PATCH User permission to “LOCKED” status. Once locked, you cannot unlock the user. If a user was locked mistakenly, please contact Synapse for steps to unlock. Refund user’s funds before locking.

Remove the User: To remove a user and prevent the user from performing further API actions. Patch the permission to “MAKE-IT-GO-AWAY” which will unindex the user. Refund user’s funds before you remove the user.

Please note, we still retain user data after a user is removed (for compliance purposes).

REMOVE USER REQUEST

PATCH /v3.1/users/5bb155ddaadcf02b6d902620 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_25BpgCAt3ymEJdkF8iwrKVlOqLZ071IehGTUaz6n|client_secret_bomP73QBiEHwJvO6tMCGXy8NUlgLj14xakzf50RK
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_GXAMgwobNa0J9ziqW2hnfBycU0m7RTFS5sEeP1l8|
Content-Type: application/json

{
  "permission":"MAKE-IT-GO-AWAY"
}

REMOVE USER RESPONSE

{
    "_id": "5bb155ddaadcf02b6d902620",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/5bb155ddaadcf02b6d902620"
        }
    },
    "client": {
        "id": "5ade26b4567a900029e2afd2",
        "name": "YY Test Account"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "entity_scope": "Arts & Entertainment",
            "entity_type": "M",
            "id": "2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
            "name": "Test User",
            "permission_scope": "SEND|RECEIVE",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "67ebd5ba7ca3c6b4857710d51a9399794c5958bb9c27bd54a3212179a48f7e84",
                    "last_updated": 1538348584971,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "EMAIL",
                    "id": "2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741",
                    "last_updated": 1538348584986,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "DATE",
                    "id": "2b52edae636ca2fbe12ab1b08a344d381dabc3d2b92844cf7a8d8b6052b26d8e",
                    "last_updated": 1538348584986,
                    "status": "SUBMITTED"
                },
                {
                    "document_type": "IP",
                    "id": "28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a",
                    "last_updated": 1538348584986,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f",
                    "last_updated": 1538348584987,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "FACEBOOK",
                    "id": "8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7",
                    "last_updated": 1538348584987,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "ADDRESS",
                    "id": "90913d23fbdf3603e5747036e03c5998874b465aa78e7dc7dfc87a901f50891c",
                    "last_updated": 1538348584987,
                    "status": "SUBMITTED"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "7cb85697d26e2c1010266fd64a22afd396167ca630a4bad21a9e8fcff865bb1c",
                    "last_updated": 1538348584948,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1538348500635,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1538367080540,
        "public_note": null,
        "supp_id": "my_user_id"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "MAKE-IT-GO-AWAY",
    "phone_numbers": [
        "901.111.1111"
    ],
    "photos": [],
    "refresh_token": "refresh_hqbzjWQnuo1dMJA2a0O0Nx6Em7tIGSXk9Z8vfFyi"

A successful response will include the full user object with the permission field updated with the new status.

Update User MOCK


PATCH User to update existing user's documents or permissions

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.