Create SSH key
curl --request POST \
--url https://app.oryzacloud.app/api/client/account/ssh-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example Resource",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com"
}
'import requests
url = "https://app.oryzacloud.app/api/client/account/ssh-keys"
payload = {
"name": "Example Resource",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com"
}
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: 'Example Resource',
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com'
})
};
fetch('https://app.oryzacloud.app/api/client/account/ssh-keys', 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://app.oryzacloud.app/api/client/account/ssh-keys",
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' => 'Example Resource',
'public_key' => 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com'
]),
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://app.oryzacloud.app/api/client/account/ssh-keys"
payload := strings.NewReader("{\n \"name\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\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://app.oryzacloud.app/api/client/account/ssh-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/api/client/account/ssh-keys")
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\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"object": "ssh_key",
"attributes": {
"name": "Alanis McLaughlin",
"fingerprint": "T2b3VnvHWUmfhDOFLqzZg2VfLgqJhWxzrMUy8WZ+V8M",
"public_key": "-----BEGIN PUBLIC KEY-----\r\nMCowBQYDK2VwAyEA5pcirT00fhr3cRV2u8diJnrtaP4YEQFD2i7hbSpJibY=\r\n-----END PUBLIC KEY-----",
"created_at": "2026-09-22T14:45:23+00:00"
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}Chaves SSH
Adicionar Chave SSH
Adiciona uma chave pública SSH para acesso aos servidores.
POST
/
api
/
client
/
account
/
ssh-keys
Create SSH key
curl --request POST \
--url https://app.oryzacloud.app/api/client/account/ssh-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example Resource",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com"
}
'import requests
url = "https://app.oryzacloud.app/api/client/account/ssh-keys"
payload = {
"name": "Example Resource",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com"
}
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: 'Example Resource',
public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com'
})
};
fetch('https://app.oryzacloud.app/api/client/account/ssh-keys', 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://app.oryzacloud.app/api/client/account/ssh-keys",
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' => 'Example Resource',
'public_key' => 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com'
]),
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://app.oryzacloud.app/api/client/account/ssh-keys"
payload := strings.NewReader("{\n \"name\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\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://app.oryzacloud.app/api/client/account/ssh-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.oryzacloud.app/api/client/account/ssh-keys")
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\": \"Example Resource\",\n \"public_key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleKey user@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"object": "ssh_key",
"attributes": {
"name": "Alanis McLaughlin",
"fingerprint": "T2b3VnvHWUmfhDOFLqzZg2VfLgqJhWxzrMUy8WZ+V8M",
"public_key": "-----BEGIN PUBLIC KEY-----\r\nMCowBQYDK2VwAyEA5pcirT00fhr3cRV2u8diJnrtaP4YEQFD2i7hbSpJibY=\r\n-----END PUBLIC KEY-----",
"created_at": "2026-09-22T14:45:23+00:00"
}
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"status": "<string>",
"detail": "<string>",
"source": {
"field": "<string>"
}
}
]
}string
obrigatório
Chave Client API da sua conta. Você pode gerá-la em Configurações da Conta.
Resposta
string
Tipo de recurso retornado pela API (ex:
server, stats, list, api_key).object
Atributos detalhados do recurso retornado.
Exemplo de Uso
curl -X POST "https://app.oryzacloud.app/api/client/account/ssh-keys" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer SUA_CHAVE_CLIENT_API"
const response = await fetch("https://app.oryzacloud.app/api/client/account/ssh-keys", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer SUA_CHAVE_CLIENT_API"
}
});
const data = await response.json();
console.log(data);
Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
application/json