Memberships

Working with memberships:

Membership objects are used for managing access to different resources in Productive. Currently it is used to manage access to projects, docs, dashboards, task views and deals.

Resources accessible via memberships

Depending on the resource you are giving access for, different attribute is required. Here is a list of resources that can be used with memberships and their required attributes:

Resource Required attributes
Project project_id
Doc page_id
Dashboard dashboard_id
Task view filter_id
Deal deal_id
Pulse pulse_id

Membership types

There are three types of membership:

  • type_id: 1, person -> gives access to a specific person
  • type_id: 2, dynamic_group -> gives access to a system predefined group of people
  • type_id: 3, team -> gives access to a team

When working with memberships, depending on the type of membership, different attributes should be sent. For person membership, you need to provide person_id, for dynamic group membership, you need to provide dynamic_group_id, and for team membership, you need to provide team_id.

Dynamic groups

Dynamic groups are predefined groups of people that are created based on the person role and person assignment. There are five types of dynamic groups:

  • dynamic_group_id: 2 - employees -> all employees in the organization
  • dynamic_group_id: 6 - project_members -> all members of a resource's project
  • dynamic_group_id: 8 - project_manager -> project manager of a resource's project
  • dynamic_group_id: 9 - deal_owner -> owner of a deal
  • dynamic_group_id: 10 - users_that_can_manage_project -> all users who are members of a resource's project and have the Add, edit, and delete projects permission

When creating a membership for a dynamic group, you need to provide dynamic_group_id.
Depending on the target resource you are giving access to, different dynamic groups are available, dynamic_group_id available for:

  • Project membership: 2
  • Doc membership
    • if Doc is on a project: 2, 6, 8
    • if Doc is not on a project: 2
  • Dashboard membership
    • if Dashboard is on a project: 2, 6, 8, 10
    • if Dashboard is not on a project: 2
  • Deal membership: 2, 6, 8, 9
  • Task view membership: 2

Access levels

There are multiple access levels membership can have:

  • access_type_id: 1 - full -> can edit and delete resource
  • access_type_id: 2 - edit -> can edit resource
  • access_type_id: 3 - view -> can only view resource
  • access_type_id: 4 - comment -> can comment on resource
  • access_type_id: 5 - member -> marks a subject as a member of a resource

More about member access:
Member access is used for resources where there is no need for different levels (projects, deals). Those resources use only one access type and that is member access.
Having member access means you are a member of a resource.

Depending on the target resource you are giving access to, different access levels are available:

  • Project memberships use level: 5
  • Doc memberships use levels: 1, 2, 3, 4
  • Dashboard memberships use levels: 1, 3
  • Deal memberships use level: 5
  • Task view memberships use level: 1, 3
  • Pulse memberships use level: 1

Examples of creating membership

Example 1: creating a membership for a person on a project

POST https://api.productive.io/api/v2/memberships

{
  "data": {
    "attributes": {
      "type_id": 1,
      "person_id": 123,
      "access_type_id": 5,
      "project_id": 321
    },
    "type": "memberships"
  }
}

Explanation of the example:

  • type_id: 1 - membership is for a person
  • person_id: 123 - person with id: 123 is getting access
  • access_type_id: 5 - person is getting member access
  • project_id: 321 - person is getting access to project with id: 321

Example 2: creating full access membership for an employees dynamic group on a dashboard

POST https://api.productive.io/api/v2/memberships

{
  "data": {
    "attributes": {
      "type_id": 2,
      "dynamic_group_id": 2,
      "access_type_id": 1,
      "dashboard_id": 321
    },
    "type": "memberships"
  }
}

Explanation of the example:

  • type_id: 2 - membership is for a dynamic group
  • dynamic_group_id: 2 - employees dynamic group is getting access
  • access_type_id: 1 - employees are getting full access
  • dashboard_id: 321 - employees are getting access to dashboard with id: 321

Example 3: creating view access membership for a team on a doc

POST https://api.productive.io/api/v2/memberships

{
  "data": {
    "attributes": {
      "type_id": 3,
      "team_id": 123,
      "access_type_id": 3,
      "page_id": 321
    },
    "type": "memberships"
  }
}

Explanation of the example:

  • type_id: 3 - membership is for a team
  • team_id: 123 - team with id: 123 is getting access
  • access_type_id: 3 - team is getting view access
  • page_id: 321 - team is getting access to doc with id: 321

Attributes

access_type_id integer
Response Request Parameter `filter` Enum

ID of the access type determining the permission level of this membership (e.g. viewer, editor).

Enum Values (5 values)

  • 1
    Full access
  • 2
    Write
  • 3
    Read
  • 4
    Comment
  • 5
    Member
agent agent
Response

The AI agent associated with this membership, if the member is an agent rather than a person.

agent_id integer
Request Parameter `filter`

ID of the AI agent associated with this membership, if the member is an agent.

dashboard dashboard
Response

The dashboard this membership grants access to, if the target is a dashboard.

dashboard_id integer
Request Parameter `filter`

ID of the dashboard this membership grants access to, if the target is a dashboard.

deal deal
Response

The deal this membership grants access to, if the target is a deal.

deal_id integer
Request Parameter `filter`

ID of the deal this membership grants access to, if the target is a deal.

dynamic_group_id integer
Response Parameter `filter` Enum

ID of the dynamic group this membership is assigned to, if assigned via a group rather than an individual.

Enum Values (7 values)

  • 2
    Employees
  • 6
    Project members
  • 8
    Project manager
  • 9
    Deal Owner
  • 10
    Users that have projects_manage permission and are project members
  • 11
    Designated Approver
  • 12
    Agent manager
filter filter
Response

The filter this membership grants access to, if the target is a filter.

filter_id integer
Request Parameter `filter`

ID of the filter this membership grants access to, if the target is a filter.

id integer
Parameter `filter`

The unique identifier of this membership.

options object
Response

Additional options and settings for this membership.

organization organization
Response

The organization this membership belongs to.

page page
Response

The page this membership grants access to, if the target is a page.

page_id integer
Request Parameter `filter`

The ID of the page this membership grants access to, if applicable.

person person
Response

The person this membership belongs to.

person_id integer
Parameter `filter`

The ID of the person this membership belongs to.

project project
Response

The project this membership grants access to, if applicable.

project_id integer
Request Parameter `filter`

The ID of the project this membership grants access to, if applicable.

pulse_id integer
Request

The ID of the pulse (view) this membership applies to, if applicable.

survey survey
Response

The survey this membership grants access to, if applicable.

survey_id integer
Request Parameter `filter`

The ID of the survey this membership grants access to, if applicable.

target_id integer
Parameter `filter`

The ID of the target resource this membership applies to.

target_type string
Response Parameter `filter`

The type of resource this membership applies to (e.g. project, page, survey).

team team
Response

The team this membership applies to, if it grants team-level access.

type_id integer
Response Parameter `filter` Enum

Numeric identifier for the membership type (e.g. viewer, editor, manager).

Enum Values (3 values)

  • 1
    Person
  • 2
    Dynamic group
  • 3
    Team