{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/listings-api/json-schema/listings-api-respond-to-interaction-payload-schema.json",
  "title": "RespondToInteractionPayload",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/listings-api-reviews-api-openapi.yml#/components/schemas/RespondToInteractionPayload",
  "type": "object",
  "properties": {
    "interaction": {
      "$ref": "#/$defs/InteractionResponse"
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ErrorType"
      }
    }
  },
  "$defs": {
    "ContextInfoType": {
      "type": "object",
      "description": "(also defined by packaging) (also defined by task-manager)",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "ErrorType": {
      "type": "object",
      "description": "(also defined by contests) (also defined by packaging) (also defined by task-manager) (also defined by social-media) (also defined by messenger) (also defined by crm-integration) (also defined by crawler) (also defined by media-manager)",
      "properties": {
        "message": {
          "type": "string"
        },
        "contextInfo": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContextInfoType"
          }
        },
        "code": {
          "type": "string"
        }
      }
    },
    "InteractionResponse": {
      "type": "object",
      "description": "A response to an interaction (review reply, Q&A answer).",
      "properties": {
        "id": {
          "type": "string"
        },
        "interactionId": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "authorName": {
          "type": "string"
        },
        "date": {
          "type": "string"
        },
        "respondedWith": {
          "type": "string"
        },
        "respondedBy": {
          "type": "integer",
          "format": "int32"
        },
        "interactionStatus": {
          "$ref": "#/$defs/InteractionResponseStatus"
        },
        "editedResponse": {
          "type": "boolean"
        },
        "remarks": {
          "type": "string"
        }
      }
    },
    "InteractionResponseStatus": {
      "type": "string",
      "enum": [
        "CREATED",
        "FAILED",
        "COMPLETED",
        "CONFIRMED"
      ],
      "description": "Lifecycle state of a response item as it's posted out to the source site."
    }
  }
}