Set invoice contact ID
Updates the contact ID for an existing invoice. The contact must be a valid organization member from the invoice’s project customer organization.
What happens when you set an invoice contact:
- The invoice’s contactId field is updated
- The contact must belong to the project’s customer organization
- If contactId is set to null, the contact is cleared
- The contact will receive the invoice when it is sent via email
Important restrictions:
- The contact must be a valid organization member from the project’s customer organization
- Use GET /billing/invoices/invoiceContacts/{projectId} to get available contacts
- The contact must have a valid email address to receive invoices
Use cases:
- Set or change the invoice recipient before sending
- Clear the contact if needed
- Update contact after invoice creation
What is returned:
- Success response confirming the contact was set
POST
/billing/invoices/setInvoiceContactIdAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredRequest body
requiredapplication/jsonInvoice ID and contact ID to set
contactIdobject<uuid> | nullContact ID (UUID) of the organization member who should receive the invoice. This must be a valid contact from the project's customer organization. Set to null to clear the contact. Use GET /billing/invoices/invoiceContacts/{projectId} to get available contacts.
idstring<uuid>requiredInvoice ID (UUID) to update the contact for
Responses
200Invoice contact set successfully
successbooleanrequiredOperation success flag
400Invalid invoice ID or contact ID
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Invoice not found or contact not found
Request
curl -X POST "https://leadtime.app/api/public/billing/invoices/setInvoiceContactId" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contactId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000"
}'const response = await fetch("https://leadtime.app/api/public/billing/invoices/setInvoiceContactId", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"contactId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/billing/invoices/setInvoiceContactId",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"contactId": "123e4567-e89b-12d3-a456-426614174000",
"id": "123e4567-e89b-12d3-a456-426614174000"
},
)Response
{
"success": true
}Invalid invoice ID or contact ID
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions
Invoice not found or contact not found