Decrypt data
curl --request POST \
--url https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt \
--header 'Content-Type: application/json' \
--header 'X-Qanapi-Authorization: <api-key>' \
--data '
{
"name": "John Smith",
"email": "john@example.com",
"ssn": "qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$",
"dob": "qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$",
"address": "123 Main St"
}
'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt"
payload = {
"name": "John Smith",
"email": "john@example.com",
"ssn": "qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$",
"dob": "qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$",
"address": "123 Main St"
}
headers = {
"X-Qanapi-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Qanapi-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Smith',
email: 'john@example.com',
ssn: 'qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$',
dob: 'qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$',
address: '123 Main St'
})
};
fetch('https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Smith',
'email' => 'john@example.com',
'ssn' => 'qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$',
'dob' => 'qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$',
'address' => '123 Main St'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Qanapi-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qanapi-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt")
.header("X-Qanapi-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qanapi-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}"
response = http.request(request)
puts response.read_body{
"name": "John Smith",
"email": "john@example.com",
"ssn": "123-45-6789",
"dob": "1980-01-01",
"address": "123 Main St"
}{
"message": "Bad request."
}{
"message": "Unauthorized."
}{
"message": "User does not have the right permissions."
}{
"message": "Resource not found."
}{
"message": "An unexpected error occurred."
}Encryption
Decrypt data
POST
/
encryption
/
{proxy}
/
decrypt
Decrypt data
curl --request POST \
--url https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt \
--header 'Content-Type: application/json' \
--header 'X-Qanapi-Authorization: <api-key>' \
--data '
{
"name": "John Smith",
"email": "john@example.com",
"ssn": "qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$",
"dob": "qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$",
"address": "123 Main St"
}
'import requests
url = "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt"
payload = {
"name": "John Smith",
"email": "john@example.com",
"ssn": "qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$",
"dob": "qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$",
"address": "123 Main St"
}
headers = {
"X-Qanapi-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Qanapi-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Smith',
email: 'john@example.com',
ssn: 'qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$',
dob: 'qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$',
address: '123 Main St'
})
};
fetch('https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Smith',
'email' => 'john@example.com',
'ssn' => 'qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$',
'dob' => 'qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$',
'address' => '123 Main St'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Qanapi-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt"
payload := strings.NewReader("{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Qanapi-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt")
.header("X-Qanapi-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.qanapi.cloud/api/v3/encryption/{proxy}/decrypt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Qanapi-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Smith\",\n \"email\": \"john@example.com\",\n \"ssn\": \"qanapi:MQ:MDFreWVwc2hkMjE2d2N2dHlyZ3NtbXR0M2M:Un9XLlZVXEhQVK/+MiOAiw:$\",\n \"dob\": \"qanapi:MQ:MDFreWVwc2hkOTUwMTkwejUya3I5eHM4OGI:F9ArUSbZ9qrfjX7zN+Fk/Q:$\",\n \"address\": \"123 Main St\"\n}"
response = http.request(request)
puts response.read_body{
"name": "John Smith",
"email": "john@example.com",
"ssn": "123-45-6789",
"dob": "1980-01-01",
"address": "123 Main St"
}{
"message": "Bad request."
}{
"message": "Unauthorized."
}{
"message": "User does not have the right permissions."
}{
"message": "Resource not found."
}{
"message": "An unexpected error occurred."
}Authorizations
Headers
Comma separated list of fields to decrypt. You can use dot notation to access nested fields.
Path Parameters
The proxy slug of the encryption configuration.
Body
application/json
A JSON object to decrypt fields on. A maximum depth of 32 is allowed.
Response
Decrypted data
The response is of type object.
⌘I