---
title: "Create / Update / Delete XRP trust line"
method: POST
path: "/v3/xrp/trust"
tags: ["Ripple (XRP) - Tatum API"]
---

# Create / Update / Delete XRP trust line

`POST /v3/xrp/trust`

## Request

- Base URL: `https://api.tatum.io`
- URL: `https://api.tatum.io/v3/xrp/trust`
- Auth: API key in header `x-api-key`

/v3/xrp/trust

#### 10 credits per API call.

  

Create / Update / Delete XRP trust line between accounts to transfer private assets. By creating trustline for the first time, the asset is created automatically and can be used in the transactions.  
Account setting rippling must be enabled on the issuer account before the trust line creation to asset work correctly. Creating a trust line will cause an additional 5 XRP to be blocked on the account.  
  
This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, [Tatum KMS](https://github.com/tatumio/tatum-kms) should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

## Request body

- union
  - TrustLineXrpBlockchain
    - `fromAccount` string, required: XRP account address. Must be the one used for generating deposit tags.
    - `issuerAccount` string, required: Blockchain address of the issuer of the assets to create trust line for.
    - `limit` string, required: Amount of the assets to be permitted to send over this trust line. 0 means deletion of the trust line.
    - `token` string, required: Asset name. Must be 160bit HEX string, e.g. SHA1.
    - `fromSecret` string, required: Secret for account. Secret, or signature Id must be present.
    - `fee` string: Fee to be paid, in XRP. If omitted, current fee will be calculated.
  - TrustLineXrpBlockchainKMS
    - `fromAccount` string, required: XRP account address. Must be the one used for generating deposit tags.
    - `issuerAccount` string, required: Blockchain address of the issuer of the assets to create trust line for.
    - `limit` string, required: Amount of the assets to be permitted to send over this trust line. 0 means deletion of the trust line.
    - `token` string, required: Asset name. Must be 160bit HEX string, e.g. SHA1.
    - `signatureId` string, uuid, required: Identifier of the secret associated in signing application. Secret, or signature Id must be present.
    - `fee` string: Fee to be paid, in XRP. If omitted, current fee will be calculated.

## Response `200`

OK

- union
  - TransactionHash
    - `txId` string, required: The hash (ID) of the transaction
  - SignatureId
    - `signatureId` string, uuid, required: The internal Tatum ID of the prepared transaction for Key Management Sysytem (KMS) to sign<br/>This is different from the <code>signatureId</code> parameter that you provided in the request body. The <code>signatureId</code> parameter in the request body specifies the signature ID associated with the private key in KMS.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403`: Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.
- `500`: Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.dev/tatum/apis/blockchain.md) - [All operations](https://skmtc.dev/tatum/apis/blockchain/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/blockchain/revisions/f9623a85f420?raw)
