organizations:upsert
Description: Create a organization or update a single organization by ID.
Request Schema
{
"payload": {
"id": 1, // When set, update existing record, else create new record
"type": "organizations:upsert",
"name": "Flintstone Corp",
"import_id": "FL0001",
"category": { "id": 1 }, // Existing organization category, see payload specs for the appropriate category: organization_categories:query
"locale": "en",
"data_consent": "accepted",
"accepts_marketing": true,
"note": "Lorem Ipsum\ndolor sit amet.",
"forms": [
{ "id": 1, "data": { "key1": "value1", ... } } // See form:fill, `subject` key not required
],
"people": [
{
"type": "people:upsert", // See people:upsert
"first_name": "John",
"last_name": "Doe",
"dob": "1970-12-30",
"forms": [
{ "id": 2, "data": { "key1": "value1", ... } } // See form:fill, `subject` key not required
],
"collaboration": {
"title": "CTO",
"main": false
}
}, // New record
{
"id": 1, // When set, update existing record, else create new record
"type": "people:upsert", // See people:upsert
"first_name": "Jane",
"last_name": "Doe",
"dob": "1974-07-12",
"collaboration": {
"title": "CEO",
"main": true
}
} // Existing record
],
"contact_informations": [
{
"label": "Home",
"type": "PhoneNumber",
"info": "123 1234",
"main": true
}, // New record
{
"id": 1,
"type": "Email",
"label": "Office",
"info": "info@example.com",
"main": false
} // Existing record
],
"addresses": [
{
"name": "Office", // Address label
"street1": "259 Wellington St. W", // Number and street
"street2": "Appt 1", // Appartment number, PO Box, etc...
"city": "Toronto", // City name
"zip": "M5V 3P9", // Postal code
"region_code": "ON", // Province/State code - https://en.wikipedia.org/wiki/ISO_3166-2
"country_code": "CA", // Country code - https://en.wikipedia.org/wiki/ISO_3166-2
"main": true // Main address, only 1 per organization
}, // New record
{
"id": 1,
"name": "Office",
"main": false
} // Existing record, same attributes as example above
]
},
"signature": "payload_ed25519_hex_signature",
"source_public_key": "your_client_public_key"
}
Request Attributes
Field Constraints
| Field | Type | Required | Default | Max Length | Constraints |
|---|---|---|---|---|---|
id | Integer | No | null | - | Arkipel ID. When set, updates existing record. When omitted, creates new record. |
name | String | Conditional | null | 255 | Organization name. Required unless status is wizard. Whitespace is trimmed. |
import_id | String | Yes | Auto-generated | 255 | Your external system ID for this organization. Unique per account. Auto-generated if not provided. |
category | Object | No | null | - |
{ "id": 1 }. See organization_categories:query
|
locale | Enum | No | null | - | Values: fr, en
|
data_consent | Enum | No | unknown | - | Values: unknown, accepted, rejected
|
accepts_marketing | Boolean | No | false | - | Consent to receive electronic communications |
reason | String | Conditional | null | 255 | Required when status is inactive
|
status | Enum | No | active | - | Values: wizard, active, inactive
|
federation_permission | Enum | No | confidential | - | Values: confidential, shared_with_subscribers
|
opening_status | Enum | No | unknown | - | Values: unknown, closed, partially_closed, open
|
permission | String | No | confidential | 255 | Access permission level |
split_percentage | Decimal | No | null | - | Decimal with precision 10, scale 5 |
note | Text | No | null | - | Free-form text about the organization |
people | Array | No | [] | - | People associated with this organization. See People fields |
contact_informations | Array | No | [] | - | See ContactInformation fields |
addresses | Array | No | [] | - | See Address fields |
Special Field: import_id
The import_id field is your integration’s identifier for this organization. Use it to link Arkipel records with your external system.
Characteristics:
- Required but auto-generated if not provided
- Must be unique per account (case-insensitive)
-
Your external system ID format is recommended (e.g.,
crm_org_123,vendor_456,partner_789) - Used for idempotent operations and duplicate prevention
- Auto-generated format: 6 characters from
234679ACDEFGHJKMNPRTVWXYZ
Nested People Fields
Each person object in the people array follows the people:upsert structure with an additional collaboration field:
| Field | Type | Required | Description |
|---|---|---|---|
type | String | Yes | Must be "people:upsert"
|
id | Integer | No | Arkipel person ID (for updating existing) |
first_name | String | Conditional | See people:upsert
|
last_name | String | Conditional | See people:upsert
|
import_id | String | Yes | See people:upsert
|
collaboration | Object | No | Relationship details |
collaboration.title | String | No | Role in organization (e.g., “CEO”, “Director”) |
collaboration.main | Boolean | No | Is this the primary contact? Default: false
|
Note: All other person fields from people:upsert are supported (gender, dob, contact_informations, addresses, etc.).
Response Schema
{
"source_public_key": "community_public_key",
"source_site": {
"protocol": "http",
"fqdn": "arkipel.localhost:3000"
},
"created_at": "2025-11-13T20:52:49Z",
"signature": "8b6392d5550605bd6ccddf9c21ebec470de4b44e4b4deb746076e37ab61c5346e07e7c7c7cebb5bbee41cdd92a476bcd3f02373d146ec165b31c31fc31c9ce0d",
"payload": {
"message_id": "6916452112f746b2b4cf48c1",
"type": "organizations:upsert"
}
}