{
 "openapi": "3.1.0",
 "info": {
  "title": "Messages to Candidates (HRMS)",
  "version": "20261030b",
  "description": "Every message written to a candidate -- by itself or by hand, sent, held, opted out or failed -- and why."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "candidate-communications": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "candidate_id": {
      "type": "string",
      "format": "uuid",
      "description": "Candidate id",
      "readOnly": true
     },
     "application_id": {
      "type": "string",
      "format": "uuid",
      "description": "Application id",
      "readOnly": true
     },
     "offer_id": {
      "type": "string",
      "format": "uuid",
      "description": "Offer id",
      "readOnly": true
     },
     "template_id": {
      "type": "string",
      "format": "uuid",
      "description": "Template id",
      "readOnly": true
     },
     "event": {
      "type": "string",
      "description": "Event",
      "readOnly": true
     },
     "channel": {
      "type": "string",
      "description": "Channel",
      "readOnly": true
     },
     "automatic": {
      "type": "boolean",
      "description": "Automatic",
      "readOnly": true
     },
     "to_address": {
      "type": "string",
      "description": "To address",
      "readOnly": true
     },
     "subject": {
      "type": "string",
      "description": "Subject",
      "readOnly": true
     },
     "body": {
      "type": "string",
      "description": "Body",
      "readOnly": true
     },
     "reason": {
      "type": "string",
      "description": "Reason",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "sent_by": {
      "type": "string",
      "format": "uuid",
      "description": "Sent by",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "sent_at": {
      "type": "string",
      "format": "date-time",
      "description": "Sent at",
      "readOnly": true
     },
     "candidate_no": {
      "type": "string",
      "description": "Candidate no",
      "readOnly": true
     },
     "candidate_name": {
      "type": "string",
      "description": "Candidate name",
      "readOnly": true
     },
     "application_no": {
      "type": "string",
      "description": "Application no",
      "readOnly": true
     },
     "template_code": {
      "type": "string",
      "description": "Template code",
      "readOnly": true
     },
     "sent_by_name": {
      "type": "string",
      "description": "Sent by name",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/candidate-communications": {
   "get": {
    "summary": "list candidate-communications",
    "operationId": "list_candidate_communications_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post messages to candidates",
    "operationId": "action_candidate_communications_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/candidate-communications/{id}": {
   "get": {
    "summary": "get candidate-communications",
    "operationId": "get_candidate_communications_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put messages to candidates",
    "operationId": "action_candidate_communications_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete messages to candidates",
    "operationId": "action_candidate_communications_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/candidate-communications/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_candidate_communications_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}