Users

The user resource represents a user record that has been synchronized from one or many of the Mesh integrations.

User records can also be created, updated or deleted via the Mesh API. API actions can optionally be mirrored in an application's activated integrations.

The primary key upon which the Mesh service uniques user records is a user's email. When Mesh encounters multiple user records with the same email, it will combine the records by appending information from the new record to the existing. It will not override information for the existing record.

Provider Mapping


Provider Model URL
Salesforce lead http://developers.hubspot.com/docs/methods/contacts/contacts-overview
Hubspot contact http://developers.hubspot.com/docs/methods/contacts/contacts-overview
Zendesk user https://developer.zendesk.com/rest_api/docs/core/users
Intercom user https://developers.intercom.io/reference#users
Stripe customer https://stripe.com/docs/api#customers
Shopify customer https://help.shopify.com/api/reference/customer
SendGrid recipient https://sendgrid.com/docs/API_Reference/Web_API_v3/Marketing_Campaigns/contactdb.html
MailChimp member http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members

Model


Field Type Description
id string The the Mesh identifier for the user.
created_at int The original creation date of the user.
updated_at int The latest update date for the user.
first_name string The first name of the user.
last_name string The last name of the user.
full_name string The full name of the user.
email string The email address for the user.
phone string The phone number for the user.
mobile string The mobile number for the user.
fax string The fax number for the user.
title string The title of the user.
department string The department of the user.
type string The type for the user record (lead or contact).
priority string The priority for the user.
description string The description of the user.
organization_id string The Mesh identifier of the organization to which the user belongs.
organization_name string The name of the organization to which the user belongs.
origin string The original origin of the user record.
provider_data object The provider_data object for the user.

Create User


Creates a new user record. This action will can also optionally create a user record in each activated integration for the application.

Request

POST http://api.meshdata.io/apps/{app_id}/users
{
    "department": "Backfield",
    "description": "BeastMode",
    "email": "marshawn@beastmode.com",
    "first_name": "Marshawn",
    "full_name": "Marshawn Lynch",
    "last_name": "Lynch",
    "mobile": "415-242-4242",
    "organization_id": "34a1c3415decd78dd00dfa89",
    "origin": "salesforce",
    "priority": "high",
    "title": "Running Back",
    "type": "Lead",
}

Response

HTTP/1.1 200 OK
{
    "created_at" : 1243435434543,
    "department": "Backfield",
    "description": "BeastMode",
    "email": "marshawn@beastmode.com",
    "fax": "",
    "first_name": "Marshawn",
    "full_name": "Marshawn Lynch",
    "id": "56a1c9715decd82dd00dfa62",
    "last_name": "Lynch",
    "mobile": "415-242-4242",
    "organization_name": "Seattle Seahawks",
    "organization_id": "34a1c3415decd78dd00dfa89",
    "origin": "salesforce",
    "phone": "",
    "priority": "high",
    "provider_data" : {},
    "title": "Running Back",
    "type": "Lead",
    "updated_at" : 1243435434543,
}

Update User


Updates an existing user record. This action can also optionally update the corresponding user record in each activated integration for the application.

Request

PUT http://api.meshdata.io/apps/{app_id}/users/{user_id}
{
    "description" : "Retired"
}

Response

HTTP/1.1 204 No Content

Delete User


Deletes an existing user record. Deleting users via the Mesh API is a non-recoverable operation. This action will also delete the corresponding user record in each activated integration for the application.

Request

DELETE http://api.meshdata.io/apps/{app_id}/users/{user_id}

Response

HTTP/1.1 204 No Content

Get User


Fetches a single user record.

Request

GET http://api.meshdata.io/apps/{app_id}/users/{user_id}

Response

HTTP/1.1 200 OK
{
    "created_at" : 1243435434543,
    "department": "Backfield",
    "description": "BeastMode",
    "email": "marshawn@beastmode.com",
    "fax": "",
    "first_name": "Marshawn",
    "full_name": "Marshawn Lynch",
    "id": "56a1c9715decd82dd00dfa62",
    "last_name": "Lynch",
    "mobile": "415-242-4242",
    "organization_name": "Seattle Seahawks",
    "organization_id": "34a1c3415decd78dd00dfa89",
    "origin": "salesforce",
    "phone": "",
    "priority": "high",
    "provider_data" : {},
    "title": "Running Back",
    "type": "Lead",
    "updated_at" : 1243435434543,
}

Get Users


Fetches multiple user records.

GET http://api.meshdata.io/apps/{app_id}/users

Response

HTTP/1.1 200 OK
{
    "threads": [
        {
            "created_at" : 1243435434543,
            "department": "Backfield",
            "description": "BeastMode",
            "email": "marshawn@beastmode.com",
            "fax": "",
            "first_name": "Marshawn",
            "full_name": "Marshawn Lynch",
            "id": "56a1c9715decd82dd00dfa62",
            "last_name": "Lynch",
            "mobile": "415-242-4242",
            "organization_name": "Seattle Seahawks",
            "organization_id": "34a1c3415decd78dd00dfa89",
            "origin": "salesforce",
            "phone": "",
            "priority": "high",
            "provider_data" : {},
            "title": "Running Back",
            "type": "Lead",
            "updated_at" : 1243435434543,
        },
        {...}
    ]
}

Get User Transactions


Fetches all transaction records associated with a user.

GET http://api.meshdata.io/apps/{app_id}/users/{user_id}/transactions

Response

HTTP/1.1 200 OK
{
    "transactions": [   
        {
            "amount": 1000,
            "currency": "USD",
            "created_at" : 1243435434543,
            "description": "This is a great transaction",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "stripe",
            "provider_id": "ch_18SuuBLr8jD4CYuzrF5yAKfX",
            "updated_at" : 1243435434543,
            "url": "https://dashboard.stripe.com/payments/ch_18SuuBLr8jD4CYuzrF5yAKfX"
            "user_id": "90a1c6587decd23dd00dfa33"
        },
        {...}
    ]
}

Get User Threads


Fetches all thread records associated with a user.

GET http://api.meshdata.io/apps/{app_id}/users/{user_id}/threads

Response

HTTP/1.1 200 OK
{
    "threads": [
        {
            "collaborator_ids": [
                "21a1c6598dsdsd23dd00ddf34"
            ],
            "created_at": 1243435434543,
            "custom_fields": [],
            "description": "",
            "id": "56a1c9715decd82dd00dfa62",
            "origin": "zendesk",
            "priority": "high",
            "provider_data": {},
            "read": true,
            "user_id": "12a1c6798decd23dd00dfa34",
            "sub_type": "problem",
            "subject": "Any extra tickets?",
            "status": "open",
            "tags": [],
            "type": "ticket",
            "updated_at": 1243435434543,
            "url": "www.zendesk.com/{ticket_id}"
        },
        {...}
    ]
}

Get Full User


Fetches a user record and all of its associated data (organization, tickets, transactions).

GET http://api.meshdata.io/apps/{app_id}/users/{user_id}/full

Response

HTTP/1.1 200 OK
{
    "created_at" : 1243435434543,
    "department": "Backfield",
    "description": "BeastMode",
    "email": "marshawn@beastmode.com",
    "fax": "",
    "first_name": "Marshawn",
    "full_name": "Marshawn Lynch",
    "id": "56a1c9715decd82dd00dfa62",
    "last_name": "Lynch",
    "mobile": "415-242-4242",
    "organization": [
            {organization_data}
    ],
    "organization_name": "Seattle Seahawks",
    "organization_id": "34a1c3415decd78dd00dfa89",
    "origin": "salesforce",
    "phone": "",
    "priority": "high",
    "provider_data" : {},
    "tickets": [
            {ticket},
            {ticket}
    ],
    "title": "Running Back",
    "transactions": [
            {transactions},
            {transactions}
    ],
    "type": "Lead",
    "updated_at" : 1243435434543,
}

results matching ""

    No results matching ""