Machine-readable reference: the full OpenAPI specification documents every endpoint, field and error (openapi.yaml - import it into Postman, Insomnia or a client generator).

Upload ADIF Contact (PHP example)

Use the following example to integrate the QSL Master in your PHP application.

Note: Each api_key is associated with a single callsign, the station_callsign or operator field MUST COMPLETELY MATCH the callsign associated with the API key.

Format: The api is flexible, uppercase or lowercase, new lines and spaces between values are not required.

Contacts: The API processes one contact per request. To upload multiple contacts, make multiple API calls.

Dupes: Identical records are rejected, dupes are where the `call` and `qso_date` and `time_on` (to the minute) are the same. This rule may be revised.

Updating/Deleting: Not supported. Only submit to us when the record is known to be good. (This is because the Email will be sent and that can't be undone).

AI Assistant Access (MCP)

As well as the REST endpoints above, your account is reachable over MCP - the protocol AI assistants use to connect to outside services. Point one at QSL Master and you can log a contact, look through the cards you have received and pull up a card image just by asking, without writing any code.

Add it to any MCP client as a streamable HTTP server. It authenticates with the same API key as the REST endpoints, sent as a bearer token; your key is on your home page.

Transport Streamable HTTP (POST, JSON-RPC 2.0)
Server URL https://QslMaster.com/api/user/mcp
Header Authorization: Bearer YOUR_API_KEY

Whatever your client calls these, that is all it needs.

Available Tools

  • whoami - the callsign, grid and subscription status this connection belongs to.
  • add_contact - log one QSO from an ADIF record, which queues a QSL card by email. Your station_callsign is filled in automatically, so the assistant cannot log a contact under anyone else's call.
  • get_qsls - the cards other operators have sent you, filtered by date, callsign, band or mode.
  • get_qsl_card - one card in full, with a link to the image, or the image itself on request.

Your API key is the key to your account. An assistant you connect can log contacts as you and read the cards you have received, so treat the connection the way you would treat being logged in. It can only ever see your account - no tool takes another callsign.

The same 90-day rule and duplicate checks apply as on the REST endpoint, because it is the same code underneath.

Please do not upload historical contacts. This service is for NEW contacts or very recent activations only. QSOs logged 90+ days ago will be rejected.

<?php
$apiKey = '[users-api-key-here]';

$adifData = <<<ADIF
<station_callsign:4>W1AW
<call:5>AB1CD 
<email:15>[email protected] 
<mode:3>SSB 
<band:3>40m 
<freq:5>7.127 
<freq_rx:5>7.130
<prop_mode:3>ION
<qso_date:8>20251231
<time_on:4>2355
<rst_sent:2>59
<rst_rcvd:2>59
<gridsquare:6>FN42
<my_gridsquare:6>FN42
<country:3>USA
<my_country:3>USA
<dxcc:3>291
<my_dxcc:3>291
<my_sig:4>POTA
<my_sig_info:6>US-001
<sig_info:6>US-002
<comment:19>Thanks for the QSO!
<eor>
ADIF;

$response = curl_exec(curl_init([
    CURLOPT_URL => 'https://qslmaster.com/api/add-adif',
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: ' . $apiKey],
    CURLOPT_POSTFIELDS => ['ADIF' => $adifData],
]));

echo $response ?: 'Error: ' . curl_error($ch);
?>

            

Response Format

The API uses standard HTTP status codes to indicate success or failure:

Success Response (200 OK)

{
    "status": "ok",
    "id": 12345
}

            

The id field contains the unique identifier for the created QSL record.

Error Response Codes

  • 401 Unauthorized: Invalid or missing API key
  • 409 Conflict: Duplicate contact (already exists)
  • 422 Unprocessable Entity: Validation errors
    • Invalid or mismatched station callsign
    • Missing required fields (CALL, QSO_DATE, TIME_ON, MODE, FREQ, BAND)
    • Invalid datetime format
    • Contact older than 90 days
    • Contact dated more than 24 hours in the future (log in UTC)
    • Empty or invalid ADIF data
  • 500 Internal Server Error: Server-side errors

Error responses include a descriptive message:

{
    "message": "Missing required field: CALL"
}

            

Please do not upload historical contacts. This service is for NEW contacts or very recent activations only. QSOs logged 90+ days ago will be rejected.