Polinode
Guide
Home Page
Login
Guide
Home Page
Login
  • Guide

    • Introduction
    • Networks
    • Surveys
    • Passive Data
    • Automations
    • Social Data
    • Research Data
    • Your Account
    • FAQ
    • API
    • Embedding

API

Overview

We make available an API to enable you to programmatically create, retrieve, update and delete your networks and employee data within Polinode. API access is available to all users with a Polinode account.

In order to access the API you will need to generate an API credential from within the Polinode web application. This produces a Bearer token which you should treat like a password and store securely. Polinode does not store your token so be sure to record it prior to closing the dialogue. You can create multiple credentials and can delete (revoke) a credential at any time.

Enterprise organizations can also create organization-owned API credentials with fine-grained access scopes — see Scopes below.

The documentation on this page relates to version 2 of the Polinode API.

You will find a set of example API calls authored in Python here and in node.js here.

Authentication

The Polinode API uses bearer-token authentication. Supply your token in an Authorization header on every request:

Authorization: Bearer <your-token>

Bearer tokens are only secure if used over an HTTPS connection so it is important that you always specify https://app.polinode.com/api/v2 as your base route.

LEGACY BASIC AUTH

Older credentials use HTTP Basic Access Authentication, with the Public Key supplied as the username and the Private Key as the password. This scheme is deprecated but existing Basic Auth credentials continue to work. New credentials are bearer tokens.

Scopes

Each API credential carries a set of scopes that determine which resources it can access and whether it can read, write or both. A request that targets a resource the credential is not scoped for is rejected with a 403.

Scopes are expressed as <resource>:<action>, where action is read or write:

ResourceRead scopeWrite scope
Networksnetworks:readnetworks:write
Metricsmetrics:readmetrics:write
Employeesemployees:reademployees:write
Custom FieldscustomFields:readcustomFields:write
Survey Responsesresponses:readresponses:write
Surveyssurveys:readsurveys:write

Key points:

  • Read and write are independent. A credential with only a write scope can create/update/delete but cannot read, and a read-only credential cannot perform any mutating call. Holding read does not grant write and vice versa.
  • Method determines the action. Safe requests (GET) require the read scope; mutating requests (POST, PUT, PATCH, DELETE) require the write scope.
  • A Full API access credential is granted read and write across all of the resources above.
  • Embedding (embed:manage) is the scope for Embedding: it lets an organization credential provision managed users and create embedded sessions. Full API access credentials include it; a credential with custom scopes needs it selected.

If a call fails with a 403 and you expected it to succeed, check that the credential includes the required <resource>:<action> scope. You can view a credential's exact scopes via the View access details action on the API Credentials screen.

Compression

The Polinode API supports compression of HTTP body objects. NetworkJSON for large networks can be large and compressing the HTTP body using gzip for example can reduce the upload size by a factor of ~10x. To use compression please be sure to include the appropriate Content-Encoding header with your request, e.g. 'Content-Encoding': 'deflate'.

Base Route

The base route for the Polinode API is https://app.polinode.com/api/v2. It is to this route that you will add the routes detailed below. For example to GET a particular network you would use https://app.polinode.com/api/v2/networks/555194b407e3712f1beb966f where 555194b407e3712f1beb966f is the id of the network you are fetching.

Networks API

GET /networks

Retrieve all networks for the user.

Parameters:

None

Response on Success:

An array of all the user’s networks is returned with each element containing a network as per Format for Networks but excluding networkJSON.

GET /networks/:id

Retrieve a specific network.

URL Parameters:

NameTypeDescription
id*StringThe network id. Required.
*=required.

Response on Success:

See Format for Networks.

POST /networks

Create a new network.

Body Parameters:

See Format for Networks. Body parameters must include required keys and should not include internal keys.

In addition, organization-owned credentials accept an optional owner parameter:

NameLevelTypeDescription
owner1StringThe user who should own the created network, given as either their email address or their user id. Organization-owned credentials only; ignored for user-owned credentials.

Every network is owned by a user, and that owner's account is where the network appears in the web application. A user-owned credential always creates networks owned by the user the credential belongs to.

An organization-owned credential is not tied to a single person, so it decides the owner as follows:

  • If owner is supplied, it must name a member of the credential's own organization. Members outside the organization, unknown addresses, unverified or suspended accounts, and Access-only members cannot be named; all of these return a 400.
  • If owner is omitted, the network is owned by the user who created the credential.

If the credential's creator can no longer own networks — for example they have left the organization — a create without owner returns a 400 asking you to supply one.

The resolved owner's own plan limits apply. If they have already reached their maximum number of public or private networks the call returns a 403 naming that user, even though the request was made with an organization credential.

Response on Success:

See Format for Networks. Note that networkJSON is not included in the response.

PUT /networks/:id

Edit a previously created network.

URL Parameters:

NameTypeDescription
id*StringThe network id. Required.
*=required.

Body Parameters:

See Format for Networks. Body parameters must include required keys and should not include internal keys.

Response on Success:

See Format for Networks. Note that networkJSON is not included in the response.

DELETE /networks/:id

Delete a network.

URL Parameters:

NameTypeDescription
id*StringThe network id. Required.
*=required.

Response on Success:

200

Format for Networks

NameLevelTypeDescription
_idⁱ1StringThe network id.
billingⁱ1ObjectObject encapsulating billing settings for the network.
  maxViews2NumberThe maximum number of views that can be saved for the network.
createdⁱ1DateThe date that the network was created.
description1StringThe network description.
fileTypeⁱ1StringJSON or GEXF.
handpickedⁱ1BooleanWhether this network is handpicked or not, i.e. is it highlighted as a handpicked network under discover.
isDirected1BooleanWhether this network is directed or undirected.
modifiedⁱ1DateThe date that the network was last modified.
name*1StringName of the network.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
originalFileTypeⁱ1StringExcel, JSON or GEXF.
networkUUIDⁱ1StringA unique identifier for the network that changes when the network JSON is updated.
status1StringPublic or Private. Public networks are publicly available. Access to private networks is restricted. Defaults to Private if omitted.
*=required.

ⁱ=internal.

Format for Network JSON

The format of the actual network data is JSON and is detailed below.

Network JSON:

NameLevelTypeDescription
nodes*1Object[]An array of node objects for the network with properties as detailed below. Required.
  id*2String or NumberThe id of the node. Required for each node.
  attributes2Object[]An array of attribute objects for the node. Optional.
    [attribute name]3String or NumberFor each attribute included for the node a key / value pair where the key is the name of the attribute and the value is the value of the attribute. Github flavored markdown is supported for both [attribute name] and value. There are a few special cases to be aware of: (1) If [attribute name] is ‘name’ then that value will be used for the label of the node. If no name is specified then the id of the node will be used. (2) If the first character in [attribute name] is “_” then that attribute will be included and available to size by, color by, filter by, etc. but the attribute will be hidden in the right hand side window. Please ensure that numerical attributes are of type Number rather than String. If they are Strings they will be treated as categorical attributes. An attribute whose value is an empty string or null is treated as "no value" and is not stored, so an attribute is either present with a value or absent.
  x2NumberThe x coordinate of the node. Optional. If none is specified then nodes will be equally distributed on a circle to begin with.
  y2NumberThe y coordinate of the node. Optional. If none is specified then nodes will be equally distributed on a circle to begin with.
  image2ObjectObject encapsulating image settings for a node below. Optional.
    url3StringA url for an image to render inside the node. Defaults to no image. Many popular services for images such as LinkedIn and Twitter will automatically add an Access-Control-Allow-Origin header to their response. However, if you use images from a URL that does not add this header you will need to prepend a third-party proxy such as https://crossorigin.me to the URL. For example, you may enter something like: https://crossorigin.me/http://url.com/imageName.jpg. Alternatively, you can upload images to a CDN such as Cloudfront and use the URLs from that CDN, being sure to enable CORS for polinode.com at a minimum.
edges1Object[]An array of edge objects for the network with properties as detailed below.
  id*2String or NumberThe id of the edge. Required for each edge.
  source*2String or NumberThe id of the node where the edge starts from. If the network is undirected then source and target are interchangeable. Required for each edge.
  target*2String or NumberThe id of the node where the edge ends. If the network is undirected then source and target are interchangeable. Required for each edge.
  attributes2Object[]An array of attribute objects for the edge. Optional.
    [attribute name]3String or NumberFor each attribute included for the edge a key / value pair where the key is the name of the attribute and the value is the value of the attribute. Github flavored markdown is supported for both [attribute name] and value. There is one special case to be aware of: If the first character in [attribute name] is “_” then that attribute will be included and available to size by, color by, filter by, etc. but the attribute will be hidden in the right hand side window Please ensure that numerical attributes are of type Number rather than String. If they are Strings they will be treated as categorical attributes. An attribute whose value is an empty string or null is treated as "no value" and is not stored, so an attribute is either present with a value or absent.
*=required.

Network JSON Example:

{
    'nodes':[
      {
        'id': 'Joe',
        'attributes':
        {
          'Example Numerical Attribute Name': 24,
          'Example Categorical Attribute Name': "Value 1",
          'Name': 'Joe'
        }
      },
      {
        'id':'Mary',
        'attributes':
        {
          'Example Numerical Attribute Name':38,
          'Example Categorical Attribute Name':"Value 1",
          'Name':'Mary'
        }
      },
      {
        'id':'Bill',
        'attributes':
        {
          'Example Numerical Attribute Name':65,
          'Example Categorical Attribute Name':"Value 2",
          'Name':'Bill'
        }
      },
      {
        'id':'Grant',
        'attributes':
        {
          'Example Numerical Attribute Name':52,
          'Example Categorical Attribute Name':"Value 2",
          'Name':'Grant'
        }
      }
    ],
    'edges':[
      {
        'id':0,
        'source':'Joe',
        'target':'Mary',
        'attributes':
        {
          'Example Numerical Attribute Name':30,
          'Example Categorical Attribute Name':"Value 1"
        }
      },
      {
        'id':1,
        'source':'Grant',
        'target':'Mary',
        'attributes':
        {
          'Example Numerical Attribute Name':34,
          'Example Categorical Attribute Name':"Value 1"
        }
      },
      {
        'id':2,
        'source':'Bill',
        'target':'Joe',
        'attributes':
        {
          'Example Numerical Attribute Name':38,
          'Example Categorical Attribute Name':"Value 2"
        }
      }
    ]
  };

Metrics API

ENTERPRISE USERS

The Metrics API is only available to Enterprise and Partner accounts.

Compute time for all metrics is limited to 60 seconds for each call.

Network Metrics

POST /metrics/network/modularity

Modularity is a measure of the degree to which a network is divided or separated into non-overlapping groups or communities. Whereas the Communities metric finds communities that optimises modularity, the modularity metric takes communities as an input and outputs modularity. It is a value between -1 and 1. Directed networks will be converted into undirected networks. Read more here.

Body Parameters:

NameLevelTypeDescription
attribute**1StringThe node attribute that contains the communities to measure modularity with respect to.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

**=required

Response on Success:

A single number is returned regardless of whether networkId or networkJSON is provided.

POST /metrics/network/diameter

Diameter measures the length of the longest shortest path across the network. Only the largest connected component is considered (if applicable). Directed networks are converted to undirected networks when calculating diameter. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

A single number is returned regardless of whether networkId or networkJSON is provided.

POST /metrics/network/avgShortestPathLength

The average shortest path length of a network is the average of all shortest paths between all pairs of nodes in the network. Where two nodes cannot reach each other that path is excluded. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

A single number is returned regardless of whether networkId or networkJSON is provided.

Node Metrics

POST /metrics/nodes/averageNeighborDegree

Average Neighbor Degree for a node is the average number of edges (i.e. degree) that a node's neighbors have. For directed networks, you can specify whether to use in-degree or out-degree for each of the source and target nodes in the calculation. Read more here.

Body Parameters:

NameLevelTypeDescription
averageNeighborDegreeSource1StringFor directed networks, either 'in' or 'out'. Defaults to 'out'.
averageNeighborDegreeTarget1StringFor directed networks, either 'in' or 'out'. Defaults to 'out'.
directed1BooleanIf True then the network is a directed network. If False then the network is an undirected network. Defaults to True.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/antiCommunities

Anti-Communities are the mirror image of communities: groups chosen so that connections WITHIN a group are as rare as possible and connections BETWEEN groups as common as possible. They are useful for finding sets of people who are each well connected across the organisation but barely connected to one another. The attribute "Anti-Community" is added to each node. The network is treated as undirected, self-loops are ignored and edge weights are not used.

Body Parameters:

NameLevelTypeDescription
antiCommunityGroupCount1NumberThe number of groups to partition the network into, at least 2. Clamped to the number of nodes. Defaults to 10.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/betweennessCentrality

Betweenness Centrality for a node is the total number of shortest paths that pass through that node divided by the total number of shortest paths in the network. It is a measure of how much a node is a 'bridge' between other nodes in the network. Read more here.

Body Parameters:

NameLevelTypeDescription
directed1BooleanIf True then the network is a directed network. If False then the network is an undirected network. Defaults to True.
kPercent1NumberThe percentage of nodes to sample (between 0 and 100). Other than for very large networks where betweenness cannot be calculated within 60 seconds, kPercent should be left at 100. Defaults to 100.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/brokerage

Brokerage here refers to Gould-Fernandez brokerage. Given an attribute, there are five kinds of brokerage possible: Coordinator, Consultant, Gatekeeper, Representative and Liaison. This metric will count up and return the number of times that a node acted in each of those roles. Read more here.

Body Parameters:

NameLevelTypeDescription
partition1ObjectA mapping of nodes by node id to a group that will be used to calculate brokerage. Every node must be mapped to a group, i.e. each node id must be included.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/closenessCentrality

Closeness Centrality for a node is the reciprocal of its farness. The farness of a node is the sum of its shortest path distances from all other nodes. The greater a node's Closeness Centrality relative to other nodes, the closer it is on average to other nodes in the network. Read more here.

Body Parameters:

NameLevelTypeDescription
directed1BooleanIf True then the network is a directed network. If False then the network is an undirected network. Defaults to True.
kPercent1NumberThe percentage of nodes to sample (between 0 and 100). Other than for very large networks where closeness cannot be calculated within 60 seconds, kPercent should be left at 100. If kPercent is less than 100 then closeness will only be calculated for the giant component (i.e. largest connected component in the network). Defaults to 100.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/constraint

Constraint is related to the concept of structural holes and measures the extent to which a node is able to take advantage of structural holes in their network. Constraint will be higher if a node's connections are highly connected between each other, either directly or indirectly through a mutual connection. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/clustering

The Clustering coefficient for a node is the fraction of possible triangles through that node that actually exist. The higher a node's clustering coefficient, the more embedded it is in the overall network. Read more here.

Body Parameters:

NameLevelTypeDescription
directed1BooleanIf True then the network is a directed network. If False then the network is an undirected network. Defaults to True.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/communities

Louvain Communities are non-overlapping groups of relatively closely connected nodes found by an optimization algorithm. Directed networks will be converted into undirected networks for the purposes of calculating this metric. Read more here.

Body Parameters:

NameLevelTypeDescription
allLevels1BooleanThe algorithm successively finds groups / communities and aggregates them. If allLevels is set to True then all the levels in this process will be outputted. If False then just the final level (with the least number of communities) will be outputted. Defaults to False. The algorithm is considerably faster if allLevels is either not set or set to False.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
resolution1NumberA parameter that can be used to control how many communities are outputted. Modularity is optimized (heuristically) with resolution set to to 1. A resolution of 0 will place all nodes into a single community whereas of a resolution of two times the number of nodes will result in each node being assigned it's own community. Defaults to 1.
maxSize1NumberAn optional maximum size for the resulting communities. By default there is no maximum size. Including a maximum size will mean that the algorithm will run considerably slower.

*One and only one of these two parameters must be provided.

POST /metrics/nodes/complexCentrality

Complex Centrality measures how well placed a node is to spread a complex contagion - a behaviour or norm that people only adopt once several of the people around them have already adopted it, as opposed to a piece of news that passes on from a single contact. Two attributes are added to each node: "Complex Centrality", the average distance the contagion travelled from that node, and "Complex Centrality - Reach", the number of nodes that ended up adopting. The network is treated as undirected and edge weights are ignored. Read more here.

Body Parameters:

NameLevelTypeDescription
complexCentralityThreshold1NumberThe tipping point at which a node adopts. With an absolute threshold this is a whole number of adopting neighbours (defaults to 3); with a fractional threshold it is a proportion of the node's neighbours, greater than 0 and at most 1.
complexCentralityThresholdType1StringEither 'absolute' or 'fractional'. Defaults to 'absolute'.
normalized1BooleanIf True then Complex Centrality is rescaled to a 0 to 1 range across the network. Defaults to False.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/connectedComponents

A Connected Component is a set of nodes that are connected to each other. A directed network will be treated as an undirected network for the calculation of Connected Components. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/coreNumber

Returns the core number for each node. The core number for a node is the largest value k of all k-cores containing that node where a k-core is the largest possible subgraph in the network containing nodes with a Total Degree of k or more. Core Numbers can be helpful in the decomposition of large networks. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/corePeriphery

Core Periphery will partition the network into a group of nodes that are said to be in the "Core" and a set of nodes said to be in the "Periphery". There are two options for type - Single and Multiple. If Single is chosen then the network will be partioned into a single core / periphery using the approach of Rombach et al. (2017). This algorithm takes two inputs - alpha and beta. Alpha is a value between 0 and 1 that determines the fuziness of the core / periphery boundary. If alpha is set to 0 the boundary is the fuzziest and if it's set to 1 the boundary is the sharpest. Beta, also between 0 and 1, is the fraction of nodes to be used for the periphery. If Multiple is selected for type then the algorithm detailed in Kojaku and Masuda (2018) is used. There are no input parameters for this algorithm but please note that the configuration model is used. The output of the algorithm is two attributes that are added to all nodes - Core Periphery and Coreness. For the Single algorithm Core Periphery is always "Core 1" and Coreness is a value between 0 and 1 with values closer to 0 indicating a more peripheral node. For the Multiple algorithm there may be multiple cores, named "Core 1", "Core 2" and so on by the Core Periphery attribute, and Coreness is a discrete value that is either 0 (periphery) or 1 (core) for the core that the node is a member of. Note that the Multiple algorithm can find a large number of small cores in a network that has no real core-periphery structure, so it is worth checking how many it produced before reading anything into them. The network is treated as undirected and edge weights are ignored. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
type1StringEither single or multiple. Defaults to single. Determines the type of algorithm that will be used for core / periphery detection, one that assumes a single core or one that allows for multiple potential cores.
alpha1NumberIf type is set to single then this alpha parameter will determine the sharpness of the separation between core and periphery. Defaults to 0.5.
beta1NumberIf type is set to single then this beta parameter will determine the proportion of peripheral nodes. Defaults to 0.8.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/currentFlowClosenessCentrality

Current Flow Closeness Centrality is similar to regular Closeness Centrality but instead of a shortest path measure for distance, effective resistance inspired by electric circuit models is used. Directed networks will be converted to undirected networks. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/effectiveSize

Effective Size is related to the concept of structural holes and the redundancy of connections. It measures the number of people that the node is connected to but controlling for (i.e. reducing by) the redundancy of those connections. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/efficiency

Efficiency is equal to effective size divided by total degree. If a node has no redundant ties then the effective size will be equal to total degree and efficiency will be equal to one. Efficiency is the proportion of a node's ties that are non-redundant. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/eigenvectorCentrality

Eigenvector Centrality is motivated by the idea that nodes connected to other nodes that are central should themselves be relatively central, i.e. being connected to a central node contributes more than being connected to a non-central node. It is not always well defined for directed networks and it's generally preferable to calculate Katz Centrality for directed networks. However, should you calculate eigenvector centrality for a directed network Polinode will return "left" eigenvector centrality (i.e. corresponding to the in-edges). Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/externalVsInternal

External vs Internal (EI) calculates, for a given attribute, the percentage of a node's edges that connect to nodes that do not share the same value for that attribute (external connections) vs connections to nodes that do share the same attribute value (internal connections). If type is Total the metric will be calculated for all edges, if type is In then the metric will be calculated only for a node's incoming edges and if type is Out then only for a node's outgoing edges.

Body Parameters:

NameLevelTypeDescription
attribute1StringThe attribute that external vs internal is calculated with respect to.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
type1StringHow to calculate the metric - 'total', 'in' or 'out'. Defaults to 'total.'

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/harmonicCentrality

Harmonic Centrality for a node is the sum of the reciprocals of the shortest path distances from that node to each other node in the network. It is closely related to Closeness Centrality with the key difference being that the reciprocal is taken for each distance rather than taking the reciprocal of the sums of the distances. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/HITS

Hyperlink-Induced Topic Search (HITS) for a node gives two metrics - Hubs and Authorities. A node has a relatively high Hubs score if it links to other nodes and a relatively high Authority score if it is linked to by other nodes. Read more here.

Body Parameters:

NameLevelTypeDescription
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/identifyInfluencers

Identify Influencers is a heuristic that finds the most influential nodes in the network in the sense that together the count of those nodes and the nodes connected to those nodes (in either direction for directed networks) is maximised, i.e. coverage of the network is maximised.

Body Parameters:

NameLevelTypeDescription
direction1StringOne of 'total', 'in' or 'out'. Defaults to 'total'.
identifyInfluencersAttribute1StringAn optional name of an attribute that the algorithm will limit the identification of influencers with respect to.
identifyInfluencersAttributeValues1ArrayAn optional array of attribute values for the identifyInfluencersAttribute that the algorithm will limit the identification of influencers to, i.e. influencers must have one of these values for the identified attribute
identifyInfluencersMethod1StringThe method to use, either 'coverage' or 'count'. Defaults to 'coverage'.
influencersCount1NumberIf the method is 'count', the total number of influencers to target.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
targetCoveragePercent1NumberIf the method is 'coverage', the percentage coverage to target (between 0 and 100). Defaults to 90.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/inDegree

In Degree for a node is a straightforward measure of centrality - it measures the total number of nodes linking to that node. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
type1StringEither 'sum' or 'average'. If metricEdgeWeights is True or a string then type determines how those edge weights will be used, either summed or averaged.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/informalAlignment

Informal Alignment compares the people a node actually works with against the part of the organisation chart they sit in, and scores how far the two agree. Both structures are read from the one network: an edge attribute and the values of it that mark a formal connection, and an edge attribute and the values of it that mark an informal one. The attribute "Informal Alignment" is added to each node, ranging from 0 (the node's informal connections fall entirely outside its formal neighbourhood) to 1 (they fall entirely within it). Nodes with no informal connections are not scored. Both structures are treated as undirected and edge weights are ignored. This endpoint is available to organization accounts only.

Body Parameters:

NameLevelTypeDescription
fiFormalAttribute1StringThe name of an EDGE attribute whose values mark the formal structure, e.g. a 'Type' attribute where a value of 'Reports To' marks a reporting line.
fiFormalValues1ArrayThe values of fiFormalAttribute that mark a formal connection. At least one is required.
fiInformalAttribute1StringThe name of an EDGE attribute whose values mark the informal structure. May be the same attribute as fiFormalAttribute.
fiInformalValues1ArrayThe values of fiInformalAttribute that mark an informal connection. At least one is required.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/informalDistance

Informal Distance measures how far across the organisation chart a node's actual working relationships reach. For every informal connection it takes the distance between its two ends through the formal structure, and a node's score is the average over its own informal connections. Both structures are read from the one network, exactly as for Informal Alignment. Two attributes are added to each node: "Informal Distance" and "Informal Distance - Ranked", the latter being a 0 to 1 rank in which the shortest distances rank highest. Connections with no formal path between their ends are ignored, and a node with no scored connection is not scored. Both structures are treated as undirected and edge weights are ignored. This endpoint is available to organization accounts only.

Body Parameters:

NameLevelTypeDescription
fiFormalAttribute1StringThe name of an EDGE attribute whose values mark the formal structure, e.g. a 'Type' attribute where a value of 'Reports To' marks a reporting line.
fiFormalValues1ArrayThe values of fiFormalAttribute that mark a formal connection. At least one is required.
fiInformalAttribute1StringThe name of an EDGE attribute whose values mark the informal structure. May be the same attribute as fiFormalAttribute.
fiInformalValues1ArrayThe values of fiInformalAttribute that mark an informal connection. At least one is required.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/kCliqueCommunities

A K Clique Community is the union of all cliques of size k that can be reached through adjacent k-cliques where a k-clique is a group of k nodes that are all connected to each other and a k-clique is said to be adjacent to another k-clique if it shares k-1 nodes with it. Communities produced by this algorithm are generally not distinct and will overlap so an attribute is added for each community found. Directed networks will be converted to undirected networks for the puroses of calculating this metric. Read more here.

Body Parameters:

NameLevelTypeDescription
kCliqueCommunities1NumberThe clique size, k. Defaults to 2.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/katzCentrality

Katz Centrality for a node takes into account not just the neighbors of that node but also their neighbors and so on, applying an attenuation factor of alpha so that the influence of nodes declines on every step away from the target node. Read more here.

Body Parameters:

NameLevelTypeDescription
katzCentralityAlpha1NumberAttenuation factor. Defaults to 0.1.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/loadCentrality

Load Centrality for a node is the total amount of some commodity passing through that node when one unit of the commodity is sent from each node in the network to each other node in the network and the commodity is split equally at branching points and aggregated at meeting points.. Load Centrality is very similar to Betweenness Centrality and also measures 'bridging'. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/outDegree

Out Degree for a node is a straightforward measure of centrality - it measures the total number of nodes that that node links to. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
type1StringEither 'sum' or 'average'. If metricEdgeWeights is True or a string then type determines how those edge weights will be used, either summed or averaged.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/pagerank

Pagerank for a node is a ranking of relative importance in the network based on the structure of incoming edges for that node. It was originally designed to rank web pages. Similar to Katz Centrality, alpha is an attenuation factor. Pagerank for undirected networks will be calculated by transforming each undirected edge into two directed edges. Read more here.

Body Parameters:

NameLevelTypeDescription
pagerankAlpha1NumberAttenuation factor. Defaults to 0.85.
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

POST /metrics/nodes/totalDegree

Total Degree for a node is a straightforward measure of centrality. It is simply the total number of edges that that node has, i.e. for directed networks it is the sum of In Degree and Out Degree. Read more here.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
type1StringEither 'sum' or 'average'. If metricEdgeWeights is True or a string then type determines how those edge weights will be used, either summed or averaged.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

Edge Metrics

POST /metrics/edges/edgeBetweennessCentrality

Edge betweenness is a measure of the total number of shortest path in the network that pass through an edge relative to the total number of shortest paths in the network overall.

Body Parameters:

NameLevelTypeDescription
metricEdgeWeights1String or BooleanIf True then the weight value on edges will be used, if a string is provided then that edge attribute will be used as the edge weight.
networkId*1StringThe Id of the network on which to run the metric. If provided, the network will be retrieved and the metric run. The resulting metric values will then be saved as an attribute on each node in the network, i.e. the networkJSON for that network will be updated.
networkJSON*1ObjectA JSON object containing the network data. See Format for Network JSON.
normalized1BooleanIf True then the metric will be normalized. Defaults to True.

*One and only one of these two parameters must be provided.

Response on Success:

If networkJSON is provided directly then the metric is returned as a response. If a networkID is provided then the result is saved directly on the associated networkJSON and a response of 200 is returned.

Responses API

ENTERPRISE USERS

The Responses API is only available to Enterprise and Partner accounts.

GET /responses/:id

Retrieve a specific response.

URL Parameters:

NameTypeDescription
id*StringThe response id. Required. This may be obtained in real-time via the Webhook on Completion or by downloading the full Respondent List.
*=required.

Response on Success:

Please contact us for details on the format of responses.

For surveys with multiple languages enabled, the response carries a language field: the BCP 47 tag of the language the response was answered in (for example es or pt-BR), whether the respondent chose it from the language menu, it was passed in the link as ?lang=, or it was matched from the respondent's browser. It is an empty string for responses recorded before the survey used multiple languages. The same value is sent as language in the Webhook on Completion body, alongside responseUUID, and appears as the Response Language column in the respondent-list download and node attribute in generated networks.

Surveys API

ENTERPRISE USERS

The Surveys API is only available to Enterprise and Partner accounts.

POST /surveys/export/:id

Initiates an export of survey data, i.e. a combination of lists and responses. Please note that this starts a worker job that may take ~10 minutes to complete for larger surveys. This route should not be called more than once per day per survey.

URL Parameters:

NameTypeDescription
id*StringThe survey id. Required.
*=required.

Response on Success:

Will return the survey object on success (please contact support for details if needed). If the survey is already generating (i.e. export is in progress) then it will return an HTTP 200 OK success status response code.

GET /surveys/export/:id

Once the worker job is completed, this route will return a URL that can be used to retrieve the survey export (i.e. combined lists and responses). It will return {generatingSurveyJSON: true} if the survey is still generating. The returned URL is valid for 5 minutes.

URL Parameters:

NameTypeDescription
id*StringThe survey id. Required.
*=required.

Response on Success:

If the survey generation is complete it will return a URL to retrieve the export in the format {AWSURL: valueOfURL}. The returned URL is valid for 5 minutes. The route will return {generatingSurveyJSON: true} if the survey is still generating.

Employees API

ENTERPRISE USERS

The Employees API is only available to Enterprise and Partner accounts. Only organization Owners and Admins can access these endpoints.

The Employees API enables you to programmatically create, retrieve, update and delete employee records within your organization. Employee records use a rich nested schema with support for employment details, compensation, performance data, skills and more. You can also define custom fields on your organization and use them on employee records — see the Custom Fields API for details.

GET /employees

Retrieve all employees for the organization.

Query Parameters:

NameTypeDescription
limitNumberMaximum number of employees to return. Defaults to 100. Maximum is 1000.
offsetNumberNumber of employees to skip for pagination. Defaults to 0.
departmentStringFilter employees by department name.
employment.statusStringFilter by employment status. One of: active, inactive, terminated, on-leave, pending-start.

Response on Success:

A paginated response containing an array of employees and pagination metadata:

{
  "data": [ /* array of employee objects */ ],
  "total": 150,
  "limit": 100,
  "offset": 0
}

Each employee in the array follows the Format for Employees.

GET /employees/:id

Retrieve a specific employee.

URL Parameters:

NameTypeDescription
id*StringThe employee id. Required.
*=required.

Response on Success:

See Format for Employees.

POST /employees

Create a new employee.

Body Parameters:

See Format for Employees. Body parameters must include required keys and should not include internal keys. If customFields are provided, each key is validated against the organization's Custom Field Definitions — unknown, archived, type-mismatched or missing required custom fields will return a 400 error.

Response on Success:

  1. See Format for Employees.

PUT /employees/:id

Replace an existing employee record. This is a full replacement — all fields not included in the request body will be removed.

URL Parameters:

NameTypeDescription
id*StringThe employee id. Required.
*=required.

Body Parameters:

See Format for Employees. Body parameters must include required keys and should not include internal keys. Custom fields are validated against the organization's definitions.

Response on Success:

See Format for Employees.

PATCH /employees/:id

Partially update an existing employee record. Only the fields provided in the request body will be updated. For customFields, the provided values are merged with existing values — existing custom field values not included in the request are preserved.

URL Parameters:

NameTypeDescription
id*StringThe employee id. Required.
*=required.

Body Parameters:

Any subset of fields from Format for Employees. Custom fields are validated against the organization's definitions after merging with existing values.

Response on Success:

See Format for Employees.

DELETE /employees/:id

Delete an employee.

URL Parameters:

NameTypeDescription
id*StringThe employee id. Required.
*=required.

Response on Success:

204

Format for Employees

NameLevelTypeDescription
_idⁱ1StringInternal record identifier. Returned in responses and used as the id URL path parameter; never sent in request bodies.
employeeId1StringAn external or legacy employee identifier.
email*1StringWork email address. Must be unique within the organization. Stored as lowercase.
personalEmail1StringPersonal email address.
firstName1StringFirst name.
lastName1StringLast name.
middleName1StringMiddle name.
preferredName1StringPreferred name.
displayName1StringDisplay name (used as the node label in generated networks).
username1StringUsername.
dateOfBirth1DateDate of birth in ISO 8601 format.
gender1StringOne of: male, female, non-binary, prefer-not-to-say, other.
timezone1StringIANA timezone identifier (e.g. "America/New_York").
pronouns1StringPronouns.
ethnicity1StringEthnicity.
race1StringRace.
nationality1StringNationality.
citizenship1StringCitizenship.
disabilityStatus1StringOne of: yes, no, prefer-not-to-say, undisclosed.
veteranStatus1StringOne of: protected-veteran, not-a-veteran, prefer-not-to-say, undisclosed.
maritalStatus1StringOne of: single, married, partnered, divorced, widowed, separated, prefer-not-to-say.
educationLevel1StringOne of: none, primary, secondary, vocational, bachelors, masters, doctorate, other.
educationField1StringField of study.
avatar1StringAvatar image URL.
address1ObjectEmployee's address.
  street12StringStreet address line 1.
  street22StringStreet address line 2.
  city2StringCity.
  state2StringState or province.
  postalCode2StringPostal or zip code.
  country2StringCountry.
employment1ObjectEmployment details.
  status2StringEmployment status. One of: active, inactive, terminated, on-leave, pending-start.
  type2StringEmployment type (working-time arrangement). One of: full-time, part-time, contractor, intern, temporary.
  workerType2StringWorker type. One of: employee, contingent-worker.
  workerSubtype2StringWorker subtype (e.g. "Regular", "Fixed Term", "Intern" — values vary by organization).
  classification2StringOne of: exempt, non-exempt, contractor.
  fte2NumberFull-time equivalent (e.g. 1.0 for full-time, 0.5 for half-time).
  contractType2StringOne of: permanent, temporary, fixed-term, non-guaranteed-hours.
  originalHireDate2DateOriginal hire date in ISO 8601 format.
  lastHireDate2DateMost recent hire date (for rehires).
  startDate2DateStart date.
  currentRoleStartDate2DateStart date of current role.
  currentGradeStartDate2DateStart date of current grade.
  terminationDate2DateTermination date.
  terminationReason2StringReason for termination.
  jobTitle2StringJob title, from the job profile.
  businessTitle2StringBusiness title — a worker-level title that can differ from the job profile's job title.
  jobCode2StringJob profile code. A string, so alphanumeric codes are supported.
  jobLevel2StringJob level or band.
  jobFamilyGroup2StringJob family group (the grouping above job family).
  jobFamily2StringJob family or function.
  workSchedule2ObjectWork schedule details.
    hoursPerWeek3NumberHours per week.
    workDays3String[]Array of working days (e.g. ["Monday", "Tuesday"]).
    isRemote3BooleanWhether the employee works remotely.
    hybridSchedule3StringDescription of hybrid work arrangement.
  eligibilityStatus2StringOne of: verified, pending, not-verified.
  workAuthorizationStatus2StringWork authorization status.
  visa2ObjectVisa information.
    type3StringVisa type (e.g. "H1B", "O1").
    expirationDate3DateVisa expiration date.
    sponsorshipRequired3BooleanWhether sponsorship is required.
department1StringDepartment.
division1StringDivision.
team1StringTeam.
costCenter1ObjectCost center.
  id2StringCost center code.
  name2StringCost center name.
companyName1StringCompany or subsidiary name.
location1ObjectWork location.
  id2StringLocation identifier.
  name2StringLocation name (e.g. "Sydney Office").
  address2ObjectLocation address (same structure as employee address).
  isRemote2BooleanWhether this is a remote location.
orgLevels1Object[]Array of organizational hierarchy levels.
  level2NumberHierarchy level number.
  name2StringLevel name.
  code2StringLevel code.
groups1String[]Array of group memberships.
manager1ObjectManager reference.
  id2StringThe employee id of the manager.
compensation1ObjectCompensation details.
  baseSalary2NumberBase salary amount.
  currency2StringCurrency code (e.g. "USD", "AUD").
  payFrequency2StringOne of: hourly, weekly, bi-weekly, monthly, annually.
  hourlyRate2NumberHourly rate.
  bonusTarget2NumberBonus target amount.
  bonusTargetPercentage2NumberBonus target as a percentage.
  commissionTarget2NumberCommission target amount.
  commissionRate2NumberCommission rate.
  totalCashCompensation2NumberTotal cash compensation.
  equityGrants2Object[]Array of equity grants.
    grantType3StringOne of: stock-option, rsu, espp, phantom, other.
    grantDate3DateGrant date.
    vestingStartDate3DateVesting start date.
    vestingSchedule3StringVesting schedule description.
    vestingEndDate3DateVesting end date.
    totalShares3NumberTotal shares granted.
    vestedShares3NumberShares vested.
    unvestedShares3NumberShares not yet vested.
    grantValue3NumberValue at grant.
    currentValue3NumberCurrent value.
    exercisePrice3NumberExercise or strike price.
    currency3StringCurrency code.
  benefitsEnrollment2String[]Array of benefits enrolled in.
  payGrade2StringPay grade.
  salaryRange2ObjectSalary range for the pay grade.
    min3NumberMinimum salary.
    max3NumberMaximum salary.
    midpoint3NumberMidpoint salary.
  payChangeReason2StringReason for last pay change.
  lastReviewDate2DateDate of last compensation review.
  nextReviewDate2DateDate of next compensation review.
performance1ObjectPerformance data.
  rating2StringPerformance rating label.
  ratingNumeric2NumberPerformance rating as a number.
  reviewCycle2StringReview cycle name (e.g. "2025 Annual").
  reviewDate2DateDate of review.
  nextReviewDate2DateDate of next review.
  potentialRating2StringPotential rating label.
  potentialRatingNumeric2NumberPotential rating as a number.
  isHighPotential2BooleanWhether employee is flagged as high potential.
  isHighPerformer2BooleanWhether employee is flagged as high performer.
  goalAttainment2NumberGoal attainment percentage.
  goalsSet2NumberNumber of goals set.
  goalsCompleted2NumberNumber of goals completed.
  competencyScores2Object[]Array of competency assessments.
    competencyName3StringName of the competency.
    score3NumberScore achieved.
    rating3StringRating label.
    assessmentDate3DateDate of assessment.
skills1Object[]Array of skills.
  name2StringSkill name.
  category2StringSkill category.
  proficiencyLevel2StringProficiency level (e.g. "beginner", "intermediate", "advanced").
  proficiencyNumeric2NumberProficiency as a number.
  yearsOfExperience2NumberYears of experience with this skill.
  source2StringOne of: self-reported, manager-assessed, system-inferred, certification.
  lastAssessedDate2DateDate of last assessment.
certifications1Object[]Array of certifications.
  name2StringCertification name.
  issuingOrganization2StringIssuing organization.
  issueDate2DateDate issued.
  expirationDate2DateExpiration date.
  credentialId2StringCredential identifier.
  status2StringOne of: active, expired, pending-renewal.
languages1Object[]Array of language proficiencies.
  language2StringLanguage name.
  proficiency2StringOne of: basic, conversational, professional, native-or-bilingual.
  isPreferred2BooleanWhether this is the employee's preferred language.
trainingHoursYTD1NumberTraining hours completed this year.
trainingHoursLastYear1NumberTraining hours completed last year.
mandatoryTrainingComplete1BooleanWhether mandatory training is complete.
developmentPlanStatus1StringOne of: none, draft, active, completed.
leaveBalances1Object[]Array of leave balances.
  leaveType2StringType of leave (e.g. "annual", "sick").
  entitled2NumberLeave entitled.
  taken2NumberLeave taken.
  remaining2NumberLeave remaining.
  unit2StringOne of: days, hours.
successionNominations1Object[]Array of succession planning nominations.
  targetId2StringThe employee id of the target role holder.
  targetJobTitle2StringTitle of the target role.
  readiness2StringOne of: ready-now, ready-in-1-year, ready-in-2-plus-years, not-ready.
  nominatedDate2DateDate of nomination.
isCriticalRole1BooleanWhether the employee holds a critical role.
flightRisk1StringOne of: low, medium, high.
retentionPriority1StringOne of: low, medium, high.
isManager1BooleanWhether the employee is a manager.
isIndividualContributor1BooleanWhether the employee is an individual contributor.
hiringSource1StringWhere the employee was sourced (e.g. "referral", "job board").
hiringSourceDetail1StringAdditional detail about the hiring source.
referredBy1StringName or id of the referrer.
applicationDate1DateApplication date.
offerDate1DateOffer date.
timeToHire1NumberDays from application to hire.
timeToFill1NumberDays from requisition to hire.
interviewScore1NumberInterview score or rating.
hiringManagerRating1NumberHiring manager rating.
events1Object[]Array of employee lifecycle events.
  eventType2StringOne of: hire, rehire, termination, promotion, compensation-payout, leave-start, leave-end, other.
  eventDate2DateDate of the event.
  effectiveDate2DateEffective date of the event.
  reason2StringReason for the event.
  payoutAmount2NumberPayout amount (for compensation-payout events).
  payoutCurrency2StringCurrency of the payout.
  payoutType2StringOne of: bonus, commission, equity, signing, retention, other.
  details2ObjectAdditional event-specific details.
customFields1ObjectCustom field values as key-value pairs. Keys must match defined Custom Field Definitions for the organization. Values are validated against the field type (string, number, boolean, date or enum).
lastUpdatedⁱ1DateTimestamp of last update.
*=required.

ⁱ=internal.

Custom Fields API

ENTERPRISE USERS

The Custom Fields API is only available to Enterprise and Partner accounts. Only organization Owners and Admins can access these endpoints.

The Custom Fields API enables you to define custom field schemas on your organization. These definitions control which custom fields can be set on employee records via the Employees API. Each definition specifies a key, display label, data type and optional constraints such as allowed enum values and whether the field is required.

GET /custom-fields

Retrieve all custom field definitions for the organization. By default, archived definitions are excluded.

Query Parameters:

NameTypeDescription
includeArchivedBooleanIf set to true, includes archived definitions in results. Defaults to false.

Response on Success:

An array of custom field definitions. See Format for Custom Field Definitions.

POST /custom-fields

Create a new custom field definition.

Body Parameters:

See Format for Custom Field Definitions. The key must start with a letter and contain only letters, numbers and underscores. The key must be unique within the organization — a 409 error is returned if a definition with the same key already exists. If the type is "enum", the enumValues array is required and must not be empty.

Response on Success:

  1. See Format for Custom Field Definitions.

PATCH /custom-fields/:key

Update an existing custom field definition. The key and type fields are immutable and cannot be changed — a 400 error is returned if an update to either is attempted.

URL Parameters:

NameTypeDescription
key*StringThe custom field key identifier. Required.
*=required.

Body Parameters:

Any subset of mutable fields from Format for Custom Field Definitions: label, description, category, required, enumValues (for enum type fields) and archived.

Response on Success:

See Format for Custom Field Definitions.

DELETE /custom-fields/:key

Archive a custom field definition (soft delete). The definition remains in the database but archived definitions cannot be used for new employee custom field values. Existing values on employees are not affected.

URL Parameters:

NameTypeDescription
key*StringThe custom field key identifier. Required.
*=required.

Response on Success:

204

Format for Custom Field Definitions

NameLevelTypeDescription
key*1StringUnique identifier for the field. Must start with a letter and contain only letters, numbers and underscores. Immutable.
label*1StringDisplay label for the field.
type*1StringData type. One of: string, number, boolean, date, enum. Immutable.
enumValues1String[]Allowed values when type is "enum". Required if type is "enum".
required1BooleanWhether employees must provide a value for this field. Defaults to false.
description1StringDescription or help text for the field.
category1StringCategory for grouping fields in the UI.
archivedⁱ1BooleanWhether the definition is archived (soft-deleted). Defaults to false.
archivedAtⁱ1DateTimestamp of when the definition was archived.
*=required.

ⁱ=internal.

Prev
FAQ
Next
Embedding