Add a secret
curl --request POST \
--url https://developer.creao.ai/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "X_BEARER_TOKEN",
"value": "your_token_here"
}
'const url = 'https://developer.creao.ai/v1/secrets';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'X_BEARER_TOKEN', value: 'your_token_here'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://developer.creao.ai/v1/secrets"
payload = {
"name": "X_BEARER_TOKEN",
"value": "your_token_here"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Secrets
Add a secret
Create an account secret. The value is never returned.
POST
/
v1
/
secrets
Add a secret
curl --request POST \
--url https://developer.creao.ai/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "X_BEARER_TOKEN",
"value": "your_token_here"
}
'const url = 'https://developer.creao.ai/v1/secrets';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'X_BEARER_TOKEN', value: 'your_token_here'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://developer.creao.ai/v1/secrets"
payload = {
"name": "X_BEARER_TOKEN",
"value": "your_token_here"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
bearerAuthapiKeyQuery
Account API key from Developer Console. Keys start with cr_sk_.
Body
application/json