Skip to main content
POST
/
craft-send
craft-send
curl --request POST \
  --url https://api.jup.ag/send/v1/craft-send \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "inviteSigner": "7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV",
  "sender": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
  "amount": "1000000",
  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
'
import requests

url = "https://api.jup.ag/send/v1/craft-send"

payload = {
"inviteSigner": "7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV",
"sender": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
"amount": "1000000",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inviteSigner: '7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV',
sender: 'BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV',
amount: '1000000',
mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
})
};

fetch('https://api.jup.ag/send/v1/craft-send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jup.ag/send/v1/craft-send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inviteSigner' => '7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV',
'sender' => 'BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV',
'amount' => '1000000',
'mint' => 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.jup.ag/send/v1/craft-send"

payload := strings.NewReader("{\n \"inviteSigner\": \"7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV\",\n \"sender\": \"BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV\",\n \"amount\": \"1000000\",\n \"mint\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.jup.ag/send/v1/craft-send")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"inviteSigner\": \"7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV\",\n \"sender\": \"BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV\",\n \"amount\": \"1000000\",\n \"mint\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.jup.ag/send/v1/craft-send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inviteSigner\": \"7nE9GJoYHNmtaQvTQpota3KV2oz4pQ2dA6nvYK8EUJHV\",\n \"sender\": \"BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV\",\n \"amount\": \"1000000\",\n \"mint\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"\n}"

response = http.request(request)
puts response.read_body
{
  "tx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAEN...",
  "expiry": "2025-03-22T10:30:00.000Z",
  "totalFeeLamports": "5000"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
inviteSigner
string
required
  • Public key address generated from the hash of the invite code
  • Do note that, the invite code requires to be generated client side, refer to docs
  • Please handle invite code and secret key with highest security as user funds are involved
sender
string
required
  • Public key address of the sender
  • This address will be funding the amount to be sent and the token accounts involved
amount
string
required
  • Amount in atomic value (before decimals)
  • E.g. to send 1 USDC is equivalent of amount='1000000'
  • Do note that there will be additional SOL amount being used in the transaction for transaction fees and token accounts
mint
string
  • Defaults to WSOL mint
  • Only pass in this parameter with other mint when required

Response

Successful response

tx
string
required
  • Base64-encoded unsigned Send transaction
expiry
string
required
  • Unix timestamp of when the invite will expire
  • Expired invites will automatically clawback to sender
totalFeeLamports
string
required
  • Amount of fees required for network's transaction fee and token accounts