{"__v":0,"_id":"585636817723bb190021841a","category":{"__v":0,"_id":"57f53fb368a53b2000e03f0f","project":"5588b8a2f6c18d0d005bba03","version":"5588b8a2f6c18d0d005bba06","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-05T18:00:19.547Z","from_sync":false,"order":0,"slug":"api","title":"REST API"},"parentDoc":null,"project":"5588b8a2f6c18d0d005bba03","user":"5588b847f6c18d0d005bba01","version":{"__v":15,"_id":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","createdAt":"2015-06-23T01:38:42.696Z","releaseDate":"2015-06-23T01:38:42.696Z","categories":["5588b8a3f6c18d0d005bba07","5588e9689cfea70d00371df3","5588f5921163180d00b64704","561598b121e9110d0078025a","5616f1c9d170d00d00189306","5616f5c3a410c90d00c6121e","561803dcf8c9632100ac7592","563667280441020d0000e9eb","5642570d9417b40d00c0fcd3","57bf5f02efe0050e00d50bd5","57f53fb368a53b2000e03f0f","57f55187440418170086325a","582e3afa72fd270f0006926d","5841faa973967b0f004b4a2b","58db348aa32c8419002433bb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-18T07:10:57.551Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":104,"body":"Many resources (such as [contactgroups](/docs/contactgroups)) can be shared, or accessible by users other than the creator. If a resource is shared, it will have a `shared` key in the following format:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"shared\",\n    \"0-1\": \"*Object*\",\n    \"0-2\": \"Object with keys `users`, `teams`, and/or `domains`.\",\n    \"1-0\": \"shared.users\",\n    \"6-0\": \"shared.teams\",\n    \"7-0\": \"shared.teams._id\",\n    \"2-0\": \"shared.users.email\",\n    \"4-0\": \"shared.users.accepted\",\n    \"1-1\": \"*Array*\",\n    \"1-2\": \"A list of individual users with whom the root resource is shared.\",\n    \"2-1\": \"*String*\",\n    \"2-2\": \"Email of the user being shared with. Only exists if the user does not have a Mixmax account.\",\n    \"4-1\": \"*Boolean*\",\n    \"4-2\": \"If the individual user has accepted this resource. If this is false, they will not see it in the UI.\",\n    \"6-1\": \"*Array*\",\n    \"6-2\": \"Array of objects representing teams that this resource is shared with. Each object has the key `_id`.\",\n    \"7-1\": \"*String*\",\n    \"7-2\": \"The `_id` of the team that's shared with.\",\n    \"3-0\": \"shared.users.userId\",\n    \"3-1\": \"*String*\",\n    \"3-2\": \"ID of the user being shared with. Only exists if the user has a Mixmax account.\",\n    \"5-0\": \"shared.users.role\",\n    \"5-1\": \"*String*\",\n    \"5-2\": \"User's access level for the resource. Possible values are:\\n\\n- 'read-only'\\n- 'read-write'\\n\\nIf the resource is shared with a user individually and with their team, they will receive whichever access level is the highest.\",\n    \"8-0\": \"shared.teams.role\",\n    \"8-1\": \"*String*\",\n    \"8-2\": \"Team's access level for the resource. Possible values are:\\n\\n- 'read-only'\\n- 'read-write'\\n\\nIf the resource is shared with a user individually and with their team, they will receive whichever access level is the highest.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]","excerpt":"","slug":"shared","type":"basic","title":"Appendix: Shared resources"}

Appendix: Shared resources


Many resources (such as [contactgroups](/docs/contactgroups)) can be shared, or accessible by users other than the creator. If a resource is shared, it will have a `shared` key in the following format: [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "h-2": "Description", "0-0": "shared", "0-1": "*Object*", "0-2": "Object with keys `users`, `teams`, and/or `domains`.", "1-0": "shared.users", "6-0": "shared.teams", "7-0": "shared.teams._id", "2-0": "shared.users.email", "4-0": "shared.users.accepted", "1-1": "*Array*", "1-2": "A list of individual users with whom the root resource is shared.", "2-1": "*String*", "2-2": "Email of the user being shared with. Only exists if the user does not have a Mixmax account.", "4-1": "*Boolean*", "4-2": "If the individual user has accepted this resource. If this is false, they will not see it in the UI.", "6-1": "*Array*", "6-2": "Array of objects representing teams that this resource is shared with. Each object has the key `_id`.", "7-1": "*String*", "7-2": "The `_id` of the team that's shared with.", "3-0": "shared.users.userId", "3-1": "*String*", "3-2": "ID of the user being shared with. Only exists if the user has a Mixmax account.", "5-0": "shared.users.role", "5-1": "*String*", "5-2": "User's access level for the resource. Possible values are:\n\n- 'read-only'\n- 'read-write'\n\nIf the resource is shared with a user individually and with their team, they will receive whichever access level is the highest.", "8-0": "shared.teams.role", "8-1": "*String*", "8-2": "Team's access level for the resource. Possible values are:\n\n- 'read-only'\n- 'read-write'\n\nIf the resource is shared with a user individually and with their team, they will receive whichever access level is the highest." }, "cols": 3, "rows": 9 } [/block]