---
title: "Update Org Integration"
method: PUT
path: "/v1/orgs/integrations"
tags: ["orgs"]
---

# Update Org Integration

`PUT /v1/orgs/integrations`

## Request body

- OrgIntegrationUpdate
  - `prom` OrgIntegrationItem
    - `id` string, required — Id of the integration
    - `token` string, required — Token of the integration
    - `endpoint` string, required — Endpoint of the integration
  - `loki` OrgIntegrationItem
    - `id` string, required — Id of the integration
    - `token` string, required — Token of the integration
    - `endpoint` string, required — Endpoint of the integration

## Response `200`

Successful Response

- Org
  - `prompt_tokens` integer — Number of tokens the request used
  - `completion_tokens` integer — Number of tokens the response used
  - `total_tokens` integer — Number of tokens of (request + response)
  - `prompt_tokens_cost` number — Cost (in $) of the prompt
  - `completion_tokens_cost` number — Cost (in $) of the response
  - `total_tokens_cost` number — Cost (in $) of the (request + response)
  - `prompt_tokens_cost_savings` number — Cost (in $) saved in the prompt costs comparison to the benchmark model
  - `completion_tokens_cost_savings` number — Cost (in $) saved in the completion costs comparison to the benchmark model
  - `total_tokens_cost_savings` number — Cost (in $) saved in total, in comparison to the benchmark model
  - `num_requests` integer — The number of requests this Organization has performed in the current cycle
  - `num_apps` integer — The number of active apps this Organization has
  - `org_stripe_id` string, required — The Stripe's customer ID. `cus_xxxxxx`
  - `spaces_subscription_tier` 'INTERNAL' | 'FREE' | 'PRO' | 'TEAM' | 'ENTERPRISE'
  - `spaces_subscription_seats` integer, nullable — The number of seats for the spaces subscription tier
  - `spaces_subscription_status` 'active' | 'unpaid'
  - `spaces_subscription_cancel_at` integer, nullable — The date a subscription ends once it is cancelled
  - `last_invoice_date` integer, required — Timestamp of last time we synced costs with Stripe. Usually coincides with the `invoice.created` webhook event
  - `subscription_pause_reason` SubscriptionPaused — If a subscription is paused (can't charge card, user cancels, ...) we store the reasons here.
    - `invoices` SubscriptionPausedInvoiceData[], required
      - `invoice_id` string, required — The ID of the invoice (in stripe: `in_xxxxx`)
      - `invoice_number` string, required — Customer-facing ID for the invoice
      - `amount` number, required — The amount due, in the Org's currency
      - `timestamp` integer, required — When the subscription was paused
      - `pause_reason` string, required — The reason the subscription was paused
      - `invoice_name` string, required — The name of the product attached to this invoice
      - `payment_link` string, nullable, required — A link to pay the invoice
      - `severity` 1 | 2, required — The severity: 1 (warning, banner shown, features available), 2 (subscription paused, banner shown, features paused)
  - `subscription_cycle` 'monthly' | 'yearly', nullable — The length of the Platform subscription cycle. Useful for upgrades and downgrades
  - `subscription_tier` '_NONE_' | '_TRIAL_' | '_INTERNAL_' | 'STARTUP' | 'GROWTH' | 'SCALE' | 'ENTERPRISE', nullable — The subscription tier this user is in.
  - `subscription_price_id` string, nullable — PRICE ID (on Stripe). The user's current Subscription ID is created from this Price
  - `trial_end` integer, nullable — The timestamp (in s) when the trial will end and the paid subscription will start. The user will be billed at this point
  - `currency` 'usd' — The currency for this organization
  - `billing_email` string, nullable — Billing email
  - `free_balance` number, nullable — If this is > 0 and the user is in a _TRIAL_, we will deduct the balance from here.
  - `spending_limit_soft` number, nullable
  - `spending_limit_hard` number, nullable
  - `alert_emails` BillingAlertUsageEmails
    - `soft_limit` string, date-time, nullable
    - `hard_limit` string, date-time, nullable
    - `payment_failed` string, date-time, nullable
    - `usage_reset` string, date-time, nullable
    - `usage_50` string, date-time, nullable
    - `usage_80` string, date-time, nullable
    - `usage_90` string, date-time, nullable
    - `usage_100` string, date-time, nullable
  - `org_name` string, required
  - `org_creator` string, required
  - `is_active` boolean
  - `is_personal` boolean
  - `org_display_name` string, nullable
  - `org_logo` string, nullable
  - `address_1` string, nullable
  - `address_2` string, nullable
  - `address_city` string, nullable
  - `address_zip` string, nullable
  - `address_state` string, nullable
  - `address_country` string, nullable
  - `added_on` string, date-time, nullable
  - `modified_on` string, date-time, nullable
  - `hubspot_id` string, nullable
  - `prom_id` string, nullable
  - `prom_token` string, nullable
  - `prom_endpoint` string, nullable
  - `loki_id` string, nullable
  - `loki_token` string, nullable
  - `loki_endpoint` string, nullable
  - `rate_limit` integer — The rate limit for this org, per minute
  - `id` string, uuid, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pulze/apis/pulze-ai-api.md) · [All operations](https://skmtc.net/pulze/apis/pulze-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pulze/pulze-ai-api/versions/a5e0b539abc5/schema)
