POST
/
notification
/
v1
/
connect
/
webhook
/
subscriptions
curl --request POST \
  --url https://api.eka.care/notification/v1/connect/webhook/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "scopes": [
    "appointment.created",
    "appointment.updated",
    "prescription.created",
    "prescription.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.

scopes
string[]

Specifies the type of events that will trigger the webhook.

  • "all": Trigger on all events.
  • "appointment.created": Trigger on appointment create events.
  • "user.delete": Trigger on user delete events.
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.

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.

Response

201
application/json
Webhook registered successfully.
id
string

The unique identifier for the webhook.

status
string

A message indicating the status of the response.