# Cancel a Settlement Request

## POST /settlements/{settlement\_id}/cancel

> Cancel a settlement by id.\
> Only Settlement with an outbound transaction in status \`FAILED\_TO\_BROADCAST\`\
> or \`SIGNED\` can be canceled.\
> Only Exchange (Liquidity Provider) user can cancel a settlement.<br>

```json
{"openapi":"3.0.2","info":{"title":"Vault API","version":"1.34.2-3-g8acda32"},"tags":[],"security":[{"Ledger_API_User":[]},{"Ledger_API_User":[],"Ledger_API_Key":[]},{"Ledger_API_User":[],"Ledger_Store_Auth_Token":[]},{"Ledger_API_User":[],"Ledger_API_Key":[],"Ledger_Store_Auth_Token":[]}],"components":{"securitySchemes":{"Ledger_API_User":{"description":"(**required**) Username of a registered API User","in":"header","name":"X-Ledger-API-User","type":"apiKey"}},"schemas":{"Settlement":{"additionalProperties":false,"properties":{"from_pledge_id":{"format":"uuid","type":"string"},"id":{"format":"uuid","type":"string"},"inbound_transaction_intent":{"allOf":[{"$ref":"#/components/schemas/InboundTransactionIntent"}],"default":null,"nullable":true},"meta":{"additionalProperties":{"nullable":true},"type":"object"},"outbound_transaction":{"allOf":[{"$ref":"#/components/schemas/OutboundTransaction"}],"default":null,"nullable":true},"repledge":{"allOf":[{"$ref":"#/components/schemas/RepledgeRequest"}],"default":null,"nullable":true},"repledge_intent":{"allOf":[{"$ref":"#/components/schemas/RepledgeIntent"}],"default":null,"nullable":true},"state":{"type":"string"}},"required":["from_pledge_id","id","meta","state"],"type":"object"},"InboundTransactionIntent":{"properties":{"amount":{"type":"integer"},"to_account_id":{"type":"integer"},"to_address":{"type":"string"}},"required":["amount","to_account_id","to_address"],"type":"object"},"OutboundTransaction":{"properties":{"request_id":{"type":"integer"},"transaction_hash":{"default":null,"nullable":true,"type":"string"},"transaction_id":{"type":"integer"}},"required":["request_id","transaction_id"],"type":"object"},"RepledgeRequest":{"properties":{"repledge_id":{"type":"integer"},"request_id":{"type":"integer"}},"required":["repledge_id","request_id"],"type":"object"},"RepledgeIntent":{"properties":{"account_name":{"type":"string"},"amount":{"type":"string"},"contract_address":{"default":null,"nullable":true,"type":"string"},"currency":{"type":"string"},"exchange_name":{"type":"string"},"pledge_subaccount_id":{"type":"integer"},"to_address":{"default":null,"nullable":true,"type":"string"},"transaction_hash":{"default":null,"nullable":true,"type":"string"}},"required":["account_name","amount","currency","exchange_name","pledge_subaccount_id"],"type":"object"},"Error":{"properties":{"message":{"type":"string"},"name":{"type":"string"},"status_code":{"type":"integer"}},"required":["message","name","status_code"],"type":"object"}}},"paths":{"/settlements/{settlement_id}/cancel":{"post":{"tags":["Settlements"],"description":"Cancel a settlement by id.\nOnly Settlement with an outbound transaction in status `FAILED_TO_BROADCAST`\nor `SIGNED` can be canceled.\nOnly Exchange (Liquidity Provider) user can cancel a settlement.\n","parameters":[{"name":"settlement_id","in":"path","description":"settlement's id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settlement"}}},"description":"settlement object"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Settlement cannot be canceled"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Settlement not found"}}}}}}
```
