Skip to main content
PUT
/
managed-accounts
/
{short_id}
Update Retailer Credentials
curl --request PUT \
  --url https://api.zinc.com/managed-accounts/{short_id} \
  --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/{short_id}"

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

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

print(response.text)
const options = {
method: 'PUT',
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/{short_id}', 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/{short_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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/{short_id}"

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

req, _ := http.NewRequest("PUT", 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.put("https://api.zinc.com/managed-accounts/{short_id}")
.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/{short_id}")

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

request = Net::HTTP::Put.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>"
}
]
}
Update an existing managed account’s retailer credentials. Only provided fields are updated.

Path Parameters

  • short_id (required) - The short identifier of the credentials to update (e.g., zn_acct_a1b2c3d4)

Request Fields

All fields are optional. Only provided fields are updated.
  • email - New email address
  • password - New password (encrypted at rest)
  • retailer - New retailer association
  • totp_secret - Update the 2FA secret key (encrypted at rest)

Response

Returns the updated credential object.

Authorizations

Authorization
string
header
required

Zinc API key (Bearer zn_...)

Headers

authorization
string | null

Path Parameters

short_id
string
required

Body

application/json

Request model for updating retailer credentials.

email
string | null
password
string | null
retailer
string | null
totp_secret
string | null
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