Skip to main content

Update an account's primary contact

PUT 

/accounts/:accountId/contacts/primary

Replaces the primary contact information on an AWS account: the name, company and postal address AWS holds for the account owner.

This is a replace, not a merge. It maps onto the AWS PutContactInformation call, which overwrites the whole contact record. Send every field you want to keep; a field you omit is cleared, not preserved. Read the current values with POST /accounts/{accountId}/contacts/get first and send them back modified.

Prism validates nothing in the body. It is decoded only far enough to confirm it is valid JSON and then forwarded as sent, so the field rules are AWS's and a body that breaks them fails upstream, reaching you as a 502, not a 400.

This is the only method registered at this exact path. DELETE on it is not a way to clear the primary contact: no delete route is registered for primary, so a DELETE .../contacts/primary falls through to DELETE /accounts/{accountId}/contacts/{type} with type set to primary and is forwarded upstream as an alternate-contact deletion of a type that does not exist. Expect a 502.

Like the other five contacts operations, this one is a proxy to CloudKeeper's ops-service, is present on every deployment, and reports every upstream failure as a 502; see POST /accounts/{accountId}/contacts/get for the full explanation.

Request​

Responses​

The ops-service accepted the update and AWS applied it. The response carries no data (read the contact back if you want to see the stored result), and message is the fixed string Primary contact updated.