Docs

Developers

Quickstart

Send your first Travel Rule transfer in the sandbox. It takes about five minutes and three steps.

Before you start: you need a login to the Ospree sandbox Dashboard. If you don’t have one, contact sales@ospree.io.

  1. 1

    Create API keys

    Create a sandbox key from Settings > Developer > API Keys in the Dashboard.

    The Create API key form with Label set to quickstart, an expiry date chosen, and Travel Rule set to Read & write. Sample data.

    Sample data.

    1. Click “Create API key”.

    2. Give it a Label, for example quickstart.

    3. Pick an Expiry date, up to one year from today.

    4. Under Access, set Travel Rule to “Read & write”. Leave the rest on “No access”.

    5. Click “Create key”, then “Copy API key”. The key is shown once and can’t be retrieved later.

    Add it to your .env:

    .env

    OSPREE_API_KEY="your-key"
    OSPREE_BASE_URL="https://sandbox.ospree.io/api/v2"

    To replace or revoke a key, see Authentication.

  2. 2

    Send your first transfer

    One call creates both accounts and sends the transfer to a test counterparty. Run this in a terminal where your .env values are loaded.

    Shell · Sample data

    curl -X POST "$OSPREE_BASE_URL/travelrule/transfers" \
    -H "Authorization: Bearer $OSPREE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "amount": 0.25,
    "dti": "4H95J0R2X",
    "protocol": "flow",
    "reference_id": "wd-20261203-000482",
    "beneficiary_vasp_id": "MLESJF",
    "originator_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
    "originator_address_is_self_hosted": false,
    "originator_account_reference_id": "cust-104582",
    "originator_account": {
    "account_type": "individual",
    "account_category": "customer",
    "customer_id": "cust-104582",
    "individual": { "individual_name": {
    "name_type": "LEGL", "name_first": "Daniel", "name_last": "Okafor" } }
    },
    "beneficiary_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
    "beneficiary_address_is_self_hosted": false,
    "beneficiary_account_reference_id": "ben-207731",
    "beneficiary_account": {
    "account_type": "individual",
    "account_category": "non-customer",
    "customer_id": "ben-207731",
    "individual": { "individual_name": {
    "name_type": "LEGL", "name_first": "Sofia", "name_last": "Lindgren" } }
    }
    }'

    What the request says:

    Field

    Meaning

    amount, dti

    How much, and which asset. 4H95J0R2X is Bitcoin.

    protocol

    The Travel Rule network the message travels over.

    reference_id

    Your own ID for the transfer, such as a withdrawal number.

    beneficiary_vasp_id

    The counterparty receiving the message. MLESJF is the sandbox test counterparty. [CONFIRM: sandbox VASP ID]

    originator_*

    Your customer and the wallet address they send from.

    beneficiary_*

    The recipient and the wallet address they receive at.

    customer_id

    Identifies each person. An individual needs a customer ID, full birth information, an address or a national ID.

    What you should see: a 201 response with the new transfer.

    JSON · Sample data

    {
    "status": "success",
    "data": {
    "transfer_id": "01a23e4f-9c2b-7d4a-8f31-6b0e5a927c14",
    "reference_id": "wd-20261203-000482",
    "amount": 0.25,
    "chain": "bitcoin",
    "symbol": "BTC",
    "protocol": "flow",
    "beneficiary_vasp_id": "MLESJF",
    "transfer_status": "INITIATED",
    "transfer_type": "INSTRUCTION"
    }
    }

    If it fails:

    Response

    Meaning

    Fix

    401

    The key is missing, expired or revoked

    Check OSPREE_API_KEY and the Bearer prefix

    403

    The key lacks Travel Rule write access [CONFIRM: cause of 403]

    Replace the key with Travel Rule set to Read & write

    422

    The payload was refused

    Read data[].msg in the response; it names the field and the problem

    200 instead of 201

    The reference_id was used before, so you got the earlier transfer back

    Change the reference_id and send again

  3. 3

    Track the transfer

    Look the transfer up with the reference_id you sent. The transfer_id from the response works too.

    Shell · Sample data

    curl "$OSPREE_BASE_URL/travelrule/transfers/wd-20261203-000482" \
    -H "Authorization: Bearer $OSPREE_API_KEY"


    The status is under data.transfer_data.transfer_status. The same response includes the originator and beneficiary records and both VASPs.

    API status

    In the Dashboard

    Meaning

    INITIATED

    In review

    Ospree has the transfer and is sending it

    REVIEW

    In review

    The counterparty has received it and is deciding

    ACCEPTED

    Accepted

    The counterparty confirmed the beneficiary


    A new transfer reaches REVIEW within a second or two. That means your first Travel Rule message has been delivered. It moves to ACCEPTED when the counterparty responds.

    Or watch it in the Dashboard: open Travel Rule and paste your reference_id into the search box.

    For every status, see Transfer Status.

Next steps

  • Complete the transfer. Once the funds move on-chain, call the complete action with the transaction hash.

  • Stop polling. Set up a webhook under Settings > Developer > Webhooks to be told when a status changes.

  • Handle a rejection. Send a transfer the counterparty refuses and read the reason.

  • Go live. Create a production key and switch OSPREE_BASE_URL.

  • See every flow.