apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert CSV to XML API

Hosted on ApyHub

What it does

CSV to XML Converter turns CSV data into XML in three input modes: upload a CSV file, send raw CSV text, or point to a publicly accessible CSV URL. You can return the result as a downloadable XML file, an inline XML string, or a pre-signed S3 URL, depending on how you want to consume the output.

Use the file-based endpoints when you already have a CSV on disk or in a multipart upload. Use the raw-body endpoints when your CSV is already in request payload form. Use the URL-based endpoints when the source CSV lives elsewhere and you want the service to fetch it for you. For URL inputs, the endpoint validates that the remote resource is actually served as CSV or plain text, or that the response points to a .csv file.

The XML output is useful when you need to move tabular data into systems that expect hierarchical or document-style payloads, such as downstream integrations, exports, or legacy import pipelines. Some variants also accept the headers_absent query flag, which lets you tell the converter whether the CSV includes a header row.

If you need the converted data as a file, choose the endpoints that return binary XML. If you need a text response for immediate parsing, choose the raw XML endpoints. If you need a hosted result you can fetch later, choose the S3 URL variants.

▣ ENDPOINT 01 / 09
POST
Convert uploaded CSV file → downloadable XML file
http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-file
QUICKSTARTGUIDE

Quickstart

Convert a CSV file to XML by uploading the CSV and downloading the converted XML file.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"

What you'll get back

Returns a downloadable XML file as a binary response.

<?xml version="1.0" encoding="UTF-8"?>
...
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into an XML file and returns the result as a downloadable binary response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name/prefix for the generated file. Default: sample-output.
headers_absentENUMNoWhether the CSV file has no headers. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Binary file upload.

Response

Returns a downloadable XML file as a binary response. The output schema is a single binary value, so the success payload is the converted file itself rather than a JSON object.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 09
POST
Convert raw CSV body → S3 signed URL
http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-url
QUICKSTARTGUIDE

Quickstart

Convert raw CSV text to XML by sending the CSV in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-url?output=my-converted-data&headers_absent=true" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;Name,Age,City\nAlice,30,New York\nBob,25,London\nCharlie,35,Sydney'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://example-bucket.s3.amazonaws.com/converted-file.xml"
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Raw CSV content.

About this endpoint

What it does

Converts raw CSV content sent in the request body into a file and returns a pre-signed S3 URL where the converted output can be downloaded.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. Default: sample-output.
headers_absentENUMNoIndicates whether the CSV has no header row. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a JSON object with a data string field containing a URI to a pre-signed S3 URL for the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ ENDPOINT 03 / 09
POST
Convert CSV at URL → downloadable XML file
http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-file
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into an XML file by sending the CSV URL in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-file?output=my-converted-data&headers_absent=true" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a downloadable XML file as binary content. The response body is a file stream, not a JSON object.

...binary XML file content...
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible URL pointing to a CSV file.

About this endpoint

What it does

Converts a CSV file from a public URL into a downloadable XML file. The request provides the source CSV URL, and the response returns the generated XML as a binary file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name. Default: sample-output.
headers_absentENUMNoIndicates whether the CSV has no header row. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file. Format: URI.

Response

Returns a downloadable XML file as a binary response containing the converted data.

ParameterTypeMandatoryDescription
binaryStringYesDownloadable XML file containing the converted data.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 09
POST
Convert CSV at URL → inline XML string
http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-raw
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into XML with a single JSON request body.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a plain string containing the generated XML.

<xml>...</xml>
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible URL pointing to a CSV file. The endpoint validates that the response Content-Type is `text/csv` or `text/plain; charset=UTF-8`, or that the Content-Disposition header references a `.csv` file.

About this endpoint

What it does

Converts a CSV file available at a public URL into an inline XML string. The request sends the CSV URL in the body, and the response is a raw string containing the generated XML.

Query Parameter(s)

AttributeTypeMandatoryDescription
headers_absentENUMNoWhether the CSV source should be treated as having no headers. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file. The endpoint validates that the response Content-Type is text/csv or text/plain; charset=UTF-8, or that the Content-Disposition header references a .csv file.

Response

Returns a raw XML string in the response body.

Query parameters

Name
Type
Description
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 05 / 09
POST
Convert uploaded CSV file → inline XML string
http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-raw
QUICKSTARTGUIDE

Quickstart

Convert one CSV file to XML by uploading the file as multipart form data.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"

What you'll get back

Returns a plain string containing the XML output.

<...xml...>
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert. Accepted MIME types: `text/csv`, `text/plain`, `application/vnd.ms-excel`, `application/csv`, `application/octet-stream`.

About this endpoint

What it does

Converts an uploaded CSV file into an inline XML string. The request uploads a single CSV file, and the response is a plain string containing the XML output.

Query Parameter(s)

AttributeTypeMandatoryDescription
headers_absentENUMNoControls whether the CSV has no headers. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Accepted MIME types: text/csv, text/plain, application/vnd.ms-excel, application/csv, application/octet-stream.

Response

Returns a plain string containing the converted XML output. The success response is a raw string value, not a JSON object.

ParameterTypeMandatoryDescription
valueStringYesThe XML string produced from the uploaded CSV file.

Query parameters

Name
Type
Description
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 06 / 09
POST
Convert uploaded CSV file → S3 signed URL
http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-url
QUICKSTARTGUIDE

Quickstart

Upload a CSV file to convert it to XML and return a pre-signed download URL.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-file-xml-url?output=my-converted-data" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.csv"

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
CSV file to convert.

About this endpoint

What it does

Converts an uploaded CSV file into XML and returns a JSON object containing a pre-signed S3 URL for the converted file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. Default: sample-output.
headers_absentENUMNoWhether the CSV file has no headers.<br>Allowed values: true, false.<br>Default: false.

Request Body

ParameterTypeMandatoryDescription
fileStringYesCSV file to convert. Format: binary.

Response

Returns a JSON object with a required data string field in URI format. The data value is the pre-signed S3 URL to the converted file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 07 / 09
POST
Convert raw CSV body → downloadable XML file
http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-file
QUICKSTARTGUIDE

Quickstart

Convert raw CSV text into XML and download the generated file.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-file?output=my-converted-data&headers_absent=true" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;Name,Age,City\nAlice,30,New York\nBob,25,London\nCharlie,35,Sydney'

What you'll get back

Returns a binary XML file download containing the converted data.

...binary XML file...
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Raw CSV content.

About this endpoint

What it does

Converts raw CSV content submitted in the request body into a downloadable XML file. The response is a binary file stream containing the converted XML data.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or label. Default: sample-output.
headers_absentENUMNoWhether the CSV has no header row. Allowed values: true, false. Default: false.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a binary file (string with format: binary) containing the converted XML data.

ParameterTypeMandatoryDescription
dataStringNoBinary XML file content.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ ENDPOINT 08 / 09
POST
Convert raw CSV body → inline XML string
http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-raw
QUICKSTARTGUIDE

Quickstart

Send raw CSV text in the request body to convert it to XML.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-raw-xml-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: text/plain" \
  --data-binary #x27;Name,Age,City\nAlice,30,New York\nBob,25,London\nCharlie,35,Sydney'

What you'll get back

Returns a plain string containing the XML output.

<...>
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Raw CSV content.

About this endpoint

What it does

Converts a raw CSV payload in the request body into an XML string. The response is returned as a plain string containing the generated XML.

Query Parameter(s)

AttributeTypeMandatoryDescription
headers_absentENUMNoAllowed values: true, false. Default: false. Indicates whether the CSV input includes headers.

Request Body

ParameterTypeMandatoryDescription
bodyStringYesRaw CSV content.

Response

Returns a plain string containing the XML output. The success response body is a single string value.

ParameterTypeMandatoryDescription
stringStringYesXML generated from the CSV input.

Query parameters

Name
Type
Description
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
string
Raw CSV content.
▣ ENDPOINT 09 / 09
POST
Convert CSV at URL → S3 signed URL
http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-url
QUICKSTARTGUIDE

Quickstart

Convert a CSV file from a public URL into XML by sending the CSV URL in the JSON body.

curl -X POST "http://localhost:8080/apyhub/convert-csv-to-xml/csv-url-xml-url?output=sample-output&headers_absent=false" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.csv"}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted file.

{
  "data": "https://..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Publicly accessible URL pointing to a CSV file.

About this endpoint

What it does

Converts a CSV file from a publicly accessible URL into XML and returns a pre-signed S3 URL for the converted file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name/prefix. Default: sample-output.
headers_absentENUMNoWhether the source CSV has no header row.<br>Allowed values: true, false.<br>Default: false.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a CSV file. Format: URI.

Response

Returns a JSON object with a required data string field containing a pre-signed S3 URL to the converted file. Success response shape: object with data as a URI string.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
headers_absentOPTIONAL
string
true · false
DEFAULT false

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.