Contacts /user/{user-id}/contacts

The contacts owned by an user or shared with him.

Reading

GET /user/me/contacts HTTP/1.1
Host: localhost:3000

Permissions

  • The applied permissions to retrieve the parent user are required.

Fields

An array of Contact objects attached to the parent user and whose its retrieve permissions are granted.

Publishing

POST /user/me/contacts HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with publish_repertory permission is required.
  • At least one of the following criteria must be met :
    • The parent user is the current person.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the parent user.

Fields

Name Description Type

first_name

The first name of the contact.

string

last_name

The last name of the contact.

string

type

The type of the contact.

string

job

The job of the contact.

string

account

The ID of the Account of the contact.
Must be an account owned by the current person or shared with him.

string

avatar

The ID of the Photo that represents the avatar of the contact.
Must be a photo owned by the current person whose its tmp field is set to true.

string

website_url

The website url of the contact.

string

mails

The mail addresses of the contact.

object[]

type

The type attached to the mail address.

string

address

The mail address.

string

main

If the address is the main mail.

boolean

phones

The phone numbers of the contact.

object[]

type

The type attached to the phone number.

string

number

The phone number.

string

main

If the number is the main phone.

boolean

addresses

The postal addresses of the contact.

object[]

type

The type attached to the postal address.

string

lane_number

The address lane number.

string

lane_name

The address lane name.

string

complement

The address complement.

string

zip

The address zip.

string

city

The address city.

string

region

The address region.

string

country

The address country.

string

main

If the address is the main address.

boolean

notes

Notes about the contact.

string

custom_fields

Custom fields attached to the contact.

object

tags

An array of Tag IDs at which is attached the contact.
Must be some Tags belonging to the current person workspace.

string[]

privacy

The privacy of the account.

object

value

The value of the privacy.

string{WORKSPACE, SELF, CUSTOM}

perms

The privacy permission.

string{READ, SPEAK, WRITE}

allow

An array of User and/or Group IDs who have access.

string[]

deny

An array of User and/or Group IDs who don't have access.

string[]

Response

If successful :

{
    "success" : true,
    "_id" : "..."
}

Otherwise a relevant error message will be returned.

Updating

You can update contacts by using the /contact edge.

Deleting

You can delete contacts using the /contact edge.