# API Overview

> Overview of the Ours Privacy REST API for programmatic configuration management, automation, and integrations.

Source: https://docs.oursprivacy.com/docs/platform-api

The Ours Privacy REST API gives you programmatic access to manage your account configuration. Use it to automate setup, integrate with CI/CD pipelines, build custom tooling, or manage accounts at scale.

The API is available at `app.oursprivacy.com/rest/v1/` and follows standard REST conventions. All requests are authenticated with an organization API key or an OAuth access token; see [Authentication](https://docs.oursprivacy.com/docs/platform-api/authentication).

Want to run the whole platform without logging in to the dashboard? See [Headless Platform](https://docs.oursprivacy.com/docs/platform-api/headless) for how the API, MCP server, and SDKs fit together.

***

## Why Use the API?

* **Automate account configuration:** script bulk operations instead of clicking through the UI
* **CI/CD integration:** manage tag, destination, and consent configurations as code
* **Custom tooling:** build internal tools and dashboards on top of your Ours Privacy data
* **Multi-account management:** configure multiple accounts programmatically

***

## Resources

Browse the section nav for the full list of resources, or fetch the OpenAPI spec at `GET /rest/v1/openapi.json` for a machine-readable catalog.

[Dashboards](https://docs.oursprivacy.com/docs/platform-api/dashboards) combines saved reports under shared dates, filters, and layouts.

[Insights](https://docs.oursprivacy.com/docs/platform-api/insights) covers saved metric reports, previews, and results.

[Query Events](https://docs.oursprivacy.com/docs/platform-api/query-events) searches and exports event occurrences.

[Query Visitors](https://docs.oursprivacy.com/docs/platform-api/query-visitors) lists visitors who match event and touch filters.

[Journey Flows](https://docs.oursprivacy.com/docs/platform-api/journey-flows) covers saved journey configurations, previews, computed results, and CSV exports.

***

## SDKs

If you'd rather not call the REST API directly, see [SDKs and MCP](https://docs.oursprivacy.com/docs/platform-api/sdks-and-mcp) for wrappers for Node.js / TypeScript, Go, and an MCP server for AI assistants. All are generated from the same OpenAPI spec.

***

## Key Concepts

* **Base URL**: `https://app.oursprivacy.com/rest/v1/`
* **Authentication**: Bearer token using an organization API key or OAuth access token (see [Authentication](https://docs.oursprivacy.com/docs/platform-api/authentication))
* **Response format**: JSON matching the documented resource schema
* **OpenAPI spec**: Available at `GET /rest/v1/openapi.json` (no authentication required)
* **Error handling**: Standard HTTP status codes (`400`, `401`, `403`, `404`, `405`, `500`)

## PATCH Semantics

Across this API, `PATCH` means partial update:

* Omitted fields stay unchanged
* Send `null` to clear a nullable field
* Resource pages only call out `PATCH` behavior when they need to explain a resource-specific exception or nested write shape

***

## Getting Started

1. **[Set up authentication](https://docs.oursprivacy.com/docs/platform-api/authentication)**: Create an API key in your organization settings, or connect with OAuth from a client that supports it
2. **[Make your first request](https://docs.oursprivacy.com/docs/platform-api/quickstart)**: List your destinations with a single `curl` command

***

## Need Help?

If you have questions about the API or need assistance, reach out to [support@oursprivacy.com](mailto:support@oursprivacy.com).
