# Delete shared calendar

Call this interface to delete a specified shared calendar under the current identity (application or user).

**Notice**：- The current identity is determined by the Token type of Header Authorization. Tenant_access_token refers to the application identity, user_access_token refers to the user identity.
- If you call this interface using the application identity, you need to ensure that the application has [Bot capabilities](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability).
- The current identity must have owner permissions for the calendar to be able to delete it. You can call the [Query Calendar Information](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get) interface, and check the permissions of the current identity to the calendar through the response field role.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/calendar/v4/calendars/:calendar_id
HTTP Method | DELETE
Rate Limit | [1000 per minute、50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | Update calendar and event information(calendar:calendar)<br>Delete calendar(calendar:calendar:delete)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Path parameters

Parameter | Type | Description
---|---|---
calendar_id | string | Calendar ID.<br>When creating a shared calendar, the calendar ID will be returned. You can also call the following interfaces to get the ID of a calendar.<br>- [Query Primary Calendar Information](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary)<br>- [Query Calendar List](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list)<br>- [Search Calendars](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search)<br>**Example value**: "feishu.cn_xxxxxxxxxx@group.calendar.feishu.cn"

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {}
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 190002 | invalid parameters in request | Invalid request parameters. Troubleshooting suggestions are as follows:<br>- Confirm that the field name and parameter type of the request parameter are correct.<br>- Confirm that the permissions for the corresponding resource have been applied for.<br>- Confirm that the corresponding resource has not been deleted.
500 | 190003 | internal service error | Internal service error. Please consult [Technical Support](https://applink.feishu.cn/TLJpeNdW).
429 | 190004 | method rate limited | Reduce the QPS and try again later.
429 | 190005 | app rate limited | Reduce the QPS and try again later.
403 | 190006 | wrong unit for app tenant | Request error, check whether the App ID and App Secret are correct. If the problem still cannot be solved, please consult [Technical Support](https://applink.feishu.cn/TLJpeNdW).
404 | 190007 | app bot_id not found | The bot_id of the application is not found. Please check whether the robot capability is enabled in the application. If the problem is still not solved, please contact [Technical Support](https://applink.feishu.cn/TLJpeNdW).
429 | 190010 | current operation rate limited | The action is throttled. This is usually caused by the failure to preempt public resources. Reduce the QPS and try again.
404 | 191000 | calendar not found | No calendar found. Check whether the calendar ID is correct.
400 | 191001 | invalid calendar_id | Invalid calendar ID. Check whether the calendar ID is correct.
403 | 191002 | no calendar access_role | No access to the calendar. Check whether the calendar ID is correct.
403 | 191003 | calendar is deleted | The calendar has been deleted. Check whether the calendar ID is correct.
403 | 191004 | invalid calendar type | Incorrect calendar type. Check the calendar type.
404 | 195100 | user is dismiss or not exist in the tenant | The current identity or the specified user has been terminated or is not in the tenant.

For more error code information, see [General error codes](https://open.feishu.cn/document/ukTMukTMukTM/ugjM14COyUjL4ITN).

