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
emailstringrequiredThe address to add.
descriptionstringYour own note about the address, for example a department. Cut to 255 characters.
Example
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.
{ "id": "42", "email": "invoices@example.com", "description": "Accounts payable"}Response fields
idstringThe billing contact ID.
emailstringdescriptionstring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |