Get a code to link your LINE account.
POST/api/v1/chat-channels/{chat_channel_id}/pairchat_channels:write
A one-time code, valid for ten minutes, that the person sends to the staff channel as link <pairing_code> to link their LINE account to their Docwize user. Needs Create Channel Pairing Codes for an active internal user. The channel must be enabled, and the account must not already be linked to it.
| Scope | chat_channels:write (sensitive) |
| Asynchronous | No |
| MCP tool | pair_chat_channel |
| Portal permissions | create_channel_pairing_codes |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
chat_channel_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json ChatPairingCode or object |
400 | invalid_version | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | conflict, idempotency_in_progress | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
ChatPairingCode
| Field | Type | Required | Description |
|---|---|---|---|
command | string | Required | The message to send to the channel: link <pairing_code>. |
expires_at | string (date-time) | Required | |
pairing_code | string | Required | The code the person sends to the channel. |