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.

PATCH/v2/accounts/{accountId}

Base URL https://api.sendstreak.com. All v2 endpoints require a bearer token - see Authentication.

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
}'
response200application/json
{
  "_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"
  }
}