Base32 Decoder API¶
Overview¶
Decode Base32-encoded text. Body mode processes the request synchronously. URL and pre-uploaded file modes submit an asynchronous job.
The decoder accepts lowercase Base32 and ignores spaces, tabs, carriage returns, and line feeds in the encoded input. Other decoding behavior, including the specific error code for invalid Base32 input, is not established by the supplied source.
Endpoint¶
| Property | Value |
|---|---|
| Method | POST |
| URL | https://api.apidatatools.com/base32-decoder-api |
Authentication¶
Include your API key in the x-api-key header:
x-api-key: YOUR_API_KEY
Input modes¶
Select a mode with x-source-type. If omitted, the mode is body.
| Mode | Processing | Input |
|---|---|---|
body | Synchronous | Raw Base32-encoded text |
url | Asynchronous | JSON object containing a URL |
file | Asynchronous | JSON object containing a pre-uploaded file reference |
Headers¶
Header names are case-insensitive. The lowercase spellings are shown below.
| Header | Type | Required | Default / values | Description |
|---|---|---|---|---|
x-api-key | String | Yes | Your API key | Authenticates the request. |
x-source-type | String | No | Default: body. Values: body, url, file | Selects synchronous body processing or asynchronous URL/file processing. |
x-record-path | String | No | Not established for this endpoint | This header is detected in the supplied metadata, but an effect on Base32 decoding is not established by the supplied source. |
x-root-name | String | No | Not established for this endpoint | This header is detected in the supplied metadata, but an effect on Base32 decoding is not established by the supplied source. |
x-tab-space | String | No | Not established for this endpoint | This header is detected in the supplied metadata, but an effect on Base32 decoding is not established by the supplied source. |
Accepted file extensions¶
For URL and file modes, the accepted input extensions are txt and log.
Request body¶
Body mode¶
Send the Base32-encoded input as raw text, not as a JSON string.
URL mode¶
Send a JSON object with a url property:
{
"url": "https://example.com/input.txt"
}
File mode¶
Send a JSON object with a file property. Use the exact storage key returned by the upload workflow.
{
"file": "S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"
}
curl examples¶
Body mode¶
curl --request POST \
'https://api.apidatatools.com/base32-decoder-api' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-source-type: body' \
--data-raw 'JBSWY3DPEBLW64TMMQ======'
URL mode¶
curl --request POST \
'https://api.apidatatools.com/base32-decoder-api' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-source-type: url' \
--data-raw '{"url":"https://example.com/input.txt"}'
File mode¶
curl --request POST \
'https://api.apidatatools.com/base32-decoder-api' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-source-type: file' \
--data-raw '{"file":"S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"}'
Success responses¶
Synchronous body mode¶
A successful file-producing response has request_id, status, file, and preview. The file value is a download URL; the preview is a string.
{
"request_id": "REQUEST_ID",
"status": "success",
"file": "https://downloads.apidatatools.com/OUTPUT_FILE",
"preview": "Decoded output preview"
}
Asynchronous URL and file modes¶
A successfully accepted asynchronous request returns HTTP 202:
{
"status": "accepted",
"job_id": "JOB_ID",
"status_url": "https://api.apidatatools.com/jobs/JOB_ID",
"request_id": "REQUEST_ID"
}
Async job status¶
Check a job with GET https://api.apidatatools.com/jobs/{job_id}. Include your API key.
curl --request GET \
'https://api.apidatatools.com/jobs/JOB_ID' \
--header 'x-api-key: YOUR_API_KEY'
The status response includes request_id, job_id, status, created_at, and updated_at.
Queued or processing¶
For a job that is queued or processing, the status response also includes message and retry_after:
{
"request_id": "REQUEST_ID",
"job_id": "JOB_ID",
"status": "queued",
"created_at": 1700000000,
"updated_at": 1700000000,
"message": "Your job is being processed.",
"retry_after": 2
}
The status value is the current job state, such as queued or processing.
Success¶
A successful job includes result. For this file-producing converter, the result contains status, file, and preview.
{
"request_id": "REQUEST_ID",
"job_id": "JOB_ID",
"status": "success",
"created_at": 1700000000,
"updated_at": 1700000001,
"result": {
"status": "success",
"file": "https://downloads.apidatatools.com/OUTPUT_FILE",
"preview": "Decoded output preview"
}
}
Failed¶
A failed job includes an error object with code, message, and details.
{
"request_id": "REQUEST_ID",
"job_id": "JOB_ID",
"status": "failed",
"created_at": 1700000000,
"updated_at": 1700000001,
"error": {
"code": "ERROR_CODE",
"message": "Error message",
"details": {
"message": "Error message"
}
}
}
Error handling¶
Errors use an envelope with status, error, request_id, and details.message. Additional fields may appear in details.
{
"status": "error",
"error": "ERROR_CODE",
"request_id": "REQUEST_ID",
"details": {
"message": "Error message"
}
}
The following statuses are established by the supplied request and job-handling source:
| HTTP status | Error codes | When it applies |
|---|---|---|
400 | INVALID_SOURCE_TYPE, INVALID_BODY_ENCODING, EMPTY_BODY | Unsupported source type, invalid request-body encoding, or an empty request body. |
400 | INVALID_BODY, INVALID_URL, URL_UNREACHABLE, URL_NOT_OK, INVALID_FILE, FILE_UNAVAILABLE, INVALID_FILE_EXTENSION | Invalid asynchronous request body or URL/file input, or an unavailable or unsupported input. |
400 | INVALID_JOB_ID, JOB_NOT_FOUND, FORBIDDEN, DDB_ERROR | Job status lookup errors. |
400 | Tool execution errors | The request reaches processing but a tool execution error occurs. The supplied source does not establish the Base32 decoder’s specific invalid-input error code. |
401 | UNAUTHORIZED | Authentication is missing or unauthorized. |
404 | USER_NOT_FOUND, UNKNOWN_FUNCTION | The authenticated user or requested endpoint is not found. |
413 | PAYLOAD_TOO_LARGE, FILE_TOO_LARGE | The request body or input file exceeds the applicable plan limit. |
429 | QUOTA_EXCEEDED, RATE_LIMITED | The applicable plan quota or rate limit is exceeded. |
500 | PLAN_NOT_FOUND, INTERNAL_ERROR, CONFIG_ERROR, PLAN_CONFIG_ERROR | Plan configuration, asynchronous job configuration, or request processing fails. |
Notes¶
- Body mode is synchronous; URL and file modes are asynchronous.
- Body-size, file-size, quota, rate, and download-retention limits depend on the plan. See tool limits.
- Download URLs are temporary. Their retention period depends on the plan.