DELETE /api/groups/:group_id/archive

archive a group

when a group is archived, no new members can join and no new content can be added. A group must be archived before it is destroyed

Success Response Code: 200

Params

Param name Description
group_id
required

id of the group


Value: Must be a Integer

Response Fields

id unique ID of the group Integer
name name of the group String
url url to view the group permalink page String
avatars urls for various sizes of group avatar pictures Hash<String, Url>
private whether the group is private Boolean
external_contributor whether the group allows external contributors Boolean
state state of the group (e.g. archived, active) String
permission permission mode of the group (e.g. external_contributor, private, public) String
member_count number of members in the group (returns null if private group that member has not joined) Integer
description group's description String
role_key the current user's role in the group, or null if user is not in group ["admin", "member"]
can_request_membership whether the current user can make a membership request for the group Boolean
can_cancel_membership_request whether the current user can cancel a pending membership request for the group Boolean
can_join whether the current user can join the group Boolean
can_leave whether the current user can leave the group Boolean

Example Curl Commands

curl -X DELETE -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/groups/12/archive.json

Examples

DELETE 
{}
200
{
  "group": {
    "id": 1,
    "name": "test&grøup1",
    "html_name": "test&amp;grøup1",
    "url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1",
    "type": "Group",
    "avatars": {
      "is_system_default": true,
      "square16": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square16-de52f6166f708e54b1b832ef06f92e409ae6b09976b4afc3dddbec820123214e.png",
      "square30": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square30-c3483c74bd99384e67bb1c52a48b68e5e5ff04286e3abdbff3a228ee6f40d08b.png",
      "square45": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square45-a31ef7e33bb699a3663623cd7c8244144c7779f6fb34757b1247bb720addbc32.png",
      "square70": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square70-1886d205945147e3e2a37feb87db68bf29603fc508a049c5defa65a0c79e86cd.png",
      "square140": "https://socialcast.socialcast.test/assets-test/v6/avatars/default_group_square140-3f77aeb71272a1df5c7c0e3a0141e91358b3654f9ff918f4974b77e230cab10e.png"
    },
    "username": "testgrøup1",
    "groupname": "testgrøup1",
    "private": false,
    "external_contributor": false,
    "chat_enabled": false,
    "post_enabled": true,
    "activity_url": "https://socialcast.socialcast.test/groups/1-testgr%C3%B8up1/messages_activity",
    "admin_ids": [
      16
    ],
    "description": null,
    "state": "archived",
    "permission": "public",
    "group_type": "standard",
    "member_count": 2,
    "role_key": null,
    "can_request_membership": false,
    "can_cancel_membership_request": false,
    "can_join": false,
    "can_leave": false,
    "can_administer": true,
    "chat_stream_id": null,
    "post_stream_id": null
  }
}