Create an API key
curl --request POST \
--url https://api.webstashai.com/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"mcp:read",
"mcp:write"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['mcp:read', 'mcp:write']})
};
fetch('https://api.webstashai.com/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webstashai.com/auth/api-keys"
payload = {
"name": "<string>",
"scopes": ["mcp:read", "mcp:write"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"key_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"scopes": [
"mcp:read"
],
"key": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}Create an API key
POST
https://api.webstashai.com
/
auth
/
api-keys
Create an API key
curl --request POST \
--url https://api.webstashai.com/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"mcp:read",
"mcp:write"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['mcp:read', 'mcp:write']})
};
fetch('https://api.webstashai.com/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webstashai.com/auth/api-keys"
payload = {
"name": "<string>",
"scopes": ["mcp:read", "mcp:write"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"key_prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"scopes": [
"mcp:read"
],
"key": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}Authorizations
Body
application/json
Response
API key created
