Docs/APIs/Morse Code

Morse Code

Encode and decode Morse code

OperationalCredits 2 per callp50 233msData ProcessingStar

Overview

Send text to receive dot-and-dash sequences separated by spaces and slashes, along with total counts of dits, dahs, and characters. Decoding parses Morse strings back into text and isolates any unrecognized symbols. Paid plans can generate downloadable audio tone files with duration, frequency, and sample rate metadata.

Live Test Morse Code API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

POSThttps://api.apiverve.com/v1/morsecode
curl -X POST https://api.apiverve.com/v1/morsecode \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "audio": true,
  "text": "This Is A Message"
}'

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent as JSON in the request body. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
textRequiredstringThe text to encode or decode in Morse code
audioOptionalPremiumbooleanSet to true to include an audio file of the Morse code

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "This Is A Message",
    "morse": "- .... .. ... / .. ... / .- / -- . ... ... .- --. . ",
    "stats": {
      "characters": 17,
      "dits": 25,
      "dahs": 7
    },
    "valid": true,
    "audio": {
      "audioFile": "a11f9d7f-1fd2-4b10-86de-82defaf18c57.wav",
      "format": ".wav",
      "downloadURL": "https://storage.googleapis.com/apiverve/APIData/morsecode/a11f9d7f-1fd2-4b10-86de-82defaf18c57.wav?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1765925804&Signature=TiktgUsHV0ipCaRwNNiEihtD5e1SacBHBwWLGvsrnLJTkH%2BH5fRsII5hxk7nEqTypya05Dg4BHTxu672tRU%2Bhb3F8g%2BQYL7u3PMaCHzcnrrpcjSh0hH7%2BWVfEyHxPf5cCuKliISePCOlpbVsU8xtFL8p1DfgTV2FeD8Rmwo3SVpCG4LHpYXJWoZVET2IbS4dZS%2Brn9kvnoBvApgDJgc5EEufOZHYLba6278g0HTgQaOIhdSNhpeSpCwPuSw6q3eK%2FGqzhD5PtzTBMPN1hMvXIZPX11EYRG%2FLbqvltu6gVgbYL5khcG5zQbDse2vXphAys8fMq7PiZSGe1ODf63Gakw%3D%3D",
      "duration": "13.20s",
      "frequency": "600Hz",
      "sampleRate": "8000Hz",
      "expires": 1765925804517
    }
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
textstring"This Is A Message"Decoded text from the Morse code input
morsestring"- .... .. ... / .. ... / .- / -- . ... ... .- --. . "Original Morse code that was decoded
statsobject{...}Statistics about the Morse code decoding
charactersnumber17Total number of characters in decoded text
ditsnumber25Total count of dits (dots) in Morse code
dahsnumber7Total count of dahs (dashes) in Morse code
validbooleantrueWhether the Morse code is valid and properly formatted
audioPremiumobject{...}Audio file information including URL and metadata
audioFilePremiumstring"a11f9d7f-1fd2-4b10-86de-82defaf18c57.wav"Unique identifier for the generated audio file
formatPremiumstring".wav"Audio file format (e.g., .wav, .mp3)
downloadURLPremiumstring"https://storage.googleapis.com/apiverve/APIData/morsecode/a11f9d7f-1fd2-4b10-86de-82defaf18c57.wav?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1765925804&Signature=TiktgUsHV0ipCaRwNNiEihtD5e1SacBHBwWLGvsrnLJTkH%2BH5fRsII5hxk7nEqTypya05Dg4BHTxu672tRU%2Bhb3F8g%2BQYL7u3PMaCHzcnrrpcjSh0hH7%2BWVfEyHxPf5cCuKliISePCOlpbVsU8xtFL8p1DfgTV2FeD8Rmwo3SVpCG4LHpYXJWoZVET2IbS4dZS%2Brn9kvnoBvApgDJgc5EEufOZHYLba6278g0HTgQaOIhdSNhpeSpCwPuSw6q3eK%2FGqzhD5PtzTBMPN1hMvXIZPX11EYRG%2FLbqvltu6gVgbYL5khcG5zQbDse2vXphAys8fMq7PiZSGe1ODf63Gakw%3D%3D"Signed URL to download the generated audio file
durationPremiumstring"13.20s"Duration of the audio file in seconds
frequencyPremiumstring"600Hz"Frequency of the Morse code tone in Hz
sampleRatePremiumstring"8000Hz"Sample rate of the audio file in Hz
expiresPremiumnumber1765925804517Unix timestamp when the audio download URL expires

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

Ham Radio Training
Amateur radio training apps convert practice call signs and sentences into Morse strings to help students verify their manual keying.
Escape Room Puzzles
Game designers translate clue strings into dot-and-dash puzzles and count character lengths to calibrate challenge difficulty for players.
Assistive Communication Tools
Decode user input from single-switch sip-and-puff hardware into text while flagging invalid or unrecognized signal sequences immediately.
STEM Classroom Demonstrations
When teaching telecommunications history, physics teachers translate student messages into Morse code sequences to display exact dit and dah counts.

Other ways to use Morse Code

Set up Morse Code on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContext →Reference →

More in Data Processing:

Was this page helpful?