Overview
This endpoint creates a debt or records a credit note. A positiveamount creates a debt; a negative amount creates or updates a credit note.
Authentication
Requires a valid OAuth 2.0 access token with thedebts:write scope.
Custom dynamic fields
extra_variables: Optional object of custom dynamic fields, for example {"contract_number": "CTR-123", "agency": "Paris"}. When omitted, existing values are preserved. When provided, replaces all dynamic fields; {} clears them.
For a credit note, send a negative
amount, one identity field (internal_id or invoice_reference), and one target field (credited_invoice_reference or debtor_reference). A debtor-only target also requires timeline_id unless your company has exactly one timeline. Debtor names and contact details are not required.Example Request
Success Response
Error Responses
Validation Rules
Validation Update (2025): Phone number validation is now strictly enforced to match the web interface behavior. Phone numbers are validated using international standards (libphonenumber library). If you were previously sending phone numbers without proper formatting or French overseas mobile numbers (069X prefix), these will now be rejected. You can now use
email as an alternative to phone.Required Fields
Required Fields
Debt (
amount > 0):firstnameandlastname: Must not be emptyphoneoremail: At least one valid contact method
amount < 0):internal_idorinvoice_reference: Stable credit note identitycredited_invoice_referenceordebtor_reference: Debt targettimeline_id: Required for a debtor-only target unless the company has exactly one timeline
amount must not be zero and currency must be a valid ISO 4217 currency code.Debt Contact Information (At Least One Required)
Debt Contact Information (At Least One Required)
At least one valid contact method is required:
phone: Must be a valid phone number if provided- Supported: French mainland numbers, most international numbers, French overseas fixed lines
- NOT Supported: French overseas mobile numbers with 069X prefix (e.g.,
0690123456) - International format recommended (e.g.,
+33123456789)
email: Must be a valid email format if provided
- If only phone is provided, it must be valid
- If only email is provided, it must be valid
- If both are provided, at least one must be valid
- If neither is valid, the request will fail
Format Validation
Format Validation
birthdate: Must be in YYYY-MM-DD format if providedinvoice_date: Must be in YYYY-MM-DD format if provideddue_date: Must be in YYYY-MM-DD format if providedphone: Validated and normalized to E.164 format. International format recommended (e.g., +33123456789). French numbers without country code (e.g., 0612345678 or 612345678) are automatically normalized to +33 format.iban: Must be a valid IBAN if provided
Phone Validation
Phone Validation
Phone numbers are validated against carrier databases. Invalid phones will be rejected with a specific error message:
"phone number too short"- Number has too few digits"phone number too long"- Number has too many digits"invalid country code"- Country code not recognized"number format is not valid"- Number doesn’t match expected format"number not registered in carrier database"- Number range not allocated to any carrier (may affect some overseas territories)
Business Rules
Business Rules
amount: Must be positive for a debt or negative for a credit note; zero is invaliddue_date: Should be afterinvoice_dateif both are providedinternal_id: Should be unique within your company (recommended)currency: Must be supported by the systemstatus: Automatically set to “pending” on creation. Status cannot be set via API and will change through internal workflows only.timeline_id: Must be a valid encrypted timeline ID belonging to your companytimeline_start_mode: Only used whentimeline_idis provided- Invalid timeline IDs are ignored for debts and rejected for credit notes
Expensive Destinations
Expensive Destinations
A costly phone destination does not reject an otherwise valid debt. The successful response includes an Send
expensive_destination_not_accepted warning when phone communications are restricted. The restriction applies only to that phone, including secondary-contact phones; email and postal reminders keep their normal behavior."accept_expensive_destination": true to permit the costly phone communications. Send false to restrict them explicitly. This is based on configured pricing, not on whether a number is foreign.Rate Limiting
This endpoint is subject to rate limiting. See the Rate Limits documentation for details. Rate Limit: 500 requests per hour (write operations)Best Practices
Use Internal IDs
Always provide an
internal_id to link the debt to your own systems and avoid duplicates.Validate Data
Validate all data on your side before sending to reduce API errors and improve performance.
Handle Errors
Implement proper error handling to deal with validation failures and network issues.
Store Debt IDs
Store the returned encrypted
id for future API calls - it’s the primary identifier.Enable AI Workflows
Use
timeline_id to automatically trigger AI-powered collection actions (calls, emails, SMS) based on your timeline configuration.Control Start Timing
Use
timeline_start_mode: "next_day" to respect business hours and excluded days when starting the collection process.After Creation
Once a debt is created, you can:- Start followup activities using the Followups API
- Update debt information using the Update Debt endpoint
- Track collection progress by retrieving followup statistics
- Generate reports that include this debt in your analytics
Related Endpoints
- List Debts - Get all debts for your company
- Get Debt - Retrieve a specific debt
- Update Debt - Modify debt information
- Create Followup - Start collection activities