{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asapp3/json-schema/asapp3-get-message-response-schema.json",
  "title": "GetMessageResponse",
  "description": "Response for GetMessage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asapp3-conversations-api-openapi.yml#/components/schemas/GetMessageResponse",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "description": "Text sent"
    },
    "sender": {
      "description": "A participant within a conversation",
      "type": "object",
      "properties": {
        "role": {
          "$ref": "#/$defs/ParticipantRole"
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier for the relevant participant role."
        }
      },
      "required": [
        "role"
      ]
    },
    "messageId": {
      "type": "string",
      "minLength": 1,
      "description": "The identifier of the message."
    },
    "createdTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the message object was created in the ASAPP system."
    },
    "clientTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when the message was sent."
    }
  },
  "required": [
    "text",
    "sender",
    "messageId",
    "createdTimestamp",
    "clientTimestamp"
  ],
  "$defs": {
    "ParticipantRole": {
      "description": "A participant role, usually the customer or an agent for human participants. System participant is also allowed but keep in mind\nthat this role won't be considered a participant in a conversation, just a message sender.\n",
      "type": "string",
      "enum": [
        "agent",
        "customer",
        "system"
      ]
    }
  }
}