Use this endpoint to burn your tokens and get back the SOL. You get the SOL usually (0.002) from closing the token account and reclaiming back the rent fee.

Endpoint

POST https://pumpapi.fun/api/burn_tokens

Request Body

The request body should contain the following parameters:

ParameterTypeDescription
mintstringThe mint address of the token to be burned
priorityFeenumberThe priority fee for the transaction
userPrivateKeystringThe user’s private key

Request Example

Response

The response will contain the result of the burn token transaction.

ParameterTypeDescription
transactionIdstringThe ID of the transaction
statusstringThe status of the transaction (e.g. “success” or “failed”)
messagestringA message describing the result of the transaction

Response Example

{

  tx_hash: '5aowX9pPiRHXvc5TS6FpbExENnyo9n3N4Jnu35GjPAz...'

}


Required Parameters

The following parameters are required in the request body:

  • mint: The mint address of the token to be burned
  • priorityFee: The priority fee for the transaction
  • userPrivateKey: The user’s private key

Error Codes

  • 400 Bad Request: Invalid request parameters or missing required fields.
  • 401 Unauthorized: Authentication failed.
  • 404 Not Found: The requested resource (endpoint) is not found.
  • 429 Too Many Requests: Rate limit exceeded.
  • 500 Internal Server Error: Unexpected server-side error.

API Codes

  • 200 OK: The request was successful.