Integrations

View as Markdown

List Integration Overview

GET/api/v1/brands/{brand_id}/integrations

Overview of all configured providers with aggregated stats.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Create Integration

POST/api/v1/brands/{brand_id}/integrations

Create a new API integration key. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

List Provider Templates

GET/api/v1/brands/{brand_id}/integrations/providers

List available provider templates with field schemas.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/providers" \
  -H "Authorization: Bearer $OPVS_TOKEN"

List Integrations

GET/api/v1/brands/{brand_id}/integrations/all

List all integration keys, optionally filtered by provider.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/all" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Get Integration

GET/api/v1/brands/{brand_id}/integrations/{integration_id}

Get a single integration key detail.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Update Integration

PATCH/api/v1/brands/{brand_id}/integrations/{integration_id}

Update an integration key. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete Integration

DELETE/api/v1/brands/{brand_id}/integrations/{integration_id}

Delete an integration key. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Upload Avatar

POST/api/v1/brands/{brand_id}/integrations/avatar

Upload an avatar image to R2. Returns the public URL.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/avatar" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Reset Integration Usage

POST/api/v1/brands/{brand_id}/integrations/{integration_id}/reset-usage

Reset daily and minute usage counters. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}/reset-usage" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Test Integration

POST/api/v1/brands/{brand_id}/integrations/{integration_id}/test

Run a one-off health probe against this integration and persist the result.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}/test" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Get Integration Spend

GET/api/v1/brands/{brand_id}/integrations/{integration_id}/spend

Get spend data and history for a single integration key.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}/spend" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Get Provider Spend Overview

GET/api/v1/brands/{brand_id}/integrations/spend/provider/{provider_name}

Aggregated spend overview for all keys of a provider.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/spend/provider/{provider_name}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Trigger Billing Sync

POST/api/v1/brands/{brand_id}/integrations/{integration_id}/sync-billing

Trigger a manual billing sync for a single integration. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/brands/{brand_id}/integrations/{integration_id}/sync-billing" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Did this answer your question?