Create organization
Creates a new organization (external business partner) in your workspace.
What are Organizations? Organizations represent external business partners like customers, suppliers, partners, or competitors. They serve as the foundation for managing external projects, contacts, invoices, and business relationships.
Required fields:
- name: Full company name (e.g., “Acme Corporation”)
- type: Organization type (Customer, Prospect, Supplier, Partner, etc.)
- color: Hex color code for visual identification (e.g., “#FF5733”)
Optional fields:
-
shortName: 3-5 character abbreviation (auto-generated if not provided)
-
icon: Icon identifier for visual representation
-
legalForm: Legal company form (e.g., “GmbH”, “AG”, “LLC”)
-
startOfCollaboration: Date when business relationship started (ISO date format: YYYY-MM-DD)
-
Contact information: Address fields, phone, fax, email, website
-
Legal information: Tax number, registration number, registration court
-
Invoice settings: Hourly rate, payment terms, reminder fees, interest rates
-
Document settings: Table of contents, title page, heading style
-
customFields: Values keyed by configured organization custom-field IDs. Values must match their definition types. Custom fields store typed data; they do not create native relationships or behavior.
Uploading a logo:
- First, call POST /api/public/workspace/upload to upload the logo file
- The upload endpoint returns a file ID (UUID)
- Use that file ID in the logoId field when creating the organization
Auto-generated fields:
- If shortName is not provided, it will be automatically generated from the organization name
- The organization will be created with isActive: true by default
What is returned: The complete organization object with all fields, including computed values like logoUrl and timestamps.
Note: This endpoint requires the Organizations.create permission. All validation errors will be returned with detailed field-level messages.
/organizationsAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredfieldsToReturnstringresponseShapestringcompactfullLT-Response-Shapestringfullapplication/jsonaddressCitystringaddressCountrystringaddressHouseNumberstringaddressStreetstringaddressZipstringbaseInvoiceInterestnumbercolorstringrequiredcreateProjectbooleancustomFieldsobjectemailstringenableInvoiceInterestbooleanenableInvoiceReminderFeebooleanfaxNumberstringhourRatenumbericonstringinvoiceDueDaysnumberinvoiceInterestnumberinvoiceLanguagestringinvoiceReminderFeenumberlegalFormstringlogoIdstringnamestringrequiredparentOrganizationIdstringphoneNumberstringprojectDocumentDefaultContactUserIdstringprojectDocumentEnableTocbooleanprojectDocumentHeadingStylestringprojectDocumentTitlePagebooleanregistrationCourtstringregistrationNumberstringshortDescriptionstringshortNamestringstartOfCollaborationstring<date>tagsstring[]taxNumberstringtypestringrequiredCustomerProspectTargetPartnerSupplierServiceProviderInvestorCompetitorGovernmentAgencyEducationalInstitutionwebsitestringaddressCityobjectaddressCountryobjectaddressHouseNumberobjectaddressStreetobjectaddressZipobjectbaseInvoiceInterestobjectcolorstringrequiredcreatedAtstringrequiredcustomFieldsobjectemailobjectenableInvoiceInterestobjectenableInvoiceReminderFeeobjectfaxNumberobjecthourRateobjecticonobjectidstringrequiredinvoiceDueDaysobjectinvoiceInterestobjectinvoiceLanguageobjectinvoiceReminderFeeobjectisActivebooleanrequiredlegalFormobjectlogoUrlobjectnamestringrequiredparentOrganizationIdobjectparentOrganizationNameobjectphoneNumberobjectprojectDocumentDefaultContactUserIdobjectprojectDocumentEnableTocobjectprojectDocumentHeadingStyleobjectprojectDocumentTitlePageobjectregistrationCourtobjectregistrationNumberobjectshortDescriptionobjectshortNameobjectstartOfCollaborationstring<date>tagsstring[]taxNumberobjecttypestringrequiredCustomerProspectTargetPartnerSupplierServiceProviderInvestorCompetitorGovernmentAgencyEducationalInstitutionupdatedAtstringrequiredwebsiteobjecterrorsobjectmessagestringstatusCodenumbercurl -X POST "https://leadtime.app/api/public/organizations" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"addressCity": "New York",
"addressCountry": "USA",
"addressHouseNumber": "42A",
"addressStreet": "123 Main St",
"addressZip": "10001",
"baseInvoiceInterest": 3,
"color": "#FF5733",
"createProject": false,
"customFields": {
"customField1": "value1",
"customField2": 123
},
"email": "contact@acme.com",
"enableInvoiceInterest": false,
"enableInvoiceReminderFee": true,
"faxNumber": "+1234567891",
"hourRate": 150,
"icon": ":building:",
"invoiceDueDays": 30,
"invoiceInterest": 5,
"invoiceLanguage": "en",
"invoiceReminderFee": 5,
"legalForm": "GmbH",
"logoId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corporation",
"parentOrganizationId": "123e4567-e89b-12d3-a456-426614174000",
"phoneNumber": "+1234567890",
"projectDocumentDefaultContactUserId": "123e4567-e89b-12d3-a456-426614174000",
"projectDocumentEnableToc": true,
"projectDocumentHeadingStyle": "classic",
"projectDocumentTitlePage": true,
"registrationCourt": "Munich District Court",
"registrationNumber": "HRB 12345",
"shortDescription": "Leading software development company",
"shortName": "ACME",
"startOfCollaboration": "2024-01-01",
"tags": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001"
],
"taxNumber": "DE123456789",
"type": "Customer",
"website": "https://acme.com"
}'const response = await fetch("https://leadtime.app/api/public/organizations", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"addressCity": "New York",
"addressCountry": "USA",
"addressHouseNumber": "42A",
"addressStreet": "123 Main St",
"addressZip": "10001",
"baseInvoiceInterest": 3,
"color": "#FF5733",
"createProject": false,
"customFields": {
"customField1": "value1",
"customField2": 123
},
"email": "contact@acme.com",
"enableInvoiceInterest": false,
"enableInvoiceReminderFee": true,
"faxNumber": "+1234567891",
"hourRate": 150,
"icon": ":building:",
"invoiceDueDays": 30,
"invoiceInterest": 5,
"invoiceLanguage": "en",
"invoiceReminderFee": 5,
"legalForm": "GmbH",
"logoId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corporation",
"parentOrganizationId": "123e4567-e89b-12d3-a456-426614174000",
"phoneNumber": "+1234567890",
"projectDocumentDefaultContactUserId": "123e4567-e89b-12d3-a456-426614174000",
"projectDocumentEnableToc": true,
"projectDocumentHeadingStyle": "classic",
"projectDocumentTitlePage": true,
"registrationCourt": "Munich District Court",
"registrationNumber": "HRB 12345",
"shortDescription": "Leading software development company",
"shortName": "ACME",
"startOfCollaboration": "2024-01-01",
"tags": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001"
],
"taxNumber": "DE123456789",
"type": "Customer",
"website": "https://acme.com"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/organizations",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"addressCity": "New York",
"addressCountry": "USA",
"addressHouseNumber": "42A",
"addressStreet": "123 Main St",
"addressZip": "10001",
"baseInvoiceInterest": 3,
"color": "#FF5733",
"createProject": False,
"customFields": {
"customField1": "value1",
"customField2": 123
},
"email": "contact@acme.com",
"enableInvoiceInterest": False,
"enableInvoiceReminderFee": True,
"faxNumber": "+1234567891",
"hourRate": 150,
"icon": ":building:",
"invoiceDueDays": 30,
"invoiceInterest": 5,
"invoiceLanguage": "en",
"invoiceReminderFee": 5,
"legalForm": "GmbH",
"logoId": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corporation",
"parentOrganizationId": "123e4567-e89b-12d3-a456-426614174000",
"phoneNumber": "+1234567890",
"projectDocumentDefaultContactUserId": "123e4567-e89b-12d3-a456-426614174000",
"projectDocumentEnableToc": True,
"projectDocumentHeadingStyle": "classic",
"projectDocumentTitlePage": True,
"registrationCourt": "Munich District Court",
"registrationNumber": "HRB 12345",
"shortDescription": "Leading software development company",
"shortName": "ACME",
"startOfCollaboration": "2024-01-01",
"tags": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001"
],
"taxNumber": "DE123456789",
"type": "Customer",
"website": "https://acme.com"
},
){
"addressCity": "New York",
"addressCountry": "USA",
"addressHouseNumber": "42A",
"addressStreet": "123 Main St",
"addressZip": "10001",
"baseInvoiceInterest": 3,
"color": "#FF5733",
"createdAt": "2024-01-01T00:00:00.000Z",
"customFields": {
"customField1": "value1",
"customField2": 123
},
"email": "contact@acme.com",
"enableInvoiceInterest": false,
"enableInvoiceReminderFee": true,
"faxNumber": "+1234567891",
"hourRate": 150,
"icon": "building",
"id": "123e4567-e89b-12d3-a456-426614174000",
"invoiceDueDays": 30,
"invoiceInterest": 5,
"invoiceLanguage": "en",
"invoiceReminderFee": 5,
"isActive": true,
"legalForm": "GmbH",
"logoUrl": "https://app.example.com/api/files/public/123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Corporation",
"parentOrganizationId": "123e4567-e89b-12d3-a456-426614174000",
"parentOrganizationName": "B. Braun",
"phoneNumber": "+1234567890",
"projectDocumentDefaultContactUserId": "123e4567-e89b-12d3-a456-426614174000",
"projectDocumentEnableToc": true,
"projectDocumentHeadingStyle": "classic",
"projectDocumentTitlePage": true,
"registrationCourt": "Munich District Court",
"registrationNumber": "HRB 12345",
"shortDescription": "Leading software development company",
"shortName": "ACME",
"startOfCollaboration": "2024-01-01",
"tags": [
"123e4567-e89b-12d3-a456-426614174000",
"223e4567-e89b-12d3-a456-426614174001"
],
"taxNumber": "DE123456789",
"type": "Customer",
"updatedAt": "2024-01-15T12:30:00.000Z",
"website": "https://acme.com"
}{
"errors": {
"color": [
"Color must be a valid hex code"
],
"name": [
"Name is required"
],
"type": [
"Type is required"
]
},
"message": "Bad Request",
"statusCode": 400
}