> 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-azure.md).

# Onboard a Customer via Azure

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

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

**Prerequisites**:

* Partner API key and partner organization ID
* Contact your Archera representative if you don't have these credentials
* Customer must have an Azure subscription with billing access

**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: Generate Azure authentication URL

This request is a `GET` with a JSON body:

```shellscript
curl -X GET \
  -H "x-api-key: $PARTNER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "azure_tenant_id": "customer-azure-tenant-id",
    "azure_subscription_id": "customer-subscription-id"
  }' \
  https://api.archera.ai/v2/org/$CHILD_ORG_ID/partners/onboarding/azure/auth-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 complete Azure authentication.

***

### Step 3: Verify Azure integration

After the customer completes authentication:

```shellscript
curl -X POST \
  -H "x-api-key: $PARTNER_API_KEY" \
  https://api.archera.ai/v2/org/$CHILD_ORG_ID/partners/onboarding/azure/verify
```

**Check response:** a list of `{feature, status}` entries. Every feature should report `available`. A `400` response means the customer has not completed Step 2 yet, or the Archera enterprise app is missing from their tenant.

***

### What You Can Do

The Archera Partner API enables you to:

* **Register customer organizations** under your partner account
* **Set up Azure cloud integration** using OAuth authentication
* **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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
