Skip to main content
POST
/
v2
/
user
/
relationships
Import Relationships
curl --request POST \
  --url https://api.village.do/v2/user/relationships \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "people": [
    "[email protected]",
    "https://linkedin.com/in/janedoe",
    {
      "identifier": "[email protected]",
      "score": 8
    }
  ],
  "min_score": 5
}
'
{
  "data": {
    "summary": {
      "processed": 10,
      "created": 7,
      "updated": 2,
      "failed": 1
    },
    "results": [
      {
        "identifier": "[email protected]",
        "status": "created",
        "person": {
          "id": "person_abc123",
          "name": "John Doe",
          "linkedin": "https://linkedin.com/in/johndoe"
        },
        "error": {
          "code": "PERSON_NOT_FOUND",
          "message": "Could not find or create person with this identifier"
        }
      }
    ]
  },
  "metadata": {
    "request_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Use the API token from your personal Village account: https://village.do/settings#api-keys

For verified apps accessing user data, create a user token: https://docs.village.do/api-reference-v2/authentication/create-authorization

Body

application/json

Request body for importing user relationships

people
(string<email> | string | object)[]
required

Array of people to import as relationships. Can be email addresses, LinkedIn URLs, or objects with identifier and optional score.

Required array length: 1 - 100 elements
Example:
[
"[email protected]",
"https://linkedin.com/in/janedoe",
{
"identifier": "[email protected]",
"score": 8
}
]
min_score
number

Default score for relationships without explicit score (0-10). Defaults to 5.

Required range: 0 <= x <= 10
Example:

5

Response

Relationships imported successfully

data
object
required

Response for importing user relationships

metadata
object
required