> For the complete documentation index, see [llms.txt](https://docs.archera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archera.ai/help-center/archera-embedded/onboard-a-customer-via-aws.md).

# Onboard a Customer via AWS

Register a customer organization and set up AWS cloud integration using the Archera Partner API

Use the Archera Partner API to programmatically onboard customers and set up AWS cloud integration.

**Prerequisites**:

* Partner API key and partner organization ID
* Contact your Archera representative if you don't have these credentials

**Base URL:** `https://api.archera.ai/v2`

**Authentication:** Include `x-api-key: YOUR_PARTNER_API_KEY` header in all requests.

The examples use shell variables. Set them once, with your real values, before you run any command:

```shellscript
export PARTNER_API_KEY="your-partner-api-key"
export PARTNER_ORG_ID="your-partner-organization-id"
```

***

### Step 1: Register the customer organization

```shellscript
curl -X POST \
  -H "x-api-key: $PARTNER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Acme Corp",
    "users": [{"email": "admin@acmecorp.com", "role": "admin"}]
  }' \
  https://api.archera.ai/v2/partners/$PARTNER_ORG_ID/orgs
```

`name` must be unique across Archera. A name that is already in use returns `409`. Each entry in `users` is invited to the new organization with the given role.

**Save from response:** `id`. This is the customer organization ID. The next steps use it as `CHILD_ORG_ID`:

```shellscript
export CHILD_ORG_ID="id-from-the-response"
```

***

### Step 2: Get AWS CloudFormation launch URL

```shellscript
curl -H "x-api-key: $PARTNER_API_KEY" \
  https://api.archera.ai/v2/org/$CHILD_ORG_ID/partners/onboarding/aws/launch-stack-url
```

Add `?read_only=true` to onboard without purchase permissions. Archera can then read cost data and commitments but cannot buy or exchange them.

**Send the returned `url` to your customer** to deploy the CloudFormation stack in their AWS management account.

***

### Step 3: Verify AWS integration

After the customer deploys the stack, send the ID of the AWS account where the stack was deployed:

```shellscript
curl -X POST \
  -H "x-api-key: $PARTNER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"account_id": "123456789012"}' \
  https://api.archera.ai/v2/org/$CHILD_ORG_ID/partners/onboarding/aws/verify
```

`account_id` is required. If you used `read_only=true` in Step 2, also send `"read_only": true` here.

**Check response:** a list of `{feature, status}` entries. Every feature should report `available`. A `400` response carries a `code` and a `message` that you can show to the customer.

***

### What You Can Do

The Archera Partner API enables you to:

* **Register customer organizations** under your partner account
* **Set up AWS cloud integration** using CloudFormation templates
* **Verify integration status** and data collection
* **Access commitment recommendations** for your customers
* **Execute purchases** on behalf of customers

This allows you to build Archera's cost optimization capabilities directly into your platform.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.archera.ai/help-center/archera-embedded/onboard-a-customer-via-aws.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
