# API

**GET claim-links/:link\_id**

```
Fetches claim links params by link ID. Link ID is derived from the Link Key. 
  Params:
    - link_id - ID of link
  Return:
    - success: boolean, indicating whether the operation was successful
    - data: 
      - creator_address - address of the user created the campaign
      - sponsored - did creator sponsor campaign (boolean)
      - chain_id - chain id
      - campaign_number - a sequential number for each proxy contract generated by client. For every user starts from 1 and sequentially updated (like a counter) for each new user campaign.  
      - token_address - contract address of the token
      - token_standard - token standard type (erc-721, etc.)
      - symbol - token symbol
      - wallet - default wallet application for claim (metamask, etc.)
      - claim_pattern - the way token will be transfered to user (mint or transfer)
      - token_id - token id for the link (always null for ERC20 campaigns)
      - token_amount - amount of tokens for the link (always null for ERC721 campaigns) 
      - sender_signature - signature obtained by signing link id with the signer key (null if the link is not active)
      - proxy_contract_version - proxy contract version    
      - wei_amount - amount of native tokens attached to the link (0 by default)
      - expiration_time - UNIX timestamp corresponding to the latest datetime to claim the link
      - active - boolean, if link can be claimed. 
```

**GET claim-links/:link\_id/status**

```
Gets link's data: status, recipient address, claim transaction hash and when it was claimed.
  Params:
    - link_id - ID of the link
  Return:
    - success: boolean, indicating whether the operation was successful
    - data: 
      - link_id - ID of the link
      - status - claim status of the link, can be one of the following: "CREATED", "PENDING", "CLAIMED", "FAILED", "DEACTIVATED", "EXPIRED" // #TODO add  "CAMPAIGN_PAUSED", "CAMPAIGN_STOPPED"
      - recipient - address of the recipient, present only if status is CLAIMED, PENDING, or FAILED
      - tx_hash - claim transaction hash, present only if status is CLAIMED, PENDING, or FAILED
      - claimed_at_block - block number, when the link was claimed, present only if status is CLAIMED
      - created_at - UNIX timestamp, when the link was created
```

**POST claim-links/:link\_id/claim**

```
Initiates claim transaction on behalf of a receiver.
  Params:
    - link_id - ID of the link
  Body:
    - receiver_address - Ethereum address to redeem the tokens to
    - receiver_signature - ECDSA signature, obtained by reciever by signing the receiver address with the link key. 
  Return:
    - success: boolean, indicating whether the operation was successful
    - data: 
      - tx_hash - claim transaction hash

Errors:
   - If claim link is deactivated, the request returns success: false (422 http code error) - "The claim link is deactivated"
   - If claim link is not sponsored, the request returns success: false (422 http code error) - "The claim link is not sponsored"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linkdrop.io/linkdrop-dashboard/dashboard-sdk-and-api/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
