Skip to content

Create a connection

POST
/api/v1/aws/connections
curl --request POST \
--url https://api.aletheia-ops.com/api/v1/aws/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "connection_type": "example", "default_regions": [ "example" ], "account_id": "example" }'
Media typeapplication/json

Starts a connection

object
name
required
string
connection_type
required
string
default_regions
Array<string>
account_id
string
Examplegenerated
{
"name": "example",
"connection_type": "example",
"default_regions": [
"example"
],
"account_id": "example"
}

Created

Media typeapplication/json

POST response: the connection plus its setup

object
connection

Public shape of a connection, with account counts

object
id
string
name
string
connection_type
string
status
string
role_name
string
management_role_arn
string
default_regions
Array<string>
template_version
string
accounts_total
integer
accounts_connected
integer
last_validated_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
upgrade

Whether a connection’s deployed role template is behind the latest and, if so, the releases the customer would gain by upgrading

object
available
boolean
latest_version
string
releases
Array<object>

One template version newer than the deployed one and the IAM actions it newly grants (shown in the upgrade wizard)

object
version
string
summary
string
actions
Array<string>
grants_new_access
boolean
setup

Deployment material a customer needs to deploy the read-only role (external id, role name, pre-filled CloudFormation/Terraform aids)

object
external_id
string
role_name
string
principal_arn
string
quick_create_url
string
update_stack_url
string
template_url
string
terraform_snippet
string
template_version
string
Examplegenerated
{
"connection": {
"id": "example",
"name": "example",
"connection_type": "example",
"status": "example",
"role_name": "example",
"management_role_arn": "example",
"default_regions": [
"example"
],
"template_version": "example",
"accounts_total": 1,
"accounts_connected": 1,
"last_validated_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z",
"upgrade": {
"available": true,
"latest_version": "example",
"releases": [
{
"version": "example",
"summary": "example",
"actions": [
"example"
]
}
],
"grants_new_access": true
}
},
"setup": {
"external_id": "example",
"role_name": "example",
"principal_arn": "example",
"quick_create_url": "example",
"update_stack_url": "example",
"template_url": "example",
"terraform_snippet": "example",
"template_version": "example"
}
}

The request is malformed or fails validation.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "validation_failed",
"message": "name: must not be blank"
}

No valid credential was presented, or it has expired.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "unauthorized",
"message": "authentication required"
}

Authenticated, but not permitted to perform this action.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "forbidden",
"message": "you do not have permission to perform this action"
}

The request conflicts with the current state.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
{
"code": "email_taken",
"message": "an account with this email already exists"
}

An unexpected failure. Diagnostic detail is logged server-side and deliberately not returned. Quote the X-Request-Id response header when reporting one.

Media typeapplication/json
object
code
required

Stable, machine-readable identifier. Branch on this.

string
message
required

Human-readable explanation. Safe to display; do not parse.

string
Examples
Exampleinternal_error
{
"code": "internal_error",
"message": "internal server error"
}