POST · Configurer le produit
Rédigé par Red Blue
Mis à jour le
POST /api/v1/organization/product-configure
operationId : product_configure
Accès | Permission | Consentements OAuth |
|---|---|---|
OAuth : délégation d’un équipier pour l’API | product.update | api:connect, product:write |
KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.
Paramètres et en-têtes
Nom | Emplacement | Requis | Type et contraintes |
|---|---|---|---|
Idempotency-Key | header | Oui | string ; Longueur maximale : 200 |
Champs du corps JSON
Nom | Emplacement | Requis | Type et contraintes |
|---|---|---|---|
productId | JSON | Oui | string |
request | JSON | Oui | object |
Variantes de la requête
Sélecteur | Valeur | Autres champs requis dans request |
|---|---|---|
request.type | "general" | name, slug, subdomain, description, expectedRevision |
request.type | "portal" | patch, expectedRevision |
request.type | "notifications" | patch, expectedRevision |
request.type | "operations" | patch, expectedRevision |
request.type | "onboarding" | selectedSources, expectedRevision |
Choisissez une variante et respectez son schéma complet : les contraintes des champs optionnels et les unions imbriquées restent applicables.
Exemple de requête
curl --request POST "$KHONY_ORIGIN/api/v1/organization/product-configure" \
--header "Authorization: Bearer $KHONY_ACCESS_TOKEN" \
--header 'Idempotency-Key: example-command' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": "product_01k3w8d7vhe008000000000001",
"request": {
"type": "general",
"name": "Example product",
"slug": "example",
"subdomain": "example",
"description": "Example",
"expectedRevision": "0000000000000000000000000000000000000000000000000000000000000000"
}
}'Réponse de succès · HTTP 200
{
"data": {
"accepted": true,
"resourceId": null,
"revision": null
}
}Schéma complet du corps JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"productId": {
"type": "string",
"pattern": "^product_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"request": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "general"
},
"name": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"slug": {
"$ref": "#/$defs/__schema0"
},
"subdomain": {
"$ref": "#/$defs/__schema0"
},
"description": {
"type": "string",
"maxLength": 500
},
"expectedRevision": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"type",
"name",
"slug",
"subdomain",
"description",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "portal"
},
"patch": {
"type": "object",
"properties": {
"customization": {
"$ref": "#/$defs/__schema2"
},
"title": {
"$ref": "#/$defs/__schema18"
},
"introduction": {
"$ref": "#/$defs/__schema19"
},
"theme": {
"$ref": "#/$defs/__schema20"
},
"accentColor": {
"$ref": "#/$defs/__schema21"
},
"showLogo": {
"$ref": "#/$defs/__schema22"
},
"isPublic": {
"$ref": "#/$defs/__schema23"
},
"allowAnonymousFeedback": {
"$ref": "#/$defs/__schema24"
},
"requireAuthenticationForVotes": {
"$ref": "#/$defs/__schema25"
},
"allowedEmailDomains": {
"$ref": "#/$defs/__schema26"
},
"showRoadmap": {
"$ref": "#/$defs/__schema28"
},
"showChangelog": {
"$ref": "#/$defs/__schema29"
},
"widgetEnabled": {
"$ref": "#/$defs/__schema30"
},
"widgetLauncherPosition": {
"$ref": "#/$defs/__schema31"
},
"widgetLauncherLabel": {
"$ref": "#/$defs/__schema32"
},
"widgetWelcomeGreeting": {
"$ref": "#/$defs/__schema33"
},
"widgetWelcomeIntroduction": {
"$ref": "#/$defs/__schema34"
},
"widgetVisitorModules": {
"$ref": "#/$defs/__schema35"
},
"widgetUserModules": {
"$ref": "#/$defs/__schema37"
},
"widgetAllowVisitorConversations": {
"$ref": "#/$defs/__schema39"
},
"widgetAllowUserConversations": {
"$ref": "#/$defs/__schema40"
},
"widgetAllowedOrigins": {
"$ref": "#/$defs/__schema41"
},
"widgetVisitorMeasurementEnabled": {
"$ref": "#/$defs/__schema43"
},
"publicOperatorName": {
"$ref": "#/$defs/__schema44"
},
"privacyContact": {
"$ref": "#/$defs/__schema45"
},
"privacyPolicyUrl": {
"$ref": "#/$defs/__schema46"
},
"termsUrl": {
"$ref": "#/$defs/__schema47"
},
"legalNoticeUrl": {
"$ref": "#/$defs/__schema48"
},
"cookieNoticeUrl": {
"$ref": "#/$defs/__schema49"
}
},
"additionalProperties": false
},
"expectedRevision": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"type",
"patch",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "notifications"
},
"patch": {
"type": "object",
"properties": {
"notifyTeamOnNewFeedback": {
"$ref": "#/$defs/__schema50"
},
"notifyParticipantsOnComment": {
"$ref": "#/$defs/__schema51"
},
"notifyAuthorOnStatusChange": {
"$ref": "#/$defs/__schema52"
},
"notifySubscribersOnComment": {
"$ref": "#/$defs/__schema53"
},
"notifySubscribersOnStatusChange": {
"$ref": "#/$defs/__schema54"
},
"emailChangelogSubscribers": {
"$ref": "#/$defs/__schema55"
},
"includeChangelogSummary": {
"$ref": "#/$defs/__schema56"
},
"requireChangelogDoubleOptIn": {
"$ref": "#/$defs/__schema57"
}
},
"additionalProperties": false
},
"expectedRevision": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"type",
"patch",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "operations"
},
"patch": {
"type": "object",
"properties": {
"supportDefaultResponderMode": {
"$ref": "#/$defs/__schema58"
},
"supportSatisfactionEnabled": {
"$ref": "#/$defs/__schema59"
},
"ticketDefaultPriority": {
"$ref": "#/$defs/__schema60"
},
"ticketDefaultCategory": {
"$ref": "#/$defs/__schema61"
},
"ticketDefaultStatus": {
"$ref": "#/$defs/__schema62"
},
"ticketAssignToCreator": {
"$ref": "#/$defs/__schema63"
},
"helpCenterEnabled": {
"$ref": "#/$defs/__schema64"
},
"statusPageEnabled": {
"$ref": "#/$defs/__schema65"
},
"workflowExecutionEnabled": {
"$ref": "#/$defs/__schema66"
},
"supportAiEnabled": {
"$ref": "#/$defs/__schema67"
},
"supportHumanHelpTimeoutSeconds": {
"$ref": "#/$defs/__schema68"
},
"supportCopilotEnabled": {
"$ref": "#/$defs/__schema69"
}
},
"additionalProperties": false
},
"expectedRevision": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"type",
"patch",
"expectedRevision"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "onboarding"
},
"selectedSources": {
"maxItems": 11,
"type": "array",
"items": {
"$ref": "#/$defs/__schema70"
}
},
"expectedRevision": {
"$ref": "#/$defs/__schema1"
}
},
"required": [
"type",
"selectedSources",
"expectedRevision"
],
"additionalProperties": false
}
]
}
},
"required": [
"productId",
"request"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"type": "string",
"minLength": 2,
"maxLength": 100,
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
},
"__schema1": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"__schema2": {
"type": "object",
"properties": {
"font": {
"$ref": "#/$defs/__schema3"
},
"fontUrl": {
"$ref": "#/$defs/__schema4"
},
"primaryColor": {
"$ref": "#/$defs/__schema6"
},
"primaryColorDark": {
"$ref": "#/$defs/__schema8"
},
"showWidget": {
"$ref": "#/$defs/__schema9"
},
"showHelpCollectionTabs": {
"$ref": "#/$defs/__schema10"
},
"hiddenHelpCollectionIds": {
"$ref": "#/$defs/__schema11"
},
"tabLabels": {
"$ref": "#/$defs/__schema13"
},
"tabOrder": {
"$ref": "#/$defs/__schema14"
},
"externalLinks": {
"$ref": "#/$defs/__schema16"
}
}
},
"__schema3": {
"default": "khony",
"type": "string",
"enum": [
"khony",
"system",
"serif",
"mono",
"custom"
]
},
"__schema4": {
"default": "",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"$ref": "#/$defs/__schema5"
}
]
},
"__schema5": {
"type": "string",
"maxLength": 2000,
"format": "uri"
},
"__schema6": {
"default": "",
"$ref": "#/$defs/__schema7"
},
"__schema7": {
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^#[0-9a-f]{6}$"
}
]
},
"__schema8": {
"default": "",
"$ref": "#/$defs/__schema7"
},
"__schema9": {
"default": false,
"type": "boolean"
},
"__schema10": {
"default": true,
"type": "boolean"
},
"__schema11": {
"default": [],
"maxItems": 500,
"type": "array",
"items": {
"$ref": "#/$defs/__schema12"
}
},
"__schema12": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"__schema13": {
"default": {
"feedback": "",
"roadmap": "",
"changelog": "",
"help": "",
"status": ""
},
"type": "object",
"properties": {
"feedback": {
"default": "",
"type": "string",
"maxLength": 40
},
"roadmap": {
"default": "",
"type": "string",
"maxLength": 40
},
"changelog": {
"default": "",
"type": "string",
"maxLength": 40
},
"help": {
"default": "",
"type": "string",
"maxLength": 40
},
"status": {
"default": "",
"type": "string",
"maxLength": 40
}
}
},
"__schema14": {
"default": [
"feedback",
"roadmap",
"changelog",
"help",
"status"
],
"minItems": 5,
"maxItems": 5,
"type": "array",
"items": {
"$ref": "#/$defs/__schema15"
}
},
"__schema15": {
"type": "string",
"enum": [
"feedback",
"roadmap",
"changelog",
"help",
"status"
]
},
"__schema16": {
"default": [],
"maxItems": 12,
"type": "array",
"items": {
"$ref": "#/$defs/__schema17"
}
},
"__schema17": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"pattern": "^[a-zA-Z0-9_-]+$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"url": {
"$ref": "#/$defs/__schema5"
},
"newTab": {
"type": "boolean"
}
},
"required": [
"id",
"label",
"url",
"newTab"
]
},
"__schema18": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"__schema19": {
"type": "string",
"maxLength": 2000
},
"__schema20": {
"type": "string",
"enum": [
"system",
"light",
"dark"
]
},
"__schema21": {
"type": "string",
"minLength": 1,
"maxLength": 32
},
"__schema22": {
"type": "boolean"
},
"__schema23": {
"type": "boolean"
},
"__schema24": {
"type": "boolean"
},
"__schema25": {
"type": "boolean"
},
"__schema26": {
"maxItems": 50,
"type": "array",
"items": {
"$ref": "#/$defs/__schema27"
}
},
"__schema27": {
"type": "string",
"pattern": "^[a-z0-9.-]+\\.[a-z]{2,}$"
},
"__schema28": {
"type": "boolean"
},
"__schema29": {
"type": "boolean"
},
"__schema30": {
"type": "boolean"
},
"__schema31": {
"type": "string",
"enum": [
"left",
"right"
]
},
"__schema32": {
"type": "string",
"maxLength": 40
},
"__schema33": {
"type": "string",
"maxLength": 120
},
"__schema34": {
"type": "string",
"maxLength": 280
},
"__schema35": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"$ref": "#/$defs/__schema36"
}
},
"__schema36": {
"type": "string",
"enum": [
"home",
"messages",
"feedback",
"help",
"updates"
]
},
"__schema37": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"$ref": "#/$defs/__schema38"
}
},
"__schema38": {
"type": "string",
"enum": [
"home",
"messages",
"feedback",
"help",
"updates"
]
},
"__schema39": {
"type": "boolean"
},
"__schema40": {
"type": "boolean"
},
"__schema41": {
"maxItems": 50,
"type": "array",
"items": {
"$ref": "#/$defs/__schema42"
}
},
"__schema42": {
"type": "string",
"format": "uri"
},
"__schema43": {
"type": "boolean"
},
"__schema44": {
"type": "string",
"maxLength": 160
},
"__schema45": {
"type": "string",
"maxLength": 254
},
"__schema46": {
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"maxLength": 500,
"format": "uri"
}
]
},
"__schema47": {
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"maxLength": 500,
"format": "uri"
}
]
},
"__schema48": {
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"maxLength": 500,
"format": "uri"
}
]
},
"__schema49": {
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"maxLength": 500,
"format": "uri"
}
]
},
"__schema50": {
"type": "boolean"
},
"__schema51": {
"type": "boolean"
},
"__schema52": {
"type": "boolean"
},
"__schema53": {
"type": "boolean"
},
"__schema54": {
"type": "boolean"
},
"__schema55": {
"type": "boolean"
},
"__schema56": {
"type": "boolean"
},
"__schema57": {
"type": "boolean"
},
"__schema58": {
"type": "string",
"enum": [
"ai",
"human"
]
},
"__schema59": {
"type": "boolean"
},
"__schema60": {
"type": "string",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"__schema61": {
"type": "string",
"enum": [
"customer",
"backoffice",
"tracker"
]
},
"__schema62": {
"type": "string",
"enum": [
"new",
"open"
]
},
"__schema63": {
"type": "boolean"
},
"__schema64": {
"type": "boolean"
},
"__schema65": {
"type": "boolean"
},
"__schema66": {
"type": "boolean"
},
"__schema67": {
"type": "boolean"
},
"__schema68": {
"type": "integer",
"minimum": 15,
"maximum": 120
},
"__schema69": {
"type": "boolean"
},
"__schema70": {
"type": "string",
"enum": [
"messenger",
"portal",
"email",
"api",
"csv",
"linear",
"slack",
"intercom",
"hubspot",
"jira",
"zendesk"
]
}
}
}Schéma complet de la réponse
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"accepted": {
"type": "boolean",
"const": true
},
"resourceId": {
"type": [
"string",
"null"
]
},
"revision": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
}
},
"required": [
"accepted",
"resourceId",
"revision"
],
"additionalProperties": false
}
},
"required": [
"data"
],
"additionalProperties": false
}Refus et reprise
Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 409, 428, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.
Notes du contrat
{
"description": "Configure a native product. Native rights are checked again on every call. Organization actions have no product target; product actions require a real consented product. Fragmented JSON is reconstructed by concatenating jsonFragment until nextFragmentCursor is null; preserve the request for subsequent fragments. Mutations require the native human confirmation protocol and a stable Idempotency-Key. Native auth, checkout, DNS and storage operations must not be automatically retried after an uncertain result. Their effects are separate from PostgreSQL receipts. Key creation returns key material once without journaling it. Settings JSON preserves the complete native configuration and its resource reference schema."
}