Browse API reference
Create SSH key
/v1/projects/{project_id}/ssh-keysThe key was added.
Request
curl --fail-with-body --silent --show-error \
--request POST \
--url "https://api.tachora.ai/v1/projects/${TACHORA_PROJECT_ID}/ssh-keys" \
--header "Authorization: Bearer ${TACHORA_API_KEY}" \
--header 'Content-Type: application/json' \
--data-binary @request.jsonSet TACHORA_API_KEY and any resource IDs in your shell before running the command. Put your JSON payload in request.json.
Path parameters
project_idstringRequired
Headers
Idempotency-Keystring- Min length
1 - Max length
255
- Min length
JSON body
namestringRequiredLowercase letters, digits and hyphens; starts with a letter; unique within its parent.
- Pattern
^[a-z][a-z0-9-]{0,62}$ - Example
"chat-prod"
- Pattern
public_keystringRequiredAn OpenSSH public key (
ssh-ed25519 ...,ssh-rsa ...,ecdsa-sha2-...).- Min length
1 - Max length
16384
- Min length
Responses
201The key was added.
400The request is malformed or a field is invalid (
invalid_argument).401Missing, invalid, expired or revoked credentials, or an API key whose creator no longer has access (
unauthenticated).403Authenticated but not allowed (
permission_denied), including users outside the sign-in allowlist.404The resource does not exist or the caller cannot see it (
not_found).409The request conflicts with current state (
conflict), such as a duplicate name.422The
Idempotency-Keywas already used with a different request (idempotency_key_reused).
201 JSON response fields
created_atstring · date-timeRequiredfingerprintstringRequiredSHA256 fingerprint, as
ssh-keygen -lprints it.- Example
"SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8"
- Example
idstringRequired- Example
"ssh_01jd3v7k8m0000000000000000"
- Example
namestringRequiredLowercase letters, digits and hyphens; starts with a letter; unique within its parent.
- Pattern
^[a-z][a-z0-9-]{0,62}$ - Example
"chat-prod"
- Pattern
project_idstringRequiredpublic_keystringRequired
400, 401, 403, 404, 409, 422 JSON response fields
errorobjectRequirederror.codestringRequiredStable, machine-readable error code.
- Values
invalid_argument, unauthenticated, permission_denied, not_found, conflict, billing_setup_required, idempotency_key_reused, internal, unavailable, rate_limited, insufficient_capacity, quota_exceeded, subnet_full, resource_in_use, not_implemented
- Values
error.detailsobject[]Per-field problems for
invalid_argument.error.details[].fieldstringRequirederror.details[].messagestringRequirederror.messagestringRequiredHuman-readable explanation. Do not parse.
error.request_idstringEchoes the
X-Request-Idresponse header.