English
English
Appearance
English
English
Appearance
https://api.repliz.com/public/account/{accountId}/tagReplace every tag of one account, for example to put it in the group of a brand or client. Send the full list of tags the account should have.
Authorization: Basic Base64(AccessKey:SecretKey)) or Bearer token from Login with Replizaccount:write| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | ID of the account, the _id from Get Account. |
| Field | Type | Required | Description |
|---|---|---|---|
tags | string[] | Yes | Every tag of the account, at most 10 of up to 30 characters. Replaces the current tags; send [] to remove them all. Spaces around a tag are trimmed, and tags that differ only in case are kept once. A tag that another account already has takes that spelling, so brand a becomes Brand A when another account has Brand A. To change the spelling everywhere, use Rename Tag Account. |
curl -X PUT "https://api.repliz.com/public/account/680affa5ce12f2f72916f67e/tag" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{
"tags": ["Brand A", "Jakarta"]
}'import axios from 'axios';
const accountId = '680affa5ce12f2f72916f67e';
const response = await axios.put(
`https://api.repliz.com/public/account/${accountId}/tag`,
{ tags: ['Brand A', 'Jakarta'] },
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const accountId = '680affa5ce12f2f72916f67e';
const response = await fetch(`https://api.repliz.com/public/account/${accountId}/tag`, {
method: 'PUT',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ tags: ['Brand A', 'Jakarta'] }),
});
const data = await response.json();
console.log(data);// No content returned on success{
"code": 400,
"message": "tags must contain no more than 10 elements"
}{
"code": 404,
"message": "account not found"
}{
"code": 401,
"message": "unauthorized"
}