Add dcoumentation for API (#18)
This commit is contained in:
@@ -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).
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user