Authentication

Authentication

All requests to Fery APIs require an API key.

Request header

1x-api-key: <API_KEY>

Call Fery APIs from your backend only. Do not embed the API key in client applications.

Example

$curl --request POST \
> --url https://uat.feryrides.co.in/ride/fare-estimate \
> --header 'x-api-key: <API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "pickupLocation": { "lat": 28.459119, "lng": 77.072912 },
> "dropLocation": { "lat": 28.475482, "lng": 77.088265 }
> }'

Invalid API key

1{
2 "statusCode": 401,
3 "success": false,
4 "message": "Unauthorized",
5 "errors": {}
6}

Webhook authentication

When Fery sends events to your webhookURL, each request includes:

1secretkey: <WEBHOOK_SECRET>

Validate this header before processing the payload. The webhook secret is different from x-api-key and is shared by Fery separately.