API Documentation
This documentation provides an overview of the API's capabilities, the structure of requests and responses, and the components involved. This should be useful for developers interacting with the BARK protocol via the API.
Introductions: BARK Actions Server API
Overview
The BARK "Solana" Actions Server API allows interaction with the BARK protocol on the Solana blockchain. The API includes endpoints for minting NFTs, processing donations in SOL, USDC, and BARK and SPL tokens, and provides transaction management functionality.
Base URLs
Production:
https://api.actions.barkprotocol.net/v1Development:
http://localhost:3000/v1
Endpoints
1. Mint NFT
Endpoint:
/api/mintMethod:
POSTDescription: Mints a new BARK NFT with custom metadata.
Request Body:
{ "name": "NFT Name", "symbol": "NFTSYMBOL", "uri": "https://example.com/metadata.json" }Response:
200 OK:
{ "message": "NFT minted successfully", "transactionId": "TransactionIDHere" }400 Bad Request:
{ "message": "Invalid request data" }500 Internal Server Error:
{ "message": "Server error during minting" }
2. Donate SOL
Endpoint:
/api/donate/solMethod:
POSTDescription: Processes a donation of SOL to the specified treasury address.
Request Body:
Response:
200 OK:
400 Bad Request:
500 Internal Server Error:
3. Donate USDC
Endpoint:
/api/donate/usdcMethod:
POSTDescription: Processes a donation of USDC to the specified treasury address.
Request Body:
Response:
200 OK:
400 Bad Request:
500 Internal Server Error:
4. Donate BARK
Endpoint:
/api/donate/barkMethod:
POSTDescription: Processes a donation of BARK tokens to the specified treasury address.
Request Body:
Response:
200 OK:
400 Bad Request:
500 Internal Server Error:
Components
Schemas
MintNftRequest
Type:
objectProperties:
name(string): The name of the NFT. Required.symbol(string): The symbol for the NFT. Required.uri(string): The URI pointing to the NFT metadata. Required.
Example:
MintNftResponse
Type:
objectProperties:
message(string): Success message.transactionId(string): The transaction ID of the mint operation.
Example:
DonateRequest
Type:
objectProperties:
account(string): The public key of the sender's Solana account. Required.amount(string): The amount of SOL, USDC, or BARK tokens to donate. Required.priority(string): The priority level of the transaction. Required. (Values:VeryHigh,High,Medium,Low,Min)
Example:
DonationResponse
Type:
objectProperties:
message(string): Success message indicating the donation was processed.transactionId(string): The transaction ID of the donation.
Example:
ErrorResponse
Type:
objectProperties:
message(string): Error message indicating what went wrong.
Example:
Tags
NFT: Operations related to NFT minting.
Donation: Operations related to donations in SOL, USDC, BARK, and SPL tokens.
Last updated