Archera Public API

REST v1 API for programmatic access to Archera cloud cost optimization data — commitment plans, commitments, exchange recommendations, metrics, resources, orgs, and uploads. Authenticates with an API key (x-api-key header) or OAuth 2.0 Authorization Code with PKCE.

OpenAPI Specification

archera-openapi-original.json Raw ↑
{
  "info": {
    "description": "### Welcome to the Archera.ai API documentation.\nArchera.ai empowers organizations to optimize cloud costs and automate cloud financial operations. Our API enables seamless integration with your internal tools, workflows, and reporting systems. With this API, you can programmatically access commitment plans, metrics, and more, unlocking the full potential of your cloud data.\n\nWhether you're building custom dashboards, automating cost management, or integrating with third-party platforms, the Archera.ai API provides secure and reliable endpoints to help you achieve your goals.\n\nIf you have questions or need support, please contact our team at support@archera.ai.\n\n## API Key Access\n\nTo use this API, you need an API key.\n\n### How to Create an API Key\n1. Log in to the Archera.ai web application.\n2. Navigate to **User Settings > API Access**.\n<a href=\"https://app.archera.ai/settings?tab=api&section=user\" target=\"_blank\" rel=\"noopener noreferrer\">Open Settings</a>\n3. Click **Create New API Key**.\n4. Copy and securely store your new API key.\n\n### How to Use Your API Key\nUse the `x-api-key` header:\n\n```bash\ncurl -H 'x-api-key: YOUR_API_KEY' https://api.archera.ai/v1/org/{org_id}/metrics?provider=aws\n```\n\nKeep your API key secure. If you believe your key has been compromised, deactivate it in the web application and generate a new one.\n### How to find your Organization ID\n1. Log in to the Archera.ai web application.\n2. Navigate to **User Settings > Organization**.\n3. Your Organization ID is displayed at the top of the page. You can also find it in the URL when visiting the Archera app `&orgId=<org_id>`\n\n",
    "title": "Archera.ai API",
    "version": "v1.0.0"
  },
  "paths": {
    "/v1/org/{org_id}/commitment-plans/{plan_id}": {
      "get": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitmentPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/{plan_id}",
        "description": "Retrieves detailed information about a specific commitment plan, including costs, savings projections, and commitment coverage."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "plan_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/{plan_id}/apply": {
      "post": {
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitmentPlan"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/{plan_id}/apply",
        "description": "Executes a commitment purchase plan, initiating the commitment purchase process. This action will mark the plan as edited and record the user who initiated the purchase. The plan will then be processed for actual commitment purchases according to the plan specifications."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "plan_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/default": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "description": "Cloud provider to get default plans for",
            "schema": {
              "type": "string",
              "enum": [
                "aws",
                "azure",
                "gcp"
              ],
              "example": "aws"
            },
            "required": true
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommitmentPlan"
                  }
                },
                "example": [
                  {
                    "id": "11111111-1111-1111-1111-111111111111",
                    "name": "Recommended",
                    "description": "string",
                    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
                    "created_at": "2025-06-01T08:00:00Z",
                    "is_calculating": false,
                    "status": "active",
                    "max_term": "string",
                    "covered_ondemand_cost_hourly": 3.21,
                    "before_ondemand_cost_hourly": 4.56,
                    "before_reserved_cost_hourly": 0.0,
                    "amortized_cost_hourly": 2.98,
                    "recurring_cost_hourly": 0.23,
                    "upfront_cost_hourly": 0.0,
                    "before_cost_hourly": 4.56,
                    "after_cost_hourly": 3.21,
                    "total_cost_hourly": 3.44,
                    "savings_hourly": 1.12,
                    "fee_hourly": 0.1,
                    "commitment_coverage": 0.7,
                    "minimum_commitment_cost": 1200,
                    "breakeven_hours": 300,
                    "total_savings": 980,
                    "monthly_savings": 82,
                    "total_monthly_before_cost": 330
                  },
                  {
                    "id": "22222222-2222-2222-2222-222222222222",
                    "name": "Balanced",
                    "description": "string",
                    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
                    "created_at": "2025-06-01T08:00:00Z",
                    "is_calculating": false,
                    "status": "active",
                    "max_term": "string",
                    "covered_ondemand_cost_hourly": 4.85,
                    "before_ondemand_cost_hourly": 6.5,
                    "before_reserved_cost_hourly": 0.0,
                    "amortized_cost_hourly": 3.75,
                    "recurring_cost_hourly": 0.54,
                    "upfront_cost_hourly": 0.0,
                    "before_cost_hourly": 6.5,
                    "after_cost_hourly": 4.29,
                    "total_cost_hourly": 4.83,
                    "savings_hourly": 1.67,
                    "fee_hourly": 0.15,
                    "commitment_coverage": 0.85,
                    "minimum_commitment_cost": 2000,
                    "breakeven_hours": 450,
                    "total_savings": 1460,
                    "monthly_savings": 122,
                    "total_monthly_before_cost": 440
                  },
                  {
                    "id": "33333333-3333-3333-3333-333333333333",
                    "name": "High Savings",
                    "description": "string",
                    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
                    "created_at": "2025-06-01T08:00:00Z",
                    "is_calculating": false,
                    "status": "active",
                    "max_term": "string",
                    "covered_ondemand_cost_hourly": 7.25,
                    "before_ondemand_cost_hourly": 8.9,
                    "before_reserved_cost_hourly": 0.0,
                    "amortized_cost_hourly": 5.1,
                    "recurring_cost_hourly": 0.85,
                    "upfront_cost_hourly": 0.0,
                    "before_cost_hourly": 8.9,
                    "after_cost_hourly": 5.95,
                    "total_cost_hourly": 6.8,
                    "savings_hourly": 2.1,
                    "fee_hourly": 0.25,
                    "commitment_coverage": 0.95,
                    "minimum_commitment_cost": 3500,
                    "breakeven_hours": 620,
                    "total_savings": 2540,
                    "monthly_savings": 220,
                    "total_monthly_before_cost": 650
                  }
                ]
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/default",
        "description": "Retrieves the three default Archera commitment plans (High Savings, Balanced, Recommended) for the specified cloud provider. These plans are automatically generated based on the organization's usage patterns. Each plan offers different trade-offs between cost savings and flexibility."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/recommended": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "provider",
            "description": "Cloud provider to get the recommended plan for",
            "schema": {
              "type": "string",
              "enum": [
                "aws",
                "azure",
                "gcp"
              ],
              "example": "aws"
            },
            "required": true
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommitmentPlan"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/recommended",
        "description": "Retrieves only the recommended Archera commitment plan for the specified cloud provider. This is the optimal plan automatically selected based on the organization's usage patterns, balancing cost savings with flexibility. Returns a 204 No Content response if no recommended plan is available for the specified provider."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/{plan_id}/line-items": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "order_by",
            "description": "Field to order results by",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "default": "id",
              "enum": [
                "id",
                "plan_id",
                "offer_id",
                "account_id",
                "amortized_cost",
                "upfront_cost",
                "recurring_cost",
                "total_cost",
                "savings",
                "fee",
                "covered_ondemand_cost",
                "before_ondemand_cost",
                "before_reserved_cost",
                "covered_units",
                "before_cost",
                "monthly_savings",
                "breakeven_hours",
                "discount_rate",
                "monthly_cost",
                "selected_quantity",
                null,
                "offer.type",
                "offer.duration_seconds"
              ],
              "example": "created_at"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "desc",
            "description": "Sort in descending order if true",
            "schema": {
              "type": [
                "boolean",
                "null"
              ],
              "default": null,
              "example": "true"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "segment_id",
            "description": "Filter line items by segment ID",
            "schema": {
              "type": "string",
              "example": "550e8400-e29b-41d4-a716-446655440000"
            },
            "required": false
          },
          {
            "in": "query",
            "name": "resource_match_ids",
            "description": "Filter line items by specific resource match IDs",
            "schema": {
              "type": "array",
              "example": [
                "550e8400-e29b-41d4-a716-446655440000",
                "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
              ],
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": false,
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 100
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommitmentPlanLineItem_Exclude_CoveredServices"
                  }
                }
              }
            },
            "headers": {
              "X-Pagination": {
                "$ref": "#/components/headers/PAGINATION"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/{plan_id}/line-items",
        "description": "Retrieves line items for a specific commitment plan, including offer details, costs, and savings information. Line items represent individual commitment purchases within the plan."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "plan_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/{plan_id}/resource-matches": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "order_by",
            "description": "Field to order results by",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "default": "covered_ondemand_cost",
              "enum": [
                "id",
                "unmatched_units",
                "total_units",
                "ondemand_price",
                "reserved_cost",
                "explanation_unmatched",
                "coverage",
                "ondemand_cost",
                "covered_ondemand_cost",
                "before_cost",
                "after_cost",
                "covered_units",
                "average_savings",
                "average_monthly_savings",
                "monthly_after_cost",
                null
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "name": "desc",
            "description": "Sort in descending order if true",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "required": false
          },
          {
            "in": "query",
            "name": "start_date",
            "description": "Start date for resource usage data",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2024-01-01"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "end_date",
            "description": "End date for resource usage data",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2024-01-31"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "line_item_ids",
            "description": "Filter by specific line item IDs",
            "schema": {
              "type": "array",
              "example": [
                "550e8400-e29b-41d4-a716-446655440000"
              ],
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": false,
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            },
            "required": false
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 100
            },
            "required": false
          }
        ],
        "responses": {
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_CONTENT"
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommitmentPlanResourceMatch"
                  }
                }
              }
            },
            "headers": {
              "X-Pagination": {
                "$ref": "#/components/headers/PAGINATION"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Commitment Plans"
        ],
        "summary": "/commitment-plans/{plan_id}/resource-matches",
        "description": "Retrieves resource matches for a specific commitment plan, showing how resources map to commitment purchases with cost and usage details."
      },
      "parameters": [
        {
          "in": "path",
          "name": "org_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "plan_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    },
    "/v1/org/{org_id}/commitment-plans/{plan_id}/comparison": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "line_item_ids",
            "description": "Optional subset of line items to compare. If omitted, defaults to all selected line items in the plan.",
            "schema": {
              "type": [
                "array",
                "null"
              ],
              "default": null,
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "required": false,
            "explode": true,
            "style": "form"
          },
          {
            "in": "query",
            "name": "contract_terms",
            "description": "Optional list of target terms to roll up. If omitted, the response includes a 

# --- truncated at 32 KB (222 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/archera/refs/heads/main/openapi/archera-openapi-original.json