POST · Relier un retour
Rédigé par Red Blue
Mis à jour le
POST /api/v1/inbox/feedback
operationId : inbox_feedback_capture
Accès | Permission | Consentements OAuth |
|---|---|---|
OAuth : délégation d’un équipier pour l’API | support.write | api:connect, support: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.
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.operation | "capture" | conversationId, idempotencyKey, boardId, title, document |
request.operation | "dismiss_proposal" | conversationId, idempotencyKey, proposalId |
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/inbox/feedback" \
--header "Authorization: Bearer $KHONY_ACCESS_TOKEN" \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": "product_01k3w8d7vhe008000000000001",
"request": {
"operation": "capture",
"conversationId": "support_conversation_01k3w8d7vhe008000000000002",
"idempotencyKey": "0198f886-9f71-7000-8000-000000000099",
"boardId": "board_01k3w8d7vhe008000000000009",
"title": "Customer signal",
"document": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Diagnostic",
"marks": [
{
"type": "bold"
}
]
}
]
},
{
"type": "callout",
"attrs": {
"variant": "info"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Keep the original source document."
}
]
}
]
},
{
"type": "table",
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Step"
}
]
}
]
},
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Result"
}
]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Read"
}
]
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Verified"
}
]
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Documentation",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://example.test/help"
}
}
]
}
]
}
]
},
"visibility": "internal"
}
}'Réponse de succès · HTTP 200
{
"data": {
"postId": "post_01k3w8d7vhe00800000000000g",
"document": {
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Diagnostic",
"marks": [
{
"type": "bold"
}
]
}
]
},
{
"type": "callout",
"attrs": {
"variant": "info"
},
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Keep the original source document."
}
]
}
]
},
{
"type": "table",
"content": [
{
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Step"
}
]
}
]
},
{
"type": "tableHeader",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Result"
}
]
}
]
}
]
},
{
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Read"
}
]
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Verified"
}
]
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Documentation",
"marks": [
{
"type": "link",
"attrs": {
"href": "https://example.test/help"
}
}
]
}
]
}
]
}
}
}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": {
"operation": {
"type": "string",
"const": "capture"
},
"conversationId": {
"$ref": "#/$defs/__schema0"
},
"idempotencyKey": {
"$ref": "#/$defs/__schema1"
},
"boardId": {
"type": "string",
"pattern": "^board_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"title": {
"type": "string",
"minLength": 3,
"maxLength": 180
},
"document": {
"$ref": "#/$defs/__schema2"
},
"visibility": {
"default": "internal",
"type": "string",
"enum": [
"public",
"internal"
]
},
"tags": {
"default": [],
"maxItems": 10,
"type": "array",
"items": {
"$ref": "#/$defs/__schema3"
}
},
"sourceMessageId": {
"type": "string",
"pattern": "^support_message_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"proposalId": {
"type": "string",
"pattern": "^support_conversation_event_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
}
},
"required": [
"operation",
"conversationId",
"idempotencyKey",
"boardId",
"title",
"document"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"const": "dismiss_proposal"
},
"conversationId": {
"$ref": "#/$defs/__schema0"
},
"idempotencyKey": {
"$ref": "#/$defs/__schema1"
},
"proposalId": {
"type": "string",
"pattern": "^support_conversation_event_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
}
},
"required": [
"operation",
"conversationId",
"idempotencyKey",
"proposalId"
],
"additionalProperties": false
}
]
}
},
"required": [
"productId",
"request"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"type": "string",
"pattern": "^support_conversation_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
},
"__schema1": {
"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)$"
},
"__schema2": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema2"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema2"
}
}
]
},
"__schema3": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 40
},
"color": {
"type": "string",
"maxLength": 30
}
},
"required": [
"name",
"color"
],
"additionalProperties": false
}
}
}Schéma complet de la réponse
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"data"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}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": "Requires a dedicated API OAuth bearer for audience /api/v1 plus api:connect and the declared support scope, current product/organization consent, native permissions and source policies. No cookie or MCP-audience token fallback. Commercial admission is shared with the public API. Human source/proposal decisions preserve native Feedback permissions, actual contact attribution, full article document and internal/public visibility. Stable command keys have immutable receipts. Follow invitations remain separate verified human sends."
}