Update an account
Renames an account (workspace) and sets its click-tracking and open-tracking defaults. A genuine partial update - send any of the three fields on its own and the others are left unchanged. An empty body is rejected with 400. Webhook settings have their own dedicated endpoint.
/v2/ accounts/ {accountId}Path parameters
accountIdstringrequired
The account the request is scoped to.
Request body
namestringoptional
New account (workspace) name. Omit to leave it unchanged.
clickTrackingbooleanoptional
Account default for click tracking. Off unless set true - tracking is opt-in. Omit to leave it unchanged.
openTrackingbooleanoptional
Account default for open tracking. Off unless set true - tracking is opt-in. Omit to leave it unchanged.
Response
The updated account.
Errors
400
The request body or parameters failed validation.
401
Missing or invalid token, or the token is not authorized for this account/user.
See Errors and rate limits for what error responses look like.
curl --location --request PATCH 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example name",
"clickTracking": false,
"openTracking": false
}'
const res = await fetch('https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SENDSTREAK_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"name": "Example name",
"clickTracking": false,
"openTracking": false
})
});
import os, requests
res = requests.patch(
'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID',
headers={'Authorization': f"Bearer {os.environ['SENDSTREAK_TOKEN']}"},
json={
"name": "Example name",
"clickTracking": False,
"openTracking": False
},
)
{
"_id": "665f0a2b1c9d440012ab34cd",
"name": "Example name",
"clickTracking": false,
"openTracking": false,
"webhooks": {
"authType": "basic",
"events": [
"contact.bounced"
],
"passwordOrToken": "webhook-bearer-token",
"signingSecret": "whsec_9f8e7d6c5b4a39281706",
"url": "https://example.com/webhooks/sendstreak",
"username": "smtp-user"
}
}