Add dcoumentation for API (#18)

This commit is contained in:
KM Koushik authored and GitHub committed 2024-05-22 19:43:17 +10:00
1 parent b9643f41e1
commit e0fc68d4c0
7 files changed
+100 -14

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
---
title: Introduction
description: "Fundamental concepts of Usend's API."
---
## Base URL
Unsend's API is built on REST principles and is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
The Base URL for all API endpoints is:
```sh Terminal
https://app.unsend.dev/api/
```
## Authentication
Authentication to Usend's API is performed via the Authorization header with a Bearer token. To authenticate, you need to include the Authorization header with the word Bearer followed by your token in your API requests like so:
```sh Terminal
Authorization: Bearer us_12345
```
You can create a new token/API key under your Unsend [Developer Settings](https://app.unsend.dev/api-keys).
+12
View File
@@ -106,6 +106,18 @@
},
"/v1/emails/{emailId}": {
"get": {
"parameters": [
{
"schema": {
"type": "string",
"minLength": 3,
"example": "1212121"
},
"required": true,
"name": "emailId",
"in": "path"
}
],
"responses": {
"200": {
"description": "Retrieve the user",