Skip to main content

Making your first API call

This walks through the shortest path from credentials to a working API response.

1. Get a token

Follow Authentication to obtain a bearer access token from https://is.fertiligent.ai/connect/token, requesting the ClientelePortal scope. For example, with the client credentials flow:

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"

Take the access_token from the response for the next step.

2. Call the API

Every request to https://api.fertiligent.ai needs that token in an Authorization: Bearer header. For example, to list referrals:

curl https://api.fertiligent.ai/api/care/referrals \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

A successful call returns a JSON response describing your tenant's referrals.

3. Explore the rest of the API

/api/care/referrals is just one endpoint. The full set of endpoints, including request and response schemas, is documented in the API Reference.

If you're building an integration that spans more than one clinic, see Multi-tenancy & environments for how tenant resolution and credentials work.