Ledger Enterprise
API Documentation V1
API Documentation V1
  • GETTING STARTED
    • Welcome
    • Getting Started
    • Authentication
    • Rate Limits
    • Pagination
  • tutorials
    • Register a new API User
    • First Steps as an API User
    • Generate Reporting API Keys
    • Manage Reporting API Keys
  • REFERENCE
    • API reference
      • Accounts
        • Addresses
        • Balances
          • History
        • Currency
        • History
        • Labels
        • Nft collections
        • Nft portfolio
        • Nfts
        • Sync
        • Tokens
        • Erc20 children accounts
      • Api users
        • Register
      • Currencies
        • Tokens
      • Digests
        • History
      • Entities
        • History
        • Users
      • Groups
        • History
      • Labels
      • Messages
        • History
      • Organization
      • Pledges
      • Requests
        • Approve
        • Challenge
          • Reject
        • Governance status
        • Reject
      • Settlements
      • Transactions
        • Estimate fees
        • Fees
        • Approve
        • History
        • Labels
        • Reject
      • Users
        • History
      • Whitelists
        • History
      • Auth
        • Token
          • Refresh
      • Compliance
        • Address risk
        • Sanctions
      • Notifications
        • Configuration
    • Specification
Powered by GitBook
On this page
  1. REFERENCE
  2. API reference
  3. Accounts

Labels

PreviousHistoryNextNft collections

Remove a Label to the Account matching the ID

delete

This post endpoint remove the Label from the account matching the IDs passed in url

Authorizations
Path parameters
account_idintegerRequired

The account's ID

label_idintegerRequired

The label's ID

Responses
200
Whether or not the Label has been successfully removed
application/json
404
Account or Label does not exist
application/json
delete
DELETE /accounts/{account_id}/labels/{label_id} HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true
}
  • GETGet an account's labels
  • POSTAdd a Label to the Account matching the ID
  • DELETERemove a Label to the Account matching the ID

Get an account's labels

get

This method returns the account's labels.

Authorizations
Path parameters
account_idintegerRequired

The account's ID

Responses
200
Account object
application/json
404
Account not found
application/json
get
GET /accounts/{account_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "id": 1,
    "info": {
      "color": "#fe3423",
      "description": "Flag resources as potentially harmfull"
    },
    "name": "SPAM"
  }
]

Add a Label to the Account matching the ID

post

This post endpoint set the Label matching the ID passed in the payload to the Account matching the ID passed in the url

Authorizations
Path parameters
account_idintegerRequired

The account's ID

Body
label_idintegerRequired

ID of the label to add to the resource

Example: 42
Responses
200
Whether or not the Label has been successfully attached
application/json
404
Account or Label does not exist
application/json
post
POST /accounts/{account_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "label_id": 42
}
{
  "success": true
}