Skip to main content
POST
/
managed-accounts
Create Retailer Credentials
curl --request POST \
  --url https://api.zinc.com/managed-accounts \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>",
  "retailer": "<string>",
  "totp_secret": "<string>",
  "retailer_config": {}
}
'
import requests

url = "https://api.zinc.com/managed-accounts"

payload = {
    "email": "<string>",
    "password": "<string>",
    "retailer": "<string>",
    "totp_secret": "<string>",
    "retailer_config": {}
}
headers = {
    "Authorization": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    email: '<string>',
    password: '<string>',
    retailer: '<string>',
    totp_secret: '<string>',
    retailer_config: {}
  })
};

fetch('https://api.zinc.com/managed-accounts', 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://api.zinc.com/managed-accounts",
  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([
    'email' => '<string>',
    'password' => '<string>',
    'retailer' => '<string>',
    'totp_secret' => '<string>',
    'retailer_config' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: <api-key>",
    "Content-Type: application/json"
  ],
]);

$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://api.zinc.com/managed-accounts"

	payload := strings.NewReader("{\n  \"email\": \"<string>\",\n  \"password\": \"<string>\",\n  \"retailer\": \"<string>\",\n  \"totp_secret\": \"<string>\",\n  \"retailer_config\": {}\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("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://api.zinc.com/managed-accounts")
  .header("Authorization", "<api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"<string>\",\n  \"password\": \"<string>\",\n  \"retailer\": \"<string>\",\n  \"totp_secret\": \"<string>\",\n  \"retailer_config\": {}\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.zinc.com/managed-accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"<string>\",\n  \"password\": \"<string>\",\n  \"retailer\": \"<string>\",\n  \"totp_secret\": \"<string>\",\n  \"retailer_config\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "short_id": "<string>",
  "email": "<string>",
  "retailer": "<string>",
  "forwarding_email": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "has_totp": false,
  "has_forwarding": false,
  "is_paused": false,
  "locked_by_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "cooldown_minutes": 123,
  "last_used_at": "2023-11-07T05:31:56Z",
  "retailer_config": {}
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
Create new retailer credentials for order processing. Credentials are encrypted and stored securely.

Request Fields

  • email (required) - The email address for the retailer account
  • password - The password for the retailer account (encrypted at rest)
  • retailer - Retailer name (e.g., amazon). If omitted, applies as default credentials
  • totp_secret - TOTP secret key for two-factor authentication (encrypted at rest)
If your retailer account has 2FA enabled, you must provide the totp_secret to avoid verification issues during order processing. See the Managed Accounts guide for details on finding your TOTP key.

Response

Returns the created credential object with:
  • id - Unique identifier (UUID)
  • short_id - Short identifier used in URLs (e.g., zn_acct_a1b2c3d4)
  • email - Retailer account email
  • retailer - Retailer name, or null if default credentials
  • has_totp - Whether TOTP 2FA is configured
  • has_forwarding - Whether email forwarding has been verified
  • created_at - Creation timestamp
  • updated_at - Last update timestamp
Passwords and TOTP secrets are never returned in API responses. The has_totp field indicates whether 2FA is configured.

Authorizations

Authorization
string
header
required

Zinc API key (Bearer zn_...)

Headers

authorization
string | null

Body

application/json

Request model for creating retailer credentials.

email
string
required
password
string | null
retailer
string | null

Retailer name (e.g., 'amazon'). If null, applies as default credentials.

totp_secret
string | null

TOTP secret key for 2FA (will be encrypted at rest).

retailer_config
Retailer Config · object | null

Response

Successful Response

Response model for retailer credentials.

id
string<uuid>
required
short_id
string
required
email
string
required
retailer
string | null
required
forwarding_email
string
required

Email address to forward retailer emails to for verification and 2FA code extraction.

created_at
string<date-time>
required
updated_at
string<date-time>
required
has_totp
boolean
default:false

Whether TOTP 2FA is configured for this account.

has_forwarding
boolean
default:false

Whether email forwarding has been verified for this account.

is_paused
boolean
default:false

Whether this credential is paused (jobs will not be picked up).

locked_by_job_id
string<uuid> | null

The job ID currently using this credential, if any.

cooldown_minutes
integer | null

Minimum minutes between uses. None = no cooldown.

last_used_at
string<date-time> | null

When this credential was last released after a job completed.

retailer_config
Retailer Config · object | null