# APIs

### **API Document:**

**Activity Related API**

## Group Activity Aggregator

> This API is used for reading the current progress of the course (content) consumed by group members. For example, the mentor/user can view and check the progress of a specific activity.\
> \
> \- The endpoint for \*\*Group Activity Aggregator\*\* is \`/agg\`\
> \
> \- The fields marked with an asterisk (\*) are mandatory.\
> They cannot be null or empty.

```json
{"openapi":"3.0.1","info":{"title":"Group Activity Apis","version":"1.0"},"tags":[{"name":"Group Activity Apis","description":""}],"servers":[{"url":"https://staging.open-sunbird.org/api"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"groupactivityapiGroupActivityAggRequest":{"title":"GroupActivityAggRequest","required":["request"],"type":"object","properties":{"request":{"$ref":"#/components/schemas/groupactivityapiRequest"}}},"groupactivityapiRequest":{"title":"Request","required":["groupId","activityId","activityType"],"type":"object","properties":{"groupId":{"type":"string"},"activityId":{"type":"string"},"activityType":{"type":"string"}}},"groupactivityapiGroupActivityAgg-withinvalidactivity-d":{"title":"GroupActivityAgg-withinvalidactivity-d","required":["id","ver","ts","params","responseCode","result"],"type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ts":{"type":"string"},"params":{"$ref":"#/components/schemas/groupactivityapigroupactivityapiParams"},"responseCode":{"type":"string"},"result":{"$ref":"#/components/schemas/groupactivityapigroupactivityapiResult"}}},"groupactivityapigroupactivityapiParams":{"title":"Params","required":["resmsgid","msgid","err","status","errmsg"],"type":"object","properties":{"resmsgid":{"type":"string","nullable":true},"msgid":{"type":"string"},"err":{"type":"string","nullable":true},"status":{"type":"string"},"errmsg":{"type":"string","nullable":true}}},"groupactivityapigroupactivityapiResult":{"title":"Result","required":["activity","groupId","members"],"type":"object","properties":{"activity":{"$ref":"#/components/schemas/groupactivityapiActivity"},"groupId":{"type":"string"},"members":{"type":"array","items":{"type":"string"},"description":""}}},"groupactivityapiActivity":{"title":"Activity","required":["id","type","agg"],"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"agg":{"type":"array","items":{"$ref":"#/components/schemas/groupactivityapiAgg"},"description":""}}},"groupactivityapiAgg":{"title":"Agg","required":["metric","lastUpdatedOn","value"],"type":"object","properties":{"metric":{"type":"string"},"lastUpdatedOn":{"type":"integer","format":"int64"},"value":{"type":"integer","format":"int32"}}},"groupactivityapiGroupActivityAgg-Errorwhilefetchinggroupmembersrecord":{"title":"GroupActivityAgg-Errorwhilefetchinggroupmembersrecord","required":["id","ver","ts","params","responseCode","result"],"type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ts":{"type":"string"},"params":{"$ref":"#/components/schemas/groupactivityapigroupactivityapiParams1"},"responseCode":{"type":"string"},"result":{"type":"object"}}},"groupactivityapigroupactivityapiParams1":{"title":"Params1","required":["resmsgid","msgid","err","status","errmsg"],"type":"object","properties":{"resmsgid":{"type":"string","nullable":true},"msgid":{"type":"string"},"err":{"type":"string","nullable":true},"status":{"type":"string"},"errmsg":{"type":"string"}}}}},"paths":{"/data/v1/group/activity/agg":{"post":{"tags":["Group Activity Apis"],"summary":"Group Activity Aggregator","description":"This API is used for reading the current progress of the course (content) consumed by group members. For example, the mentor/user can view and check the progress of a specific activity.\n\n- The endpoint for **Group Activity Aggregator** is `/agg`\n\n- The fields marked with an asterisk (*) are mandatory.\nThey cannot be null or empty.","operationId":"GroupActivityAgg","parameters":[{"name":"Content-Type","in":"header","description":"'The Content Type entity is the media type of the resource.Possible\\\n\\ media types can be:- \\n  - application/json'","required":true,"style":"simple","schema":{"type":"string"}},{"name":"x-authenticated-user-token","in":"header","description":"'The registered user token/key to authenticate user and execute\nthe API.'","required":true,"style":"simple","schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"'To make use of the API, you require authorization. Raise a request\nto the administrator for the use of the API. You will receive the authorization\nkey. Specify the key received, here.'","required":true,"style":"simple","schema":{"type":"string"}}],"requestBody":{"description":"Represents the body and formdata parameters of the Group Activity Aggregator API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupactivityapiGroupActivityAggRequest"}}},"required":true},"responses":{"200":{"description":"SUCCESS. The \"Group Activity Aggregator\" operation was successful!","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupactivityapiGroupActivityAgg-withinvalidactivity-d"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupactivityapiGroupActivityAgg-Errorwhilefetchinggroupmembersrecord"}}}}},"deprecated":false}}}}
```

**Group API**

## Create Group

> This API is used to create a group\
> &#x20;  \- The endpoint for \*\*Create Group\*\* is \`/group/v1/create\`  \
> &#x20;  \- The fields marked with an asterisk (\*) are mandatory. They cannot be null or empty.

```json
{"openapi":"3.0.1","info":{"title":"Group Management  API(s)","version":"1.0"},"servers":[{"url":"https://staging.sunbirded.org/api"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"groupapiCreateGroupRequest":{"description":"Create Group Object","type":"object","allOf":[{"$ref":"#/components/schemas/groupapiApiRequest"}],"properties":{"request":{"type":"object","properties":{"name":{"description":"Represents the name of the group","type":"string"},"description":{"description":"Represents the description of the group","type":"string"},"membershipType":{"type":"string","description":"Represents the MembershipType (invite_only/moderated) of the group","default":"invite_only"},"members":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapimemberReqObject"}]}},"activities":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiactivityReqObject"}]}}},"required":["name"]}},"required":["request"]},"groupapiApiRequest":{"description":"Group Create Request","type":"object","properties":{"id":{"description":"Represents an API uniquely","type":"string"},"ver":{"description":"Represents the version of the API which was used","type":"string"},"ets":{"description":"Represents the EPOCH (UTC) timestamp in milliseconds since EPOCH","type":"string","format":"int64"},"params":{"type":"object","properties":{"msgid":{"description":"Represents the unique ID of the message being sent","type":"string"},"did":{"description":"Represents the device UUID from which API is called","type":"string"}}}}},"groupapimemberReqObject":{"title":"memberReqObject","type":"object","properties":{"userId":{"type":"string","description":"uuid of the member"},"role":{"type":"string","description":"Role of the user in group [admin/member]","default":"member"}},"required":["userId"]},"groupapiactivityReqObject":{"title":"activityReqObject","type":"object","properties":{"id":{"type":"string","description":"Id of the activity."},"type":{"type":"string","description":"Type of the activity"}},"required":["id","type"]},"groupapiGroupCreateResponse":{"description":"The response body of create group","type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"}],"required":["result"],"properties":{"result":{"type":"object","required":["groupId","response","errors"],"properties":{"response":{"type":"string","description":"Success or Failure"},"groupId":{"type":"string","description":"Group id of the created group"},"errors":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiErrorObjectForPartialSuccess"}]}}}}},"groupapiInitResObject":{"title":"initResObject","type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ets":{"type":"string"},"params":{"type":"object","properties":{"msgid":{"type":"string"},"resmsgid":{"type":"string"},"err":{"type":"string"},"errmsg":{"type":"string"},"errdetail":{"type":"string"},"status":{"type":"string"}}}}},"groupapiErrorObjectForPartialSuccess":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"useriId":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}},"activities":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}}}},"groupapiGroupErrorResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiEmptyResult"}]},"groupapiEmptyResult":{"type":"object","properties":{"result":{"type":"object","description":"Empty Result"}}}}},"paths":{"/group/v1/create":{"post":{"description":"This API is used to create a group\n   - The endpoint for **Create Group** is `/group/v1/create`  \n   - The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.","summary":"Create Group","tags":["Group APIs"],"operationId":"Create Group","parameters":[{"name":"ts","in":"header","required":false,"description":"Timestamp at which given API request is sent.","schema":{"type":"string"}},{"name":"X-msgid","in":"header","required":false,"description":"This ID uniquely identifies a request if the same API is executed multiple times.","schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"To make use of any Group API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.","schema":{"type":"string"}},{"name":"x-authenticated-user-token","in":"header","required":false,"description":"It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password","schema":{"type":"string"}},{"name":"x-authenticated-for","in":"header","required":false,"description":"Managed User token of registered MUA user performing given API request.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiCreateGroupRequest"}}},"description":"- The body payload comprises of the metadata of the group being created - The body parameter refers to the format of the request, the request body (payload) takes the following media types to make the payload:\n   - JSON","required":true},"responses":{"200":{"description":"OK ! Successful operation.\"Create Group\" operation was successfully executed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupCreateResponse"}}}},"400":{"description":"BAD REQUEST. The \"Create Group\" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"401":{"description":"Unauthorized User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"500":{"description":"'INTERNAL SERVER ERROR. We track these errors automatically and try to set it right at the earliest. Try refreshing the page. If the problem persists contact us at info@sunbird.org.'","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}}}}}}}
```

## Update Group

> This API is used for updating the group related details. This can also be used to add/edit/remove members of a group and also to add/remove activitties of a group. This API can add details partially as well, for example, one member in the request could not be added, because that member is inactive or id doesn't exist, still other properties in the request is updated. If a member is not added, only the status of that will be shown in the “errors” array in response.\
> &#x20; \- The endpoint for \*\*Update Group\*\* is \`/group/v1/update\`\
> &#x20; \- The fields marked with an asterisk (\*) are mandatory. They cannot be null or empty.\
> &#x20; \- Once group suspended following operation can only be performed :-\
> &#x20;   1\. All member are eligible to leave the group. \
> &#x20;   2\. Creator will be able to delete the group.\
> &#x20;   3\. Admin will be able to reactivate the group.\
> &#x20;   4\. All other operations are not permitted once group is suspended.

```json
{"openapi":"3.0.1","info":{"title":"Group Management  API(s)","version":"1.0"},"servers":[{"url":"https://staging.sunbirded.org/api"}],"paths":{"/group/v1/update":{"patch":{"description":"This API is used for updating the group related details. This can also be used to add/edit/remove members of a group and also to add/remove activitties of a group. This API can add details partially as well, for example, one member in the request could not be added, because that member is inactive or id doesn't exist, still other properties in the request is updated. If a member is not added, only the status of that will be shown in the “errors” array in response.\n  - The endpoint for **Update Group** is `/group/v1/update`\n  - The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.\n  - Once group suspended following operation can only be performed :-\n    1. All member are eligible to leave the group. \n    2. Creator will be able to delete the group.\n    3. Admin will be able to reactivate the group.\n    4. All other operations are not permitted once group is suspended.","summary":"Update Group","tags":["Group APIs"],"operationId":"Update Group","parameters":[{"name":"ts","in":"header","required":false,"description":"Timestamp at which given API request is sent.","schema":{"type":"string"}},{"name":"X-msgid","in":"header","required":false,"description":"This ID uniquely identifies a request if the same API is executed multiple times.","schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Specify authorization key (format: Bearer api-key) received from administrator when performing given API request.","schema":{"type":"string"}},{"name":"X-Authenticated-User-Token","in":"header","required":true,"description":"Access token of registered user performing given API request.","schema":{"type":"string"}},{"name":"x-authenticated-for","in":"header","required":false,"description":"Managed User token of registered MUA user performing given API request.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/groupapiUpdateGroupRequest"}]}}},"description":"- The body payload comprises of the metadata about the group to be updated. - The body parameter refers to the format of the request, the request body (payload) takes the following media types to make the payload:\n   - JSON","required":true},"responses":{"200":{"description":"OK ! Successful operation.\"Update Group\" operation was successfully executed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiUpdateGroupResponse"}}}},"400":{"description":"BAD REQUEST. The \"Update Group\" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"401":{"description":"Unauthorized User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"404":{"description":"Resource not found. The \"Update Group\" operation failed ! The possible reason for failure is that requested resource not found. here resource is group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"500":{"description":"'INTERNAL SERVER ERROR. We track these errors automatically and try to set it right at the earliest. Try refreshing the page. If the problem persists contact us at info@sunbird.org.'","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}}}}}},"components":{"schemas":{"groupapiUpdateGroupRequest":{"type":"object","properties":{"request":{"type":"object","properties":{"groupId":{"description":"Represents the ID of the group to be updated","type":"string"},"name":{"description":"Represents the name of the group","type":"string"},"description":{"description":"Represents the description of the group","type":"string"},"membershipType":{"type":"string","description":"Represents the MembershipType (invite_only/moderated) of the group"},"status":{"description":"Represents the status (active/inactive) of the group","type":"string"}},"allOf":[{"$ref":"#/components/schemas/groupapiMemberOperations"},{"$ref":"#/components/schemas/groupapiActivityOperations"}],"required":["groupId"]}},"required":["request"]},"groupapiMemberOperations":{"type":"object","properties":{"members":{"type":"object","properties":{"add":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapimemberReqObject"}]}},"edit":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapimemberReqObject"}]}},"remove":{"type":"array","items":{"type":"string","description":"uuid of the member"}}}}}},"groupapimemberReqObject":{"title":"memberReqObject","type":"object","properties":{"userId":{"type":"string","description":"uuid of the member"},"role":{"type":"string","description":"Role of the user in group [admin/member]","default":"member"}},"required":["userId"]},"groupapiActivityOperations":{"type":"object","properties":{"activities":{"type":"object","properties":{"add":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiactivityReqObject"}]}},"edit":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiactivityReqObject"}]}},"remove":{"type":"array","items":{"type":"string","description":"Id of the activity."}}}}}},"groupapiactivityReqObject":{"title":"activityReqObject","type":"object","properties":{"id":{"type":"string","description":"Id of the activity."},"type":{"type":"string","description":"Type of the activity"}},"required":["id","type"]},"groupapiUpdateGroupResponse":{"description":"Update response for a Group API","type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiResultWithPartialErrorResponse"}]},"groupapiInitResObject":{"title":"initResObject","type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ets":{"type":"string"},"params":{"type":"object","properties":{"msgid":{"type":"string"},"resmsgid":{"type":"string"},"err":{"type":"string"},"errmsg":{"type":"string"},"errdetail":{"type":"string"},"status":{"type":"string"}}}}},"groupapiResultWithPartialErrorResponse":{"type":"object","properties":{"result":{"type":"object","properties":{"response":{"type":"string","description":"Success or Failure"},"error":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiErrorObjectForPartialSuccess"}]}}}}},"groupapiErrorObjectForPartialSuccess":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"useriId":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}},"activities":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"string"},"errorCode":{"type":"string"},"errorMessage":{"type":"string"}}}}}},"groupapiGroupErrorResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiEmptyResult"}]},"groupapiEmptyResult":{"type":"object","properties":{"result":{"type":"object","description":"Empty Result"}}}}}}
```

## List Groups by User

> This API is used for listing groups of a particular user.\
> &#x20; \- The endpoint for \*\*List Group\*\* is \`/group/v1/list\`\
> &#x20; \- The fields marked with an asterisk (\*) are mandatory. They cannot be null or empty.

```json
{"openapi":"3.0.1","info":{"title":"Group Management  API(s)","version":"1.0"},"servers":[{"url":"https://staging.sunbirded.org/api"}],"paths":{"/group/v1/list":{"post":{"description":"This API is used for listing groups of a particular user.\n  - The endpoint for **List Group** is `/group/v1/list`\n  - The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.","summary":"List Groups by User","tags":["Group APIs"],"operationId":"List Groups by User","parameters":[{"name":"Authorization","in":"header","required":true,"description":"To make use of any Group API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.","schema":{"type":"string"}},{"name":"x-authenticated-user-token","in":"header","required":true,"description":"It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password","schema":{"type":"string"}},{"name":"x-authenticated-for","in":"header","required":false,"description":"Managed User token of registered MUA user performing given API request. From this LUA and MUA id are seperated and LUA is validated against user_id in x-authenticated-user-token","schema":{"type":"string"}},{"name":"ts","in":"header","required":false,"description":"Timestamp is a sequence of characters or encoded information identifying when the list group API call occurred, usually it gives date and time of day, mostly accurate to a small fraction of a second.","schema":{"type":"string"}},{"name":"X-msgid","in":"header","required":false,"description":"This ID uniquely identifies a request if the same API is executed multiple times.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiListGroupRequest"}}},"description":"- The body payload comprises of metadata of the groups of the user being listed - The body parameter refers to the format of the request, the request body (payload) takes the following media types to make the payload:\n   - JSON\n **Note**: You can list the groups based on user id\n  - The userId can be passed inside the filters of the request payload","required":true},"responses":{"200":{"description":"OK ! Successful operation.\"List Group\" operation was successfully executed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiListGroupResponse"}}}},"400":{"description":"BAD REQUEST. The \"List Group\" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"401":{"description":"Unauthorized User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"500":{"description":"'INTERNAL SERVER ERROR. We track these errors automatically and try to set it right at the earliest. Try refreshing the page. If the problem persists contact us at info@sunbird.org.'","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}}}}}},"components":{"schemas":{"groupapiListGroupRequest":{"description":"List group request","type":"object","properties":{"filters":{"type":"object","properties":{"userId":{"type":"string","description":"UserId is optional"}}}}},"groupapiListGroupResponse":{"description":"The response body of List Group","type":"object","properties":{"response":{"type":"object","properties":{"count":{"type":"integer"},"group":{"type":"array","items":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiListGroupResponseObject"}]}}}}}},"groupapiListGroupResponseObject":{"title":"Group Response Object","type":"object","properties":{"id":{"type":"string","description":"Represents the id of the group"},"name":{"description":"Represents the name of the group","type":"string"},"description":{"description":"Represents the description of the group","type":"string"},"membershipType":{"type":"string","description":"Represents the MembershipType (invite_only/moderated) of the group","default":"invite_only"},"status":{"description":"Represents the status (active/inactive) of the group","type":"string"},"memberRole":{"description":"Represents the role (member/admin) of the user","type":"string"}},"allOf":[{"$ref":"#/components/schemas/groupapiauditObject"}]},"groupapiauditObject":{"title":"auditObject","type":"object","properties":{"createdOn":{"type":"string","description":"Record created date"},"createdBy":{"type":"string","description":"Record created userid"},"updatedOn":{"type":"string","description":"Record updated date"},"updatedBy":{"type":"string","description":"Record updated userid"}}},"groupapiGroupErrorResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiEmptyResult"}]},"groupapiInitResObject":{"title":"initResObject","type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ets":{"type":"string"},"params":{"type":"object","properties":{"msgid":{"type":"string"},"resmsgid":{"type":"string"},"err":{"type":"string"},"errmsg":{"type":"string"},"errdetail":{"type":"string"},"status":{"type":"string"}}}}},"groupapiEmptyResult":{"type":"object","properties":{"result":{"type":"object","description":"Empty Result"}}}}}}
```

## Delete Group by User

> This API is used for deleting the groups .\
> &#x20; \- The endpoint for \*\*Delete Group\*\* is \`/group/v1/delete\`\
> &#x20; \- The fields marked with an asterisk (\*) are mandatory. They cannot be null or empty.\
> &#x20;&#x20;

```json
{"openapi":"3.0.1","info":{"title":"Group Management  API(s)","version":"1.0"},"servers":[{"url":"https://staging.sunbirded.org/api"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"groupapiDeleteGroupRequest":{"type":"object","properties":{"request":{"type":"object","properties":{"groupId":{"description":"Represents the ID of the group to be deleted","type":"string"}},"required":["groupId"]}},"required":["request"]},"groupapiDeleteGroupResponse":{"description":"Delete response for a Group API","type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiResultWithEmptyBody"}]},"groupapiInitResObject":{"title":"initResObject","type":"object","properties":{"id":{"type":"string"},"ver":{"type":"string"},"ets":{"type":"string"},"params":{"type":"object","properties":{"msgid":{"type":"string"},"resmsgid":{"type":"string"},"err":{"type":"string"},"errmsg":{"type":"string"},"errdetail":{"type":"string"},"status":{"type":"string"}}}}},"groupapiResultWithEmptyBody":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/groupapiResultStatus"}}},"groupapiResultStatus":{"type":"object","properties":{"response":{"type":"string","description":"Success or Failure"}}},"groupapiGroupErrorResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/groupapiInitResObject"},{"$ref":"#/components/schemas/groupapiEmptyResult"}]},"groupapiEmptyResult":{"type":"object","properties":{"result":{"type":"object","description":"Empty Result"}}}}},"paths":{"/group/v1/delete":{"post":{"description":"This API is used for deleting the groups .\n  - The endpoint for **Delete Group** is `/group/v1/delete`\n  - The fields marked with an asterisk (*) are mandatory. They cannot be null or empty.\n  ","summary":"Delete Group by User","tags":["Group APIs"],"operationId":"Delete Group by User","parameters":[{"name":"Authorization","in":"header","required":true,"description":"To make use of any Group API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.","schema":{"type":"string"}},{"name":"x-authenticated-user-token","in":"header","required":true,"description":"It is a unique token/key to authenticate the user each time an API is called. For corresponding sessions this token is used, not your actual username/password","schema":{"type":"string"}},{"name":"x-authenticated-for","in":"header","required":false,"description":"Managed User token of registered MUA user performing given API request. From this LUA and MUA id are seperated and LUA is validated against user_id in x-authenticated-user-token","schema":{"type":"string"}},{"name":"ts","in":"header","required":false,"description":"Timestamp is a sequence of characters or encoded information identifying when the list group API call occurred, usually it gives date and time of day, mostly accurate to a small fraction of a second.","schema":{"type":"string"}},{"name":"X-msgid","in":"header","required":false,"description":"This ID uniquely identifies a request if the same API is executed multiple times.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiDeleteGroupRequest"}}},"description":"- The body payload comprises of metadata of the groups of the user being listed - The body parameter refers to the format of the request, the request body (payload) takes the following media types to make the payload:\n   - JSON\n **Note**: Only creator can  only delete the group \n  - The groupId should be passed on request payload to delete the group","required":true},"responses":{"200":{"description":"OK ! Successful operation.\"Delete Group\" operation was successfully executed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiDeleteGroupResponse"}}}},"400":{"description":"BAD REQUEST. The \"Delete Group\" operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"401":{"description":"Unauthorized User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}},"500":{"description":"'INTERNAL SERVER ERROR. We track these errors automatically and try to set it right at the earliest. Try refreshing the page. If the problem persists contact us at info@sunbird.org.'","content":{"application/json":{"schema":{"$ref":"#/components/schemas/groupapiGroupErrorResponse"}}}}}}}}}
```
