feat: add Mintlify docs (#16787)

* feat: Add Mintlify docs

* Fixed the mint.json for v2

* Fixed versioning issue

* Add titles to ICS feed endpoints

* Added errors to v1

* Added rate-limit to API v1

* feat: added v1-v2 differences and v1 auth

* Trying to eliminate reasons for v1 not showing on publication

* Used the swagger openapi validator

* remove deprecated v1 endpoints

* Moved api docs into new folders without api-reference

* Renamed api to api-reference

* removed the versioning

* Got rid of anchor warnings

* Fixed naming

* Just as a test - using the same v2 openapi spec for v1 reference

* Removed 'externalDocs' from v1

* Removed securitySchemes

* Updated the diff between v1/v2

* Added v1 in front of /attendees to test

* Moved paths up and removed externalDocs

* Testing - Added content to the response

* Reduced paths to 1

* Testing: anything at this point

* Fixed validation

* Moved the other .mdx files to see if that's disrupting something

* Trying with a tab

* Empty tags array

* Added back servers field

* Removed all other schemas

* Removed v1 for now

* Added platform docs

* Language fixes

* Added v1 back

* add API V1 response for attendees

* remove unnecessary endpoint docs in API V1

* Removing platform and API for now

* Updated v2 openapi doc

---------

Co-authored-by: Syed Ali Shahbaz <[email protected]>
This commit is contained in:
Keith WilliamsandSyed Ali Shahbaz authored and GitHub committed 2024-10-03 15:26:01 +04:00
1 parent 2146c04444
commit be728e9c01
207 files changed
+18939 -639

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
---
title: "Authentication"
---
The Cal.com API uses API keys to authenticate requests. You can view and manage your API keys in your settings page under the security tab in Cal.com.
<img src="/images/i1600x899-DllqhV6w_3Vj_oxtjov.png" />
API Keys are under Settings > Security
Test mode secret keys have the prefix `cal_` and live mode secret keys have the prefix `cal_live_`.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication to the API is performed via URL Query Params. Provide your API key as a query param like: `https://api.cal.com/v1/?apiKey=cal_live_xxxxxx`
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
+57
View File
@@ -0,0 +1,57 @@
---
title: "Errors"
---
Cal.com uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, or something else failed, etc.). Codes in the 5xx range indicate an error with Cal.com's servers (these are rare).
<table>
<thead>
<tr>
<th>HTTP</th>
<th>Status Code</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>OK</td>
<td>Everything worked as expected</td>
</tr>
<tr>
<td>400</td>
<td>Bad Request</td>
<td>The request was unacceptable, often due to missing a required parameter</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>No valid API key provided.</td>
</tr>
<tr>
<td>402</td>
<td>Request Failed</td>
<td>The parameters were valid but the request failed.</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>The API key doesn't have permissions to perform the request.</td>
</tr>
<tr>
<td>404</td>
<td>Not Found</td>
<td>The requested resource doesn't exist.</td>
</tr>
<tr>
<td>429</td>
<td>Too Many Requests</td>
<td>Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.</td>
</tr>
<tr>
<td>500, 502, 503, 504</td>
<td>erver Errors</td>
<td>Something went wrong on our servers end. (These are rare.)</td>
</tr>
</tbody>
</table>
+51
View File
@@ -0,0 +1,51 @@
---
title: "Quick start"
---
## Get your API keys
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can generate an API key from **Settings >** [**Security**](https://app.cal.com/settings/security) within the application. There you will find the API keys section which allows you to generate a key for use.
More information on this can be found in the [Authentication](authentication) page.
## Install the library
The best way to interact with our API is using a good HTTP client like **axios**:
<Tabs>
<Tab title="Node">
```
# Install via NPM
npm install --save axios
# Install via Yarn
yarn add axios
```
</Tab>
<Tab title="Python">
```
# Install via pip
pip install --upgrade requests
```
</Tab>
</Tabs>
## Make your first request
To make your first request, send an authenticated request to the event-types endpoint. This will list all of your event types.
Example using `curl`:
<Tabs>
<Tab title="Curl">
```
curl https://api.cal.com/v1/event-types?apiKey=cal_test_xxxxxx
```
</Tab>
</Tabs>
## Try our Postman Collection
We've created a small collection of frequently made API calls that you can try in our [Postman Collection](https://www.postman.com/calcom/workspace/cd670dd8-b36d-4aee-8ab2-9044122e30d1/collection/20666831-b92a1d73-bfcc-4a5f-9ef5-cb117d49c904)
File diff suppressed because it is too large. Load diff
+39
View File
@@ -0,0 +1,39 @@
---
title: "Rate limits"
---
We limit the number of calls you can make over a certain period of time. Rate limits vary and are specified by the following header in all responses:
<table>
<thead>
<tr>
<th>Header</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>X-RateLimit-Limit</td>
<td>The maximum number of requests that the consumer is permitted to make.</td>
</tr>
<tr>
<td>X-RateLimit-Remaining</td>
<td>The number of requests remaining in the current rate limit window.</td>
</tr>
<tr>
<td>X-RateLimit-Reset</td>
<td>The time at which the current rate limit window resets in UTC epoch seconds.</td>
</tr>
</tbody>
</table>
When the rate limit is **exceeded**, an error is returned with the status **"429 Too Many Requests"**:
```json
{
"error": {
"code": "too_many_requests",
"message": "Rate limit exceeded",
}
}
```