Identity
Create a personal access token
Signed-in session only. Body { name, permissions?, expires_at? }. permissions may include notes.write and notes.review, and only when the session already has them. Read is implicit. The token secret is returned once. A personal access token cannot call this route.
POST
/
v1
/
access-tokens
Create a personal access token
curl --request POST \
--url https://api.elanotes.com/v1/access-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expires_at": "<string>",
"permissions": []
}
'import requests
url = "https://api.elanotes.com/v1/access-tokens"
payload = {
"name": "<string>",
"expires_at": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expires_at: '<string>', permissions: []})
};
fetch('https://api.elanotes.com/v1/access-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elanotes.com/v1/access-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expires_at' => '<string>',
'permissions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elanotes.com/v1/access-tokens"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.elanotes.com/v1/access-tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elanotes.com/v1/access-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"expires_at": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "<string>",
"mcp_url": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"revoked_at": "<string>",
"token": "<string>",
"token_prefix": "<string>"
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}Authorizations
Static bearer, WorkOS JWT, or open local when AUTH_REQUIRED is off and no static tokens are set. The token selects the vault; paths do not include vault_id.
Body
application/json
Response
Default Response
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$⌘I
Create a personal access token
curl --request POST \
--url https://api.elanotes.com/v1/access-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expires_at": "<string>",
"permissions": []
}
'import requests
url = "https://api.elanotes.com/v1/access-tokens"
payload = {
"name": "<string>",
"expires_at": "<string>",
"permissions": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expires_at: '<string>', permissions: []})
};
fetch('https://api.elanotes.com/v1/access-tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.elanotes.com/v1/access-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'expires_at' => '<string>',
'permissions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.elanotes.com/v1/access-tokens"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.elanotes.com/v1/access-tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elanotes.com/v1/access-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"expires_at\": \"<string>\",\n \"permissions\": []\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"expires_at": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "<string>",
"mcp_url": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"revoked_at": "<string>",
"token": "<string>",
"token_prefix": "<string>"
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}{
"details": [
{
"@type": "<string>"
}
],
"error": "<string>",
"help": "<string>",
"hint": "<string>",
"message": "<string>",
"reason": "<string>",
"requestId": "<string>",
"statusCode": 0
}
