Connect a vault provider
curl --request POST \
--url https://agent.tinyfish.ai/v1/vault/connections \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"provider": "1password",
"token": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"masterPassword": "<string>",
"serverUrl": "https://vault.example.com"
}
'import requests
url = "https://agent.tinyfish.ai/v1/vault/connections"
payload = {
"provider": "1password",
"token": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"masterPassword": "<string>",
"serverUrl": "https://vault.example.com"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '1password',
token: '<string>',
clientId: '<string>',
clientSecret: '<string>',
masterPassword: '<string>',
serverUrl: 'https://vault.example.com'
})
};
fetch('https://agent.tinyfish.ai/v1/vault/connections', 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://agent.tinyfish.ai/v1/vault/connections",
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([
'provider' => '1password',
'token' => '<string>',
'clientId' => '<string>',
'clientSecret' => '<string>',
'masterPassword' => '<string>',
'serverUrl' => 'https://vault.example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/vault/connections"
payload := strings.NewReader("{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://agent.tinyfish.ai/v1/vault/connections")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/vault/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"connectionId": "conn_123",
"connected": true,
"provider": "1password",
"items": [
{
"itemId": "cred:conn-123:Personal:item-abc123",
"connectionId": "conn_123",
"label": "Amazon Login",
"vaultName": "Personal",
"domains": [
"amazon.com"
],
"fieldMetadata": [
{
"fieldId": "password",
"label": "Password",
"type": "CONCEALED"
}
],
"hasTotp": true
}
]
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}Vault
Connect a vault provider
Connect a supported password manager and immediately sync display-safe credential metadata.
POST
/
v1
/
vault
/
connections
Connect a vault provider
curl --request POST \
--url https://agent.tinyfish.ai/v1/vault/connections \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"provider": "1password",
"token": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"masterPassword": "<string>",
"serverUrl": "https://vault.example.com"
}
'import requests
url = "https://agent.tinyfish.ai/v1/vault/connections"
payload = {
"provider": "1password",
"token": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"masterPassword": "<string>",
"serverUrl": "https://vault.example.com"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '1password',
token: '<string>',
clientId: '<string>',
clientSecret: '<string>',
masterPassword: '<string>',
serverUrl: 'https://vault.example.com'
})
};
fetch('https://agent.tinyfish.ai/v1/vault/connections', 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://agent.tinyfish.ai/v1/vault/connections",
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([
'provider' => '1password',
'token' => '<string>',
'clientId' => '<string>',
'clientSecret' => '<string>',
'masterPassword' => '<string>',
'serverUrl' => 'https://vault.example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://agent.tinyfish.ai/v1/vault/connections"
payload := strings.NewReader("{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://agent.tinyfish.ai/v1/vault/connections")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/vault/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"1password\",\n \"token\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"masterPassword\": \"<string>\",\n \"serverUrl\": \"https://vault.example.com\"\n}"
response = http.request(request)
puts response.read_body{
"connectionId": "conn_123",
"connected": true,
"provider": "1password",
"items": [
{
"itemId": "cred:conn-123:Personal:item-abc123",
"connectionId": "conn_123",
"label": "Amazon Login",
"vaultName": "Personal",
"domains": [
"amazon.com"
],
"fieldMetadata": [
{
"fieldId": "password",
"label": "Password",
"type": "CONCEALED"
}
],
"hasTotp": true
}
]
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
}
}Authorizations
API key for authentication. Get your key from the API Keys page.
Body
application/json
Connect a vault provider. For 1password, provide token. For bitwarden, provide clientId, clientSecret, and masterPassword.
Vault provider identifier.
Available options:
1password, bitwarden Example:
"1password"
1Password service account token. Required when provider is 1password.
Bitwarden client ID. Required when provider is bitwarden.
Bitwarden client secret. Required when provider is bitwarden.
Bitwarden master password. Required when provider is bitwarden.
Optional self-hosted Bitwarden server URL.
Example:
"https://vault.example.com"
Was this page helpful?
⌘I