Skip to content

Add an invoice copy address

POST /api/v2/billing/payment-methods/contacts

Add an e-mail address that gets copies of the account’s invoice e-mails. The address is stored in lowercase. An address already on the list is rejected with 400 invalid_request. The response is the new entry with its id.

Authentication: An API key with the scope write:billing. About keys and scopes

Request

Body

emailstringrequired
The address to add.
descriptionstring
Your own note about the address, for example a department. Cut to 255 characters.

Example

POST /api/v2/billing/payment-methods/contacts
curl -X POST "https://cloud.hostup.se/api/v2/billing/payment-methods/contacts" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "invoices@example.com",
"description": "Accounts payable"
}'

Responses

201 The new invoice copy address.

Response 201
{
"id": "42",
"email": "invoices@example.com",
"description": "Accounts payable"
}
Response fields
idstring
The billing contact ID.
emailstring
descriptionstring or null

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.