---
title: "Set Campaign Attribution"
method: PUT
path: "/admin/preferences/organizations/{organization_id}/campaign-attribution"
tags: ["admin", "preferences"]
---

# Set Campaign Attribution

`PUT /admin/preferences/organizations/{organization_id}/campaign-attribution`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/preferences/organizations/{organization_id}/campaign-attribution`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Rewrite the booking campaign decision from the editor's controls.

Refused when the stored document is not editable: the rewrite is generated from these controls
alone, so a branch they cannot express would be dropped and that organization's attribution
silently reassigned. Those documents are edited through the decision-document API instead.

## Path parameters

- `organization_id` string, required

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- CampaignAttributionRequest: The whole of what the attribution editor controls, as one write.
  - `default_campaign_id` integer, nullable
  - `source_campaign_ids` object

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/cce8b07a5787?raw)
