Skip to main content
POST
/
notification
/
v1
/
connect
/
webhook
/
subscriptions
Register Webhook
curl --request POST \
  --url https://api.eka.care/notification/v1/connect/webhook/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "event_names": [
    "appointment.created",
    "appointment.updated",
    "prescription.created",
    "prescription.updated",
    "receipt.created",
    "receipt.updated"
  ],
  "endpoint": "https://example.com/webhook",
  "signing_key": "supersecretkey",
  "protocol": "https"
}'
{
  "id": "7",
  "status": "success"
}

Authorizations

Authorization
string
header
required

The API requires a Bearer token in the Authorization header for authentication.

Body

application/json
endpoint
string
required

The fully qualified URL where the webhook will send POST requests. The URL must be reachable by the webhook service.

Example:

"https://example.com/webhook"

event_names
string[]

Specifies the type of events that will trigger the webhook.

  • "appointment.created": Trigger on appointment create events.
  • "user.delete": Trigger on user delete events.
Example:
[
"appointment.created",
"appointment.updated",
"prescription.created",
"prescription.updated",
"receipt.created",
"receipt.updated"
]
signing_key
string

A secret key provided by the client for verifying the authenticity of webhook payloads. It should be a securely generated, random string.

Example:

"supersecretkey"

protocol
string

Specifies the protocol or delivery mechanism used for the webhook.

  • "http": Plain HTTP endpoint.
  • "https": Secure HTTPS endpoint.
  • "SQS endpoint": AWS SQS queue URL for message delivery.
  • "Lambda function": AWS Lambda function ARN for direct invocation.
Example:

"https"

Response

Webhook registered successfully.

id
string

The unique identifier for the webhook.

Example:

"7"

status
string

A message indicating the status of the response.

Example:

"success"

I