Please use this documentation for understanding the API params and responses only. For detailed understanding of all aspects, please refer to c-lightning repo or view the help pages on your node.
Help command example: $ lightning-cli help getinfo
Sample url for Swagger documentation of APIs: http://localhost:4001/api-docs/
Required params are route params. Optional params are query params
For POST APIs all params will be passed in the body as a JSON
- Type:
POST
- Sample request URL:
https://localhost:3001/v1/peer/connect
- Required Params: id (Pubkey of the peer)
- Optional Params: None
- Response: "id"
- Type:
GET
- Sample request URL:
https://localhost:3001/v1/peer/listPeers
- Required Params: None
- Optional Params: None
- Response:
"id", "connected", "netaddr" [
<address>
] (ifconnected
is false,netaddr
is not returned), "alias"
- Type:
DEL
- Sample request URL:
https://localhost:3001/v1/peer/disconnect
- Required Params: Node Pubkey
- Optional Params:
force
(true
or1
) - Response: NA