curl --request POST \
--url https://api.nops.io/v1/aws/onboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"payerAccountId": "123456789012",
"name": "Production payer",
"roleArn": "arn:aws:iam::123456789012:role/nops-integration-role-1234",
"externalId": "3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60",
"permissionMode": "minimal",
"cur": {
"bucketName": "nops-cur-1234-123456789012",
"reportName": "nops_cur_1234_hourly",
"s3Prefix": "nops-cur"
},
"cur2": {
"enabled": true,
"exportName": "nops_cur2_1234_hourly",
"s3Prefix": "nops-cur2"
}
}
'import requests
url = "https://api.nops.io/v1/aws/onboarding"
payload = {
"payerAccountId": "123456789012",
"name": "Production payer",
"roleArn": "arn:aws:iam::123456789012:role/nops-integration-role-1234",
"externalId": "3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60",
"permissionMode": "minimal",
"cur": {
"bucketName": "nops-cur-1234-123456789012",
"reportName": "nops_cur_1234_hourly",
"s3Prefix": "nops-cur"
},
"cur2": {
"enabled": True,
"exportName": "nops_cur2_1234_hourly",
"s3Prefix": "nops-cur2"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payerAccountId: '123456789012',
name: 'Production payer',
roleArn: 'arn:aws:iam::123456789012:role/nops-integration-role-1234',
externalId: '3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60',
permissionMode: 'minimal',
cur: {
bucketName: 'nops-cur-1234-123456789012',
reportName: 'nops_cur_1234_hourly',
s3Prefix: 'nops-cur'
},
cur2: {enabled: true, exportName: 'nops_cur2_1234_hourly', s3Prefix: 'nops-cur2'}
})
};
fetch('https://api.nops.io/v1/aws/onboarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/aws/onboarding"
payload := strings.NewReader("{\n \"payerAccountId\": \"123456789012\",\n \"name\": \"Production payer\",\n \"roleArn\": \"arn:aws:iam::123456789012:role/nops-integration-role-1234\",\n \"externalId\": \"3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60\",\n \"permissionMode\": \"minimal\",\n \"cur\": {\n \"bucketName\": \"nops-cur-1234-123456789012\",\n \"reportName\": \"nops_cur_1234_hourly\",\n \"s3Prefix\": \"nops-cur\"\n },\n \"cur2\": {\n \"enabled\": true,\n \"exportName\": \"nops_cur2_1234_hourly\",\n \"s3Prefix\": \"nops-cur2\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}{
"data": {
"id": "clxawsint01",
"status": "active",
"name": "Production payer",
"payerAccountId": "123456789012",
"verification": {
"state": "verified",
"roleAssumption": "ok",
"failedChecks": [],
"message": null
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Register an AWS account
Registers one new AWS payer account and runs the Savings Analysis permission check. Used by the Clara Terraform provider after it creates the IAM role. Requires aws-onboarding:create, which this endpoint accepts and no other endpoint does: a key with only that permission cannot read, change, or delete anything. Returns 409 when the account already has an integration, with no detail about it. verification.state is verified, partial (Savings Analysis checks failed but cost and usage ingest works), failed, or unavailable (the check could not run; verify in the Clara UI).
curl --request POST \
--url https://api.nops.io/v1/aws/onboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"payerAccountId": "123456789012",
"name": "Production payer",
"roleArn": "arn:aws:iam::123456789012:role/nops-integration-role-1234",
"externalId": "3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60",
"permissionMode": "minimal",
"cur": {
"bucketName": "nops-cur-1234-123456789012",
"reportName": "nops_cur_1234_hourly",
"s3Prefix": "nops-cur"
},
"cur2": {
"enabled": true,
"exportName": "nops_cur2_1234_hourly",
"s3Prefix": "nops-cur2"
}
}
'import requests
url = "https://api.nops.io/v1/aws/onboarding"
payload = {
"payerAccountId": "123456789012",
"name": "Production payer",
"roleArn": "arn:aws:iam::123456789012:role/nops-integration-role-1234",
"externalId": "3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60",
"permissionMode": "minimal",
"cur": {
"bucketName": "nops-cur-1234-123456789012",
"reportName": "nops_cur_1234_hourly",
"s3Prefix": "nops-cur"
},
"cur2": {
"enabled": True,
"exportName": "nops_cur2_1234_hourly",
"s3Prefix": "nops-cur2"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payerAccountId: '123456789012',
name: 'Production payer',
roleArn: 'arn:aws:iam::123456789012:role/nops-integration-role-1234',
externalId: '3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60',
permissionMode: 'minimal',
cur: {
bucketName: 'nops-cur-1234-123456789012',
reportName: 'nops_cur_1234_hourly',
s3Prefix: 'nops-cur'
},
cur2: {enabled: true, exportName: 'nops_cur2_1234_hourly', s3Prefix: 'nops-cur2'}
})
};
fetch('https://api.nops.io/v1/aws/onboarding', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/aws/onboarding"
payload := strings.NewReader("{\n \"payerAccountId\": \"123456789012\",\n \"name\": \"Production payer\",\n \"roleArn\": \"arn:aws:iam::123456789012:role/nops-integration-role-1234\",\n \"externalId\": \"3f1c2b7e-9d4a-4c5e-8a60-1b2c3d4e5f60\",\n \"permissionMode\": \"minimal\",\n \"cur\": {\n \"bucketName\": \"nops-cur-1234-123456789012\",\n \"reportName\": \"nops_cur_1234_hourly\",\n \"s3Prefix\": \"nops-cur\"\n },\n \"cur2\": {\n \"enabled\": true,\n \"exportName\": \"nops_cur2_1234_hourly\",\n \"s3Prefix\": \"nops-cur2\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}{
"data": {
"id": "clxawsint01",
"status": "active",
"name": "Production payer",
"payerAccountId": "123456789012",
"verification": {
"state": "verified",
"roleAssumption": "ok",
"failedChecks": [],
"message": null
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
Headers
Body
JSON request body
Response
Registers one new AWS payer account and runs the Savings Analysis permission check. Used by the Clara Terraform provider after it creates the IAM role. Requires aws-onboarding:create, which this endpoint accepts and no other endpoint does: a key with only that permission cannot read, change, or delete anything. Returns 409 when the account already has an integration, with no detail about it. verification.state is verified, partial (Savings Analysis checks failed but cost and usage ingest works), failed, or unavailable (the check could not run; verify in the Clara UI).
Was this page helpful?