إنتقل إلى المحتوى الرئيسي

Communication

Create communication records related to Prior Authorizations. Communications are used to exchange additional information (notes, attachments, follow-ups) on an existing prior authorization, identified by its transaction_id.

Base URL:

https://api.{client_namespace}.najeeb.ai/v4.0/health/communication
Authentication

All endpoints require HTTPS and an access-key header. See the Overview for details.


Create Communication

POST /create

Create a communication record linked to an existing prior authorization. The prior authorization is identified by the transaction_id that was used when the prior authorization was originally created.

When a communication is created, the linked prior authorization is automatically set back to PENDING status so it can be re-evaluated with the new information.

Request Body

FieldTypeRequiredConstraintsDescription
transaction_id*stringYes1-255 charsThe transaction_id of the prior authorization this communication relates to (same as create pre-auth)
user_namestringNo-Name of the user submitting the communication
titlestringNo-Title or subject of the communication
contentstringNo-Body text / message content of the communication
pathstringNo-File path or URL of an attached document
sizestringNo-Size of the attached file (e.g. "1024")
datestringNoFull ISO-8601 DateTimeDate associated with the communication (e.g. "2026-02-21T00:00:00.000Z")

Request Example

curl -X POST \
"https://api.{client_namespace}.najeeb.ai/v4.0/health/communication/create" \
-H "access-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"user_name": "Dr. Ahmed",
"title": "Additional lab results",
"content": "Attached are the latest lab results for the patient.",
"path": "https://storage.example.com/docs/lab-results-2026.pdf",
"size": "204800",
"date": "2026-02-21T00:00:00.000Z"
}'

Response

201 Created

{
"id": 1,
"code": 201,
"message": "Communication created successfully"
}

Error Responses

StatusError CodeDescription
400E_BAD_REQUEST_400Bad Request - Invalid input data or validation errors. Check the details array for specifics.
404E_EPA_064Not Found - Prior authorization with the given transaction_id was not found.

400 Bad Request example:

{
"ErrorCode": "E_BAD_REQUEST_400",
"message": "Bad request - Invalid input data or validation errors",
"details": [
"transaction_id should not be empty",
"transaction_id must be a string"
]
}

404 Not Found example:

{
"ErrorCode": "E_EPA_064",
"message": "Prior authorization not found, The id of the prior authorization is: 550e8400-e29b-41d4-a716-446655440000",
"details": []
}