Authentication
The Fertiligent API is protected by OpenID Connect (OIDC). Every request to
https://api.fertiligent.ai must carry a valid OAuth 2.0 bearer access token.
Endpoints
| Purpose | URL |
|---|---|
| OIDC discovery | https://is.fertiligent.ai/.well-known/openid-configuration |
| Token endpoint | https://is.fertiligent.ai/connect/token |
| API base | https://api.fertiligent.ai |
The identity server (is.fertiligent.ai) issues tokens; the API
(api.fertiligent.ai) validates them. Fertiligent is multi-tenant — your
clinic's portal lives at https://<your-tenant>.fertiligent.ai — while the token
and API hosts are shared.
Getting credentials
Your client_id, client secret (for server-to-server clients), and the scopes
you are allowed to request are provisioned by Fertiligent. Contact your
Fertiligent representative to register an integration client. Interactive
applications use the Authorization Code flow; server-to-server integrations use
the Client Credentials flow.
The API scope is ClientelePortal. Also request offline_access if you need a
refresh token.
Getting a token (client credentials)
curl -X POST https://is.fertiligent.ai/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=ClientelePortal"
The response contains an access_token. Send it as a bearer token on every API
call:
curl https://api.fertiligent.ai/api/care/referrals \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Browse every endpoint and its request/response schema in the API Reference.