Skip to main content

Update Account Metadata

Update the name, domain, and metadata attributes for a specific account. This endpoint performs a partial merge -- only the fields you include are changed. Existing metadata keys not present in the request are preserved.

PATCH /accounts/{id}/metadata

Request

ParameterTypeRequiredDescription
idstringYesAccount ID (path parameter)

Request Body

All fields are optional, but the request body must include at least one of name, domain, or metadata.

FieldTypeRequiredDescription
namestringNoUpdate the account's company name
domainstringNoUpdate the account's primary email domain
metadataobjectNoKey-value pairs to merge into the account's metadata

Example

curl -X PATCH "https://api.kenbun.io/accounts/acct_abc123/metadata" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation",
"domain": "acme.com",
"metadata": {
"industry": "Technology",
"employees": 2500,
"linkedin_url": "https://linkedin.com/company/acme"
}
}'

Response

204 No Content

A successful update returns no response body.

Common Errors

StatusMeaningSolution
400Bad RequestAccount ID not provided, or request body could not be parsed
401UnauthorizedCheck authentication credentials
404Not FoundAccount does not exist or is not accessible in this OU
413Payload Too LargeReduce the number or size of metadata values in the request
500Server ErrorContact support if the issue persists

Notes

  • Metadata updates are a partial merge -- existing keys not included in the request are preserved unchanged.
  • Setting a metadata key to null removes it from the account's metadata.
  • Changes to name and domain take effect immediately across all leads associated with this account.
  • This endpoint is scoped to the active Organizational Unit.