1
Create a ByDoctor account
If you don’t already have an account, sign up for free at app.bydoctor.com.br/auth/sign-up. Complete the clinic onboarding flow to provision your tenant. You need an active clinic account before you can issue API keys or access any data.
The account you create during sign-up is automatically assigned the Admin role, which is required to generate API keys.
2
Generate your API key
In your ByDoctor dashboard, navigate to Settings → API and click New API Key. Name it something descriptive like All subsequent examples read from this variable so you never have to paste the key directly into a command.
quickstart-test, select the read and write scopes, and click Create.Copy the key immediately — it is shown only once. Store it as an environment variable for the commands below:3
List your appointments
Fetch the list of appointments for your clinic with a A successful response looks like this:
GET request to /appointments. The response is a paginated array of appointment objects.4
Create your first appointment
Send a On success, the API returns The
POST request to /appointments with the required fields. The starts_at and ends_at fields must be ISO 8601 timestamps with a timezone offset.201 Created with the full appointment object:status field starts as "scheduled" when you create an appointment programmatically. The lifecycle values are:5
Set up a webhook
Register a webhook endpoint to receive real-time notifications whenever an appointment is created. Send a The API responds with From now on, ByDoctor will send a signed
POST request to /webhooks with your listener URL and the events you want to subscribe to.201 Created and your new webhook registration:POST request to your URL each time a new appointment is created. Use the secret field to verify the webhook signature and confirm that payloads originate from ByDoctor.Next Steps
You’ve made your first API calls and have a live webhook running. Explore the rest of the documentation to go deeper.Explore the Data Model
Understand how clinics, professionals, patients, and appointments relate to each other in ByDoctor’s multi-tenant data structure.
Set Up Webhooks
Learn every available event type, how to validate webhook signatures, and best practices for building reliable event consumers.
API Reference
Browse the full reference for the Appointments resource — all query parameters, request body fields, and response schemas.
Scheduling Integration Guide
Follow a step-by-step guide to building a two-way sync between ByDoctor’s calendar and an external scheduling system.