POST
/
notification
/
fcm-creds
curl --request POST \
  --url https://api.eka.care/notification/fcm-creds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "sa_key": {
    "type": "service_account",
    "project_id": "example-project",
    "private_key_id": "1234567890abcdef",
    "private_key": "-----BEGIN PRIVATE KEY-----\\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\\n-----END PRIVATE KEY-----\\n",
    "client_email": "example@example.iam.gserviceaccount.com",
    "client_id": 12345678901234567000,
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/example@example.iam.gserviceaccount.com",
    "universal_domain": "example.com"
  }
}'
{
  "message": "FCM token added successfully"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

The request body must contain the FCM payload information. The format should be:

  "sa_key": {
    "type": "string",
    "project_id": "string",
    "private_key_id": "string",
    "private_key": "string",
    "client_email": "string",
    "client_id": "string",
    "auth_uri": "string",
    "token_uri": "string",
    "auth_provider_x509_cert_url": "string",
    "client_x509_cert_url": "string",
    "universal_domain": "string"
  }
} ```
sa_key
object
required

Response

200
application/json
Successful response

The response is of type object.