Create Debt
Debts API
Create Debt
Create a new debt in the system
POST
Create Debt
Overview
This endpoint allows you to create a new debt record. The debt will be associated with your authenticated company and can immediately be used for followup activities.Authentication
Requires a valid OAuth 2.0 access token with thedebts:write scope.
Request
Bearer token for authentication
Must be
application/jsonRequest Body
Debtor’s first name
Debtor’s last name
Civility/title (optional). Possible values:
"Mr" or "Ms"Debtor’s phone number (international format recommended). At least one of phone or email must be valid. Note: French overseas mobile numbers with 069X prefix are not supported.
Debtor’s email address. At least one of phone or email must be valid.
Debt amount (must be positive)
Currency code (ISO 4217 format, e.g., “EUR”, “USD”)
Debtor’s birth date in YYYY-MM-DD format (optional)
Description of what the debt is for (optional)
Your internal reference ID for this debt (optional)
Invoice reference number for this debt (optional). Used for matching debts during upsert imports and displayed in communications.
Your reference for the debtor (optional). A cross-reference identifier to link this debt to the debtor in your own system.
Original invoice date in YYYY-MM-DD format (optional)
Payment due date in YYYY-MM-DD format (optional)
Debtor’s full address (optional)
IBAN where payment should be made (optional)
Name of the creditor company you are collecting on behalf of (optional). Only used by debt collection agencies who manage debts for multiple client companies. If you are collecting your own debts, leave this field empty.
Debtor’s company name, if the debtor is a business (optional)
Street address (optional). Can be used with other address fields for structured address data
Street number (optional)
Postal/ZIP code (optional)
City name (optional)
Country code in ISO 3166-1 alpha-2 format, e.g. “FR”, “US” (optional)
Custom payment link URL for this debt (optional)
Encrypted timeline ID to associate with this debt (optional). When provided, the debt will be automatically processed according to the timeline’s actions (calls, emails, SMS, etc.). Use this to enable AI-powered collection workflows.How to get timeline IDs: See the Using Timelines guide for detailed instructions. You must be a company administrator and have created an OAuth client to view timeline IDs in your dashboard.
Controls when the timeline processing should start (optional). Only used when
timeline_id is provided. Options:"immediate"(default): Start processing immediately using the import date"next_day": Start processing on the next allowed business day (respects timeline’s excluded days and public holidays)
Custom metadata object for storing arbitrary JSON data (optional). Use this to store any additional information that your system needs to track, such as CRM IDs, order references, custom tags, or integration-specific data. This field is returned in API responses and webhook payloads.
Required opt-in flag when the phone number belongs to an expensive destination (DOM-TOM, Maghreb, etc.). AI calls to these destinations cost significantly more credits (e.g., 100 for DOM-TOM, 125 for Maghreb vs. 25 for France). If the phone number is in an expensive destination and this flag is not set to
true, the request will be rejected with a 422 error detailing the destination and cost. Set to true to acknowledge the higher cost and proceed.Enables automatic civility/title completion when
civility is missing and firstname is present. Default: true. Charged at 1 credit per 100 debts needing civility detection, rounded up.Enables email deliverability validation for the provided email address. Default:
false. Charged at 1 credit per 5 billable validation results. Invalid addresses are saved but marked as suppressed to prevent sending.Example Request
Response
Always
false for successful requestsSuccess message
The created debt object with all fields populated
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
firstname: Must not be emptylastname: Must not be emptyamount: Must be a positive number (> 0)currency: Must be a valid ISO 4217 currency code
Contact Information (At Least One Required)
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 greater than 0due_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 silently ignored.
Expensive Destinations
Expensive Destinations
Phone numbers in certain regions cost significantly more credits for AI calls. If a phone number is detected in an expensive destination, the request will be rejected with a 422 error unless you include
The 422 response includes full destination details (country code, name, credits, multiplier) so you can make an informed decision before retrying with the opt-in flag.
"accept_expensive_destination": true.| Destination | Credits per call | Multiplier |
|---|---|---|
| France (mainland) | 25 | 1.0x |
| EU countries | 30 | 1.2x |
| DOM-TOM (Réunion, Guadeloupe, Martinique, French Guiana, Mayotte, New Caledonia, French Polynesia, etc.) | 100 | 4.0x |
| Maghreb (Morocco, Algeria, Tunisia) | 125 | 5.0x |
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