PUT
/
v1
/
orgs
/
integrations
curl --request PUT \
  --url https://api.pulze.ai/v1/orgs/integrations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prom": {
    "id": "<string>",
    "token": "<string>",
    "endpoint": "<string>"
  },
  "loki": {
    "id": "<string>",
    "token": "<string>",
    "endpoint": "<string>"
  }
}'
{
  "prompt_tokens": 0,
  "completion_tokens": 0,
  "total_tokens": 0,
  "prompt_tokens_cost": 0,
  "completion_tokens_cost": 0,
  "total_tokens_cost": 0,
  "prompt_tokens_cost_savings": 0,
  "completion_tokens_cost_savings": 0,
  "total_tokens_cost_savings": 0,
  "num_requests": 0,
  "num_apps": 0,
  "org_stripe_id": "<string>",
  "spaces_subscription_tier": "INTERNAL",
  "spaces_subscription_seats": 123,
  "spaces_subscription_status": "active",
  "spaces_subscription_cancel_at": 123,
  "last_invoice_date": 123,
  "subscription_pause_reason": {
    "invoices": [
      {
        "invoice_id": "<string>",
        "invoice_number": "<string>",
        "amount": 123,
        "timestamp": 123,
        "pause_reason": "<string>",
        "invoice_name": "<string>",
        "payment_link": "<string>",
        "severity": 1
      }
    ]
  },
  "subscription_cycle": "monthly",
  "subscription_tier": "_NONE_",
  "subscription_price_id": "<string>",
  "trial_end": 123,
  "currency": "usd",
  "billing_email": "<string>",
  "free_balance": 123,
  "spending_limit_soft": 123,
  "spending_limit_hard": 123,
  "alert_emails": {
    "soft_limit": "2023-11-07T05:31:56Z",
    "hard_limit": "2023-11-07T05:31:56Z",
    "payment_failed": "2023-11-07T05:31:56Z",
    "usage_reset": "2023-11-07T05:31:56Z",
    "usage_50": "2023-11-07T05:31:56Z",
    "usage_80": "2023-11-07T05:31:56Z",
    "usage_90": "2023-11-07T05:31:56Z",
    "usage_100": "2023-11-07T05:31:56Z"
  },
  "org_name": "<string>",
  "org_creator": "<string>",
  "is_active": true,
  "is_personal": false,
  "org_display_name": "<string>",
  "org_logo": "<string>",
  "address_1": "<string>",
  "address_2": "<string>",
  "address_city": "<string>",
  "address_zip": "<string>",
  "address_state": "<string>",
  "address_country": "<string>",
  "added_on": "2023-11-07T05:31:56Z",
  "modified_on": "2023-11-07T05:31:56Z",
  "hubspot_id": "<string>",
  "prom_id": "<string>",
  "prom_token": "<string>",
  "prom_endpoint": "<string>",
  "loki_id": "<string>",
  "loki_token": "<string>",
  "loki_endpoint": "<string>",
  "rate_limit": 200,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prom
object | null
loki
object | null

Response

200
application/json
Successful Response
org_stripe_id
string
required

The Stripe's customer ID. cus_xxxxxx

last_invoice_date
integer
required

Timestamp of last time we synced costs with Stripe. Usually coincides with the invoice.created webhook event

org_name
string
required
org_creator
string
required
id
string
required
prompt_tokens
integer
default:0

Number of tokens the request used

completion_tokens
integer
default:0

Number of tokens the response used

total_tokens
integer
default:0

Number of tokens of (request + response)

prompt_tokens_cost
number
default:0

Cost (in $) of the prompt

completion_tokens_cost
number
default:0

Cost (in $) of the response

total_tokens_cost
number
default:0

Cost (in $) of the (request + response)

prompt_tokens_cost_savings
number
default:0

Cost (in $) saved in the prompt costs comparison to the benchmark model

completion_tokens_cost_savings
number
default:0

Cost (in $) saved in the completion costs comparison to the benchmark model

total_tokens_cost_savings
number
default:0

Cost (in $) saved in total, in comparison to the benchmark model

num_requests
integer
default:0

The number of requests this Organization has performed in the current cycle

num_apps
integer
default:0

The number of active apps this Organization has

spaces_subscription_tier
enum<string> | null

The spaces subscription tier of this org

Available options:
INTERNAL,
FREE,
PRO,
TEAM,
ENTERPRISE
spaces_subscription_seats
integer | null

The number of seats for the spaces subscription tier

spaces_subscription_status
enum<string> | null

The spaces subscription status

Available options:
active,
unpaid
spaces_subscription_cancel_at
integer | null

The date a subscription ends once it is cancelled

subscription_pause_reason
object | null

The reason the subscription was paused. If null, the subscription is considered active

subscription_cycle
enum<string> | null

The length of the Platform subscription cycle. Useful for upgrades and downgrades

Available options:
monthly,
yearly
subscription_tier
enum<string> | null

The subscription tier this user is in.

Available options:
_NONE_,
_TRIAL_,
_INTERNAL_,
STARTUP,
GROWTH,
SCALE,
ENTERPRISE
subscription_price_id
string | null

PRICE ID (on Stripe). The user's current Subscription ID is created from this Price

trial_end
integer | null

The timestamp (in s) when the trial will end and the paid subscription will start. The user will be billed at this point

currency
enum<string>
default:usd

The currency for this organization

Available options:
usd
billing_email
string | null
default:

Billing email

free_balance
number | null
default:0

If this is > 0 and the user is in a TRIAL, we will deduct the balance from here.

spending_limit_soft
number | null
default:0
spending_limit_hard
number | null
default:0
alert_emails
object | null

Track the emails that were sent during this billing period

is_active
boolean
default:true
is_personal
boolean
default:false
org_display_name
string | null
address_1
string | null
default:
address_2
string | null
default:
address_city
string | null
default:
address_zip
string | null
default:
address_state
string | null
default:
address_country
string | null
default:
added_on
string | null
modified_on
string | null
hubspot_id
string | null
prom_id
string | null
prom_token
string | null
prom_endpoint
string | null
loki_id
string | null
loki_token
string | null
loki_endpoint
string | null
rate_limit
integer
default:200

The rate limit for this org, per minute