# Activate/deactivate pathway

Activate/deactivate pathway

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/corehr/v2/pathways/active
HTTP Method | POST
Rate Limit | [5 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.** | Read and write pathway information(corehr:pathway:write)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-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)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Request body

Parameter | Type | Required | Description
---|---|---|---
pathway_id | string | Yes | Pathway ID. ID acquisition method<br>- After calling [create pathway interface](/document-mod/index?fullPath=%2FuAjLw4CM%2FukTMukTMukTM%2Fcorehr-v2%2Fpathway%2Fcreate), obtain it from `pathway_id` in the response result.<br>- Listen to [pathway creation event](/document-mod/index?fullPath=/uAjLw4CM/ukTMukTMukTM/corehr-v2/pathway/events/created), when the event is triggered, you can get `pathway_id` from the event body<br>- Listen to [pathway update event](/document-mod/index?fullPath=/uAjLw4CM/ukTMukTMukTM/corehr-v2/pathway/events/updated), when the event is triggered, you can get `pathway_id` from the event body<br>- Listen to [pathway deletion event](/document-mod/index?fullPath=%2FuAjLw4CM%2FukTMukTMukTM%2Fcorehr-v2%2Fpathway%2Fevents%2Fdeleted), when the event is triggered, you can get `pathway_id` from the event body<br>**Example value**: "6862995757234914823"
active | boolean | Yes | active status<br>**Example value**: true

### Request body example
```json
{
    "pathway_id": "6862995757234914823",
    "active": true
}
```

## 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
---|---|---|---
429 | 1161604 | QPS over limit | Please refer to the detailed description of the full number of error codes for error troubleshooting. If the problem cannot be solved, please contact [Technical Support](https://applink.feishu.cn/TLJpeNdW)

Other Error Code Reference: [Detailed Description of Full Error Codes](/document-mod/index?fullPath=%2FuAjLw4CM%2FukTMukTMukTM%2Fcorehr-v2%2Fpathway%2Fpathway-errorcodes)

