Create a secret
curl --request POST \
--url https://guidinghand.ai/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "AIRTABLE_API_KEY",
"value": "<string>",
"hosts": [
"api.airtable.com"
],
"agents": [
"<string>"
],
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'AIRTABLE_API_KEY',
value: '<string>',
hosts: ['api.airtable.com'],
agents: ['<string>'],
label: '<string>'
})
};
fetch('https://guidinghand.ai/v1/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/secrets"
payload = {
"name": "AIRTABLE_API_KEY",
"value": "<string>",
"hosts": ["api.airtable.com"],
"agents": ["<string>"],
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "secret",
"id": "<string>",
"name": "AIRTABLE_API_KEY",
"label": "<string>",
"kind": "api_key",
"hint": "patA…c3d4",
"hosts": [
"<string>"
],
"agents": [
"<string>"
],
"source": {},
"used_by": [
{
"agent_id": "<string>",
"name": "<string>",
"draft": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"use_count": 123,
"last_status": 123
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Agent tools
Create a secret
Saves a key or password, sealed with the org’s own key. Needs the admin role or an API key.
POST
/
v1
/
secrets
Create a secret
curl --request POST \
--url https://guidinghand.ai/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "AIRTABLE_API_KEY",
"value": "<string>",
"hosts": [
"api.airtable.com"
],
"agents": [
"<string>"
],
"label": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'AIRTABLE_API_KEY',
value: '<string>',
hosts: ['api.airtable.com'],
agents: ['<string>'],
label: '<string>'
})
};
fetch('https://guidinghand.ai/v1/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/secrets"
payload = {
"name": "AIRTABLE_API_KEY",
"value": "<string>",
"hosts": ["api.airtable.com"],
"agents": ["<string>"],
"label": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "secret",
"id": "<string>",
"name": "AIRTABLE_API_KEY",
"label": "<string>",
"kind": "api_key",
"hint": "patA…c3d4",
"hosts": [
"<string>"
],
"agents": [
"<string>"
],
"source": {},
"used_by": [
{
"agent_id": "<string>",
"name": "<string>",
"draft": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"use_count": 123,
"last_status": 123
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
Body
application/json
Response
OK