@wevion/cli 1.0.4445 → 1.0.4452

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/openapi.json +3110 -651
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -5507,7 +5507,7 @@
5507
5507
  "tags": [
5508
5508
  "ad-accounts"
5509
5509
  ],
5510
- "description": "Finds all ad accounts for the team, groups them by sheet_id, and assigns each group via the assign service. Accounts disabled on Meta are assigned too: skipping them made unlinking one irreversible.",
5510
+ "description": "Finds all ad accounts for the team, groups them by sheet_id, and assigns each group via the assign service. Accounts disabled on Meta are assigned too: skipping them made unlinking one irreversible. 403 SUBSCRIPTION_INACTIVE or READ_ONLY without an active subscription, 403 PLAN_LIMIT_EXCEEDED when the organization is already at its ad_accounts quota (the check runs before the request, like the other connect doors).",
5511
5511
  "requestBody": {
5512
5512
  "required": true,
5513
5513
  "content": {
@@ -5586,6 +5586,94 @@
5586
5586
  }
5587
5587
  }
5588
5588
  },
5589
+ "403": {
5590
+ "description": "Forbidden - caller lacks the required role/permission",
5591
+ "content": {
5592
+ "application/json": {
5593
+ "schema": {
5594
+ "anyOf": [
5595
+ {
5596
+ "type": "object",
5597
+ "required": [
5598
+ "statusCode",
5599
+ "error",
5600
+ "message",
5601
+ "code",
5602
+ "resource",
5603
+ "current",
5604
+ "max",
5605
+ "plan"
5606
+ ],
5607
+ "properties": {
5608
+ "statusCode": {
5609
+ "type": "number"
5610
+ },
5611
+ "error": {
5612
+ "type": "string"
5613
+ },
5614
+ "message": {
5615
+ "type": "string"
5616
+ },
5617
+ "code": {
5618
+ "type": "string"
5619
+ },
5620
+ "resource": {
5621
+ "type": "string"
5622
+ },
5623
+ "current": {
5624
+ "type": "number"
5625
+ },
5626
+ "max": {
5627
+ "type": "number"
5628
+ },
5629
+ "plan": {
5630
+ "type": "string"
5631
+ }
5632
+ }
5633
+ },
5634
+ {
5635
+ "type": "object",
5636
+ "required": [
5637
+ "statusCode",
5638
+ "error",
5639
+ "message"
5640
+ ],
5641
+ "properties": {
5642
+ "statusCode": {
5643
+ "type": "integer"
5644
+ },
5645
+ "error": {
5646
+ "type": "string"
5647
+ },
5648
+ "message": {
5649
+ "type": "string"
5650
+ },
5651
+ "code": {
5652
+ "type": "string"
5653
+ },
5654
+ "status": {
5655
+ "type": "string"
5656
+ },
5657
+ "reason": {
5658
+ "anyOf": [
5659
+ {
5660
+ "type": "string"
5661
+ },
5662
+ {
5663
+ "type": "null"
5664
+ }
5665
+ ]
5666
+ },
5667
+ "request_id": {
5668
+ "type": "string"
5669
+ }
5670
+ }
5671
+ }
5672
+ ]
5673
+ }
5674
+ }
5675
+ }
5676
+ },
5589
5677
  "429": {
5590
5678
  "description": "Too many requests - rate limit exceeded. Reachable on every API-key operation: the per-key cap sold with the plan answers `code: API_KEY_RATE_LIMITED` with `retry_after_seconds` and the `Retry-After` header. The global per-IP limiter can answer here too, with the same status and only `statusCode`, `error` and `message`.",
5591
5679
  "content": {
@@ -5623,19 +5711,27 @@
5623
5711
  }
5624
5712
  },
5625
5713
  "503": {
5626
- "description": "Session revocation check unavailable (Redis): retry after the Retry-After header.",
5627
- "headers": {
5628
- "Retry-After": {
5629
- "description": "Seconds to wait before retrying the identical request.",
5630
- "schema": {
5631
- "type": "integer"
5632
- }
5633
- }
5634
- },
5714
+ "description": "Service unavailable",
5635
5715
  "content": {
5636
5716
  "application/json": {
5637
5717
  "schema": {
5638
- "$ref": "#/components/schemas/ErrorResponse"
5718
+ "type": "object",
5719
+ "required": [
5720
+ "statusCode",
5721
+ "error",
5722
+ "message"
5723
+ ],
5724
+ "properties": {
5725
+ "statusCode": {
5726
+ "type": "number"
5727
+ },
5728
+ "error": {
5729
+ "type": "string"
5730
+ },
5731
+ "message": {
5732
+ "type": "string"
5733
+ }
5734
+ }
5639
5735
  }
5640
5736
  }
5641
5737
  }
@@ -5768,13 +5864,32 @@
5768
5864
  ],
5769
5865
  "properties": {
5770
5866
  "statusCode": {
5771
- "type": "number"
5867
+ "type": "integer"
5772
5868
  },
5773
5869
  "error": {
5774
5870
  "type": "string"
5775
5871
  },
5776
5872
  "message": {
5777
5873
  "type": "string"
5874
+ },
5875
+ "code": {
5876
+ "type": "string"
5877
+ },
5878
+ "status": {
5879
+ "type": "string"
5880
+ },
5881
+ "reason": {
5882
+ "anyOf": [
5883
+ {
5884
+ "type": "string"
5885
+ },
5886
+ {
5887
+ "type": "null"
5888
+ }
5889
+ ]
5890
+ },
5891
+ "request_id": {
5892
+ "type": "string"
5778
5893
  }
5779
5894
  }
5780
5895
  }
@@ -8250,7 +8365,7 @@
8250
8365
  "tags": [
8251
8366
  "ads"
8252
8367
  ],
8253
- "description": "Accepts a canonical `ads_only` campaign in the body and dispatches it to the standard publish worker via SQS. No `campaign_draft` row is created — the resulting `campaign_publish_job` carries `campaign_draft_id = NULL` and `source = \"edit_ad\"`. Returns the publish job id + worker_run_id for status polling via `/api/v1/campaign-drafts/publish-jobs/:jobId`. For Google the campaign channel and the live ad type are re-read from Google (never taken from the body), and unsupported shapes (Performance Max, Demand Gen, App, Video, Shopping, non-responsive ad types) are refused with a 422 carrying a machine `code`. The ad is looked up inside the workspaces of the request (404 otherwise), and the worker publishes only with an ad account, and a token, connected in those workspaces.",
8368
+ "description": "Accepts a canonical `ads_only` campaign in the body and dispatches it to the standard publish worker via SQS. No `campaign_draft` row is created — the resulting `campaign_publish_job` carries `campaign_draft_id = NULL` and `source = \"edit_ad\"`. Returns the publish job id + worker_run_id for status polling via `/api/v1/campaign-drafts/publish-jobs/:jobId`. For Google the campaign channel and the live ad type are re-read from Google (never taken from the body), and unsupported shapes (Performance Max, Demand Gen, App, Video, Shopping, non-responsive ad types) are refused with a 422 carrying a machine `code`. The ad is looked up inside the workspaces of the request (404 otherwise), and the worker publishes only with an ad account, and a token, connected in those workspaces. For Meta the pixel and the pages the canonical sends (the ad set promoted object, the creative) must have a row in the workspace of the ad account, as at launch: otherwise 403 RESOURCE_NOT_IN_ACTIVE_WORKSPACE and nothing is published.",
8254
8369
  "requestBody": {
8255
8370
  "required": true,
8256
8371
  "content": {
@@ -8416,6 +8531,35 @@
8416
8531
  }
8417
8532
  }
8418
8533
  },
8534
+ "403": {
8535
+ "description": "Forbidden - caller lacks the required role/permission",
8536
+ "content": {
8537
+ "application/json": {
8538
+ "schema": {
8539
+ "type": "object",
8540
+ "required": [
8541
+ "error",
8542
+ "message",
8543
+ "statusCode"
8544
+ ],
8545
+ "properties": {
8546
+ "code": {
8547
+ "type": "string"
8548
+ },
8549
+ "error": {
8550
+ "type": "string"
8551
+ },
8552
+ "message": {
8553
+ "type": "string"
8554
+ },
8555
+ "statusCode": {
8556
+ "type": "number"
8557
+ }
8558
+ }
8559
+ }
8560
+ }
8561
+ }
8562
+ },
8419
8563
  "404": {
8420
8564
  "description": "Resource not found",
8421
8565
  "content": {
@@ -8552,7 +8696,7 @@
8552
8696
  "tags": [
8553
8697
  "ads"
8554
8698
  ],
8555
- "description": "Accepts a canonical campaign with publishMode \"add_adset\" and dispatches it to the standard publish worker. The campaign is reused (platformId set); the worker CREATES the new ad set(s) (those without a platformId) and their ads under it. Meta only. No campaign_draft row is created (source = \"add_adset\"). Returns the publish job id + worker_run_id for polling. The ad account must sit in the workspaces of the request (403 otherwise), and the worker publishes only with an ad account, and a token, connected in those workspaces.",
8699
+ "description": "Accepts a canonical campaign with publishMode \"add_adset\" and dispatches it to the standard publish worker. The campaign is reused (platformId set); the worker CREATES the new ad set(s) (those without a platformId) and their ads under it. Meta only. No campaign_draft row is created (source = \"add_adset\"). Returns the publish job id + worker_run_id for polling. The ad account must sit in the workspaces of the request (403 otherwise), and the pixel and the pages of the new ad sets must have a row in the workspace of that ad account, as at launch (403 RESOURCE_NOT_IN_ACTIVE_WORKSPACE otherwise); the worker publishes only with an ad account, and a token, connected in those workspaces.",
8556
8700
  "requestBody": {
8557
8701
  "required": true,
8558
8702
  "content": {
@@ -20648,7 +20792,7 @@
20648
20792
  "tags": [
20649
20793
  "api-keys"
20650
20794
  ],
20651
- "description": "Returns the caller's own API keys plus, for owners and admins, the keys of the members of the workspaces they can access that are bound to one of those workspaces. Each item carries `owner` (who created it) and `is_own`. The key itself is never returned; only the caller can edit or delete a key.",
20795
+ "description": "Returns the caller's own API keys plus, for owners and admins, the keys of the members of the workspaces they can access that are bound to one of those workspaces. Each item carries `owner` (who created it) and `is_own`. The key itself is never returned; only the caller can edit or delete a key. Open to the workspace roles of the backoffice lever `api_key_creator_roles` (every role by default) and to platform staff; anyone else gets 403. A key acts with the role of the person who created it: its permissions narrow that role, they never widen it.",
20652
20796
  "security": [
20653
20797
  {
20654
20798
  "bearerAuth": []
@@ -20830,6 +20974,36 @@
20830
20974
  }
20831
20975
  }
20832
20976
  },
20977
+ "403": {
20978
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
20979
+ "content": {
20980
+ "application/json": {
20981
+ "schema": {
20982
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
20983
+ "type": "object",
20984
+ "required": [
20985
+ "statusCode",
20986
+ "error",
20987
+ "message"
20988
+ ],
20989
+ "properties": {
20990
+ "statusCode": {
20991
+ "type": "number"
20992
+ },
20993
+ "error": {
20994
+ "type": "string"
20995
+ },
20996
+ "message": {
20997
+ "type": "string"
20998
+ },
20999
+ "code": {
21000
+ "type": "string"
21001
+ }
21002
+ }
21003
+ }
21004
+ }
21005
+ }
21006
+ },
20833
21007
  "500": {
20834
21008
  "description": "Internal server error",
20835
21009
  "content": {
@@ -20885,7 +21059,7 @@
20885
21059
  "tags": [
20886
21060
  "api-keys"
20887
21061
  ],
20888
- "description": "Generates a new M2M API key. The plain-text key is returned exactly ONCE. Send `x-team-id` (or an `x-active-scope: team:<id>`) to bind the key to a specific workspace. That binding is what an MCP session started with this key runs in, and it is echoed back as `team_id`. Without a declared scope the key is bound only when the caller has exactly one accessible workspace; otherwise `team_id` is null and no workspace is guessed. Plan enforcement answers 403 `FEATURE_NOT_IN_PLAN` when the plan has no API access, and 400 with `code` `API_KEYS_NOT_IN_PLAN` (the plan carries no API keys at all) or `API_KEYS_LIMIT_REACHED` (the per-plan cap is spent).",
21062
+ "description": "Generates a new M2M API key. The plain-text key is returned exactly ONCE. Send `x-team-id` (or an `x-active-scope: team:<id>`) to bind the key to a specific workspace. That binding is what an MCP session started with this key runs in, and it is echoed back as `team_id`. Without a declared scope the key is bound only when the caller has exactly one accessible workspace; otherwise `team_id` is null and no workspace is guessed. Plan enforcement answers 403 `FEATURE_NOT_IN_PLAN` when the plan has no API access, and 400 with `code` `API_KEYS_NOT_IN_PLAN` (the plan carries no API keys at all) or `API_KEYS_LIMIT_REACHED` (the per-plan cap is spent). Open to the workspace roles of the backoffice lever `api_key_creator_roles` (every role by default) and to platform staff; anyone else gets 403. A key acts with the role of the person who created it: its permissions narrow that role, they never widen it.",
20889
21063
  "requestBody": {
20890
21064
  "required": true,
20891
21065
  "content": {
@@ -21116,6 +21290,7 @@
21116
21290
  }
21117
21291
  },
21118
21292
  {
21293
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
21119
21294
  "type": "object",
21120
21295
  "required": [
21121
21296
  "statusCode",
@@ -21228,7 +21403,7 @@
21228
21403
  "tags": [
21229
21404
  "api-keys"
21230
21405
  ],
21231
- "description": "Update name, permissions, or enabled flag. Setting enabled=false soft-revokes the key.",
21406
+ "description": "Update name, permissions, or enabled flag of one of your own keys. Setting enabled=false soft-revokes the key. Open to the workspace roles of the backoffice lever `api_key_creator_roles` (every role by default) and to platform staff; anyone else gets 403. A key acts with the role of the person who created it: its permissions narrow that role, they never widen it.",
21232
21407
  "requestBody": {
21233
21408
  "required": true,
21234
21409
  "content": {
@@ -21469,6 +21644,36 @@
21469
21644
  }
21470
21645
  }
21471
21646
  },
21647
+ "403": {
21648
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
21649
+ "content": {
21650
+ "application/json": {
21651
+ "schema": {
21652
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
21653
+ "type": "object",
21654
+ "required": [
21655
+ "statusCode",
21656
+ "error",
21657
+ "message"
21658
+ ],
21659
+ "properties": {
21660
+ "statusCode": {
21661
+ "type": "number"
21662
+ },
21663
+ "error": {
21664
+ "type": "string"
21665
+ },
21666
+ "message": {
21667
+ "type": "string"
21668
+ },
21669
+ "code": {
21670
+ "type": "string"
21671
+ }
21672
+ }
21673
+ }
21674
+ }
21675
+ }
21676
+ },
21472
21677
  "404": {
21473
21678
  "description": "Resource not found",
21474
21679
  "content": {
@@ -21553,7 +21758,7 @@
21553
21758
  "tags": [
21554
21759
  "api-keys"
21555
21760
  ],
21556
- "description": "Permanently deletes an API key. For reversible revoke, PATCH enabled=false instead.",
21761
+ "description": "Permanently deletes one of your own API keys. For reversible revoke, PATCH enabled=false instead. Open to the workspace roles of the backoffice lever `api_key_creator_roles` (every role by default) and to platform staff; anyone else gets 403. A key acts with the role of the person who created it: its permissions narrow that role, they never widen it.",
21557
21762
  "parameters": [
21558
21763
  {
21559
21764
  "schema": {
@@ -21599,6 +21804,36 @@
21599
21804
  }
21600
21805
  }
21601
21806
  },
21807
+ "403": {
21808
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
21809
+ "content": {
21810
+ "application/json": {
21811
+ "schema": {
21812
+ "description": "Forbidden: the caller's role is not in the backoffice lever `api_key_creator_roles`. With `code` `WORKSPACE_ROLE_INSUFFICIENT` (and the `x-wevion-workspace-role: denied` header) it is the role in the workspace of the request that misses it.",
21813
+ "type": "object",
21814
+ "required": [
21815
+ "statusCode",
21816
+ "error",
21817
+ "message"
21818
+ ],
21819
+ "properties": {
21820
+ "statusCode": {
21821
+ "type": "number"
21822
+ },
21823
+ "error": {
21824
+ "type": "string"
21825
+ },
21826
+ "message": {
21827
+ "type": "string"
21828
+ },
21829
+ "code": {
21830
+ "type": "string"
21831
+ }
21832
+ }
21833
+ }
21834
+ }
21835
+ }
21836
+ },
21602
21837
  "404": {
21603
21838
  "description": "Resource not found",
21604
21839
  "content": {
@@ -95034,7 +95269,7 @@
95034
95269
  "tags": [
95035
95270
  "catalogs"
95036
95271
  ],
95037
- "description": "Sets the connected flag to true for the specified catalogs. `sheet_id` (default: the caller) names whose rows; only the rows inside the active workspace are connected, and `skipped` counts the listed catalogs left untouched (in another workspace, or not found).",
95272
+ "description": "Sets the connected flag to true for the specified catalogs. `sheet_id` (default: the caller) names whose rows; only the rows inside the active workspace are connected, and `skipped` counts the listed catalogs left untouched (in another workspace, or not found). The destination workspace must be named (x-team-id, or an active team scope; an organization scope with a single workspace names it): 400 SCOPE_TEAM_REQUIRED otherwise, and an API key without a team answers 400 too. The role IN that workspace decides: 403 `Insufficient team permissions` (no `code`) below mediabuyer, i.e. viewer, finance, and platform support or finance staff without a role there. 403 SUBSCRIPTION_INACTIVE for an inactive subscription and PLAN_LIMIT_EXCEEDED (with the counts) at the `catalogs` plan limit, with the guard `code` in the body. 404 when the named workspace does not exist.",
95038
95273
  "requestBody": {
95039
95274
  "required": true,
95040
95275
  "content": {
@@ -95074,6 +95309,18 @@
95074
95309
  }
95075
95310
  }
95076
95311
  },
95312
+ "parameters": [
95313
+ {
95314
+ "schema": {
95315
+ "format": "uuid",
95316
+ "type": "string"
95317
+ },
95318
+ "in": "header",
95319
+ "name": "x-team-id",
95320
+ "required": false,
95321
+ "description": "Destination workspace team id."
95322
+ }
95323
+ ],
95077
95324
  "security": [
95078
95325
  {
95079
95326
  "bearerAuth": []
@@ -95106,10 +95353,12 @@
95106
95353
  }
95107
95354
  },
95108
95355
  "400": {
95109
- "description": "Invalid request - schema validation failed",
95356
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
95110
95357
  "content": {
95111
95358
  "application/json": {
95112
95359
  "schema": {
95360
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
95361
+ "additionalProperties": false,
95113
95362
  "type": "object",
95114
95363
  "required": [
95115
95364
  "statusCode",
@@ -95118,13 +95367,17 @@
95118
95367
  ],
95119
95368
  "properties": {
95120
95369
  "statusCode": {
95121
- "type": "integer"
95370
+ "type": "number"
95122
95371
  },
95123
95372
  "error": {
95124
95373
  "type": "string"
95125
95374
  },
95126
95375
  "message": {
95127
95376
  "type": "string"
95377
+ },
95378
+ "code": {
95379
+ "description": "`SCOPE_TEAM_REQUIRED` when no destination workspace was given; a validation 400 keeps its own code (e.g. `FST_ERR_VALIDATION`).",
95380
+ "type": "string"
95128
95381
  }
95129
95382
  }
95130
95383
  }
@@ -95163,6 +95416,94 @@
95163
95416
  },
95164
95417
  "403": {
95165
95418
  "description": "Forbidden - caller lacks the required role/permission",
95419
+ "content": {
95420
+ "application/json": {
95421
+ "schema": {
95422
+ "anyOf": [
95423
+ {
95424
+ "type": "object",
95425
+ "required": [
95426
+ "statusCode",
95427
+ "error",
95428
+ "message",
95429
+ "code",
95430
+ "resource",
95431
+ "current",
95432
+ "max",
95433
+ "plan"
95434
+ ],
95435
+ "properties": {
95436
+ "statusCode": {
95437
+ "type": "number"
95438
+ },
95439
+ "error": {
95440
+ "type": "string"
95441
+ },
95442
+ "message": {
95443
+ "type": "string"
95444
+ },
95445
+ "code": {
95446
+ "type": "string"
95447
+ },
95448
+ "resource": {
95449
+ "type": "string"
95450
+ },
95451
+ "current": {
95452
+ "type": "number"
95453
+ },
95454
+ "max": {
95455
+ "type": "number"
95456
+ },
95457
+ "plan": {
95458
+ "type": "string"
95459
+ }
95460
+ }
95461
+ },
95462
+ {
95463
+ "type": "object",
95464
+ "required": [
95465
+ "statusCode",
95466
+ "error",
95467
+ "message"
95468
+ ],
95469
+ "properties": {
95470
+ "statusCode": {
95471
+ "type": "integer"
95472
+ },
95473
+ "error": {
95474
+ "type": "string"
95475
+ },
95476
+ "message": {
95477
+ "type": "string"
95478
+ },
95479
+ "code": {
95480
+ "type": "string"
95481
+ },
95482
+ "status": {
95483
+ "type": "string"
95484
+ },
95485
+ "reason": {
95486
+ "anyOf": [
95487
+ {
95488
+ "type": "string"
95489
+ },
95490
+ {
95491
+ "type": "null"
95492
+ }
95493
+ ]
95494
+ },
95495
+ "request_id": {
95496
+ "type": "string"
95497
+ }
95498
+ }
95499
+ }
95500
+ ]
95501
+ }
95502
+ }
95503
+ }
95504
+ },
95505
+ "404": {
95506
+ "description": "Resource not found",
95166
95507
  "content": {
95167
95508
  "application/json": {
95168
95509
  "schema": {
@@ -188628,23 +188969,70 @@
188628
188969
  "content": {
188629
188970
  "application/json": {
188630
188971
  "schema": {
188631
- "type": "object",
188632
- "required": [
188633
- "statusCode",
188634
- "error",
188635
- "message"
188636
- ],
188637
- "properties": {
188638
- "statusCode": {
188639
- "type": "number"
188640
- },
188641
- "error": {
188642
- "type": "string"
188972
+ "anyOf": [
188973
+ {
188974
+ "additionalProperties": false,
188975
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
188976
+ "type": "object",
188977
+ "required": [
188978
+ "error"
188979
+ ],
188980
+ "properties": {
188981
+ "statusCode": {
188982
+ "type": "number"
188983
+ },
188984
+ "error": {
188985
+ "type": "string"
188986
+ },
188987
+ "message": {
188988
+ "type": "string"
188989
+ },
188990
+ "code": {
188991
+ "type": "string"
188992
+ },
188993
+ "family": {
188994
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
188995
+ "type": "string"
188996
+ },
188997
+ "act": {
188998
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
188999
+ "anyOf": [
189000
+ {
189001
+ "type": "string",
189002
+ "enum": [
189003
+ "connect"
189004
+ ]
189005
+ },
189006
+ {
189007
+ "type": "string",
189008
+ "enum": [
189009
+ "disconnect"
189010
+ ]
189011
+ }
189012
+ ]
189013
+ }
189014
+ }
188643
189015
  },
188644
- "message": {
188645
- "type": "string"
189016
+ {
189017
+ "type": "object",
189018
+ "required": [
189019
+ "statusCode",
189020
+ "error",
189021
+ "message"
189022
+ ],
189023
+ "properties": {
189024
+ "statusCode": {
189025
+ "type": "number"
189026
+ },
189027
+ "error": {
189028
+ "type": "string"
189029
+ },
189030
+ "message": {
189031
+ "type": "string"
189032
+ }
189033
+ }
188646
189034
  }
188647
- }
189035
+ ]
188648
189036
  }
188649
189037
  }
188650
189038
  }
@@ -190276,23 +190664,70 @@
190276
190664
  "content": {
190277
190665
  "application/json": {
190278
190666
  "schema": {
190279
- "type": "object",
190280
- "required": [
190281
- "statusCode",
190282
- "error",
190283
- "message"
190284
- ],
190285
- "properties": {
190286
- "statusCode": {
190287
- "type": "number"
190288
- },
190289
- "error": {
190290
- "type": "string"
190667
+ "anyOf": [
190668
+ {
190669
+ "additionalProperties": false,
190670
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
190671
+ "type": "object",
190672
+ "required": [
190673
+ "error"
190674
+ ],
190675
+ "properties": {
190676
+ "statusCode": {
190677
+ "type": "number"
190678
+ },
190679
+ "error": {
190680
+ "type": "string"
190681
+ },
190682
+ "message": {
190683
+ "type": "string"
190684
+ },
190685
+ "code": {
190686
+ "type": "string"
190687
+ },
190688
+ "family": {
190689
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
190690
+ "type": "string"
190691
+ },
190692
+ "act": {
190693
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
190694
+ "anyOf": [
190695
+ {
190696
+ "type": "string",
190697
+ "enum": [
190698
+ "connect"
190699
+ ]
190700
+ },
190701
+ {
190702
+ "type": "string",
190703
+ "enum": [
190704
+ "disconnect"
190705
+ ]
190706
+ }
190707
+ ]
190708
+ }
190709
+ }
190291
190710
  },
190292
- "message": {
190293
- "type": "string"
190711
+ {
190712
+ "type": "object",
190713
+ "required": [
190714
+ "statusCode",
190715
+ "error",
190716
+ "message"
190717
+ ],
190718
+ "properties": {
190719
+ "statusCode": {
190720
+ "type": "number"
190721
+ },
190722
+ "error": {
190723
+ "type": "string"
190724
+ },
190725
+ "message": {
190726
+ "type": "string"
190727
+ }
190728
+ }
190294
190729
  }
190295
- }
190730
+ ]
190296
190731
  }
190297
190732
  }
190298
190733
  }
@@ -190888,23 +191323,70 @@
190888
191323
  "content": {
190889
191324
  "application/json": {
190890
191325
  "schema": {
190891
- "type": "object",
190892
- "required": [
190893
- "statusCode",
190894
- "error",
190895
- "message"
190896
- ],
190897
- "properties": {
190898
- "statusCode": {
190899
- "type": "number"
190900
- },
190901
- "error": {
190902
- "type": "string"
191326
+ "anyOf": [
191327
+ {
191328
+ "additionalProperties": false,
191329
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
191330
+ "type": "object",
191331
+ "required": [
191332
+ "error"
191333
+ ],
191334
+ "properties": {
191335
+ "statusCode": {
191336
+ "type": "number"
191337
+ },
191338
+ "error": {
191339
+ "type": "string"
191340
+ },
191341
+ "message": {
191342
+ "type": "string"
191343
+ },
191344
+ "code": {
191345
+ "type": "string"
191346
+ },
191347
+ "family": {
191348
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
191349
+ "type": "string"
191350
+ },
191351
+ "act": {
191352
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
191353
+ "anyOf": [
191354
+ {
191355
+ "type": "string",
191356
+ "enum": [
191357
+ "connect"
191358
+ ]
191359
+ },
191360
+ {
191361
+ "type": "string",
191362
+ "enum": [
191363
+ "disconnect"
191364
+ ]
191365
+ }
191366
+ ]
191367
+ }
191368
+ }
190903
191369
  },
190904
- "message": {
190905
- "type": "string"
191370
+ {
191371
+ "type": "object",
191372
+ "required": [
191373
+ "statusCode",
191374
+ "error",
191375
+ "message"
191376
+ ],
191377
+ "properties": {
191378
+ "statusCode": {
191379
+ "type": "number"
191380
+ },
191381
+ "error": {
191382
+ "type": "string"
191383
+ },
191384
+ "message": {
191385
+ "type": "string"
191386
+ }
191387
+ }
190906
191388
  }
190907
- }
191389
+ ]
190908
191390
  }
190909
191391
  }
190910
191392
  }
@@ -191453,23 +191935,70 @@
191453
191935
  "content": {
191454
191936
  "application/json": {
191455
191937
  "schema": {
191456
- "type": "object",
191457
- "required": [
191458
- "statusCode",
191459
- "error",
191460
- "message"
191461
- ],
191462
- "properties": {
191463
- "statusCode": {
191464
- "type": "number"
191465
- },
191466
- "error": {
191467
- "type": "string"
191938
+ "anyOf": [
191939
+ {
191940
+ "additionalProperties": false,
191941
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
191942
+ "type": "object",
191943
+ "required": [
191944
+ "error"
191945
+ ],
191946
+ "properties": {
191947
+ "statusCode": {
191948
+ "type": "number"
191949
+ },
191950
+ "error": {
191951
+ "type": "string"
191952
+ },
191953
+ "message": {
191954
+ "type": "string"
191955
+ },
191956
+ "code": {
191957
+ "type": "string"
191958
+ },
191959
+ "family": {
191960
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
191961
+ "type": "string"
191962
+ },
191963
+ "act": {
191964
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
191965
+ "anyOf": [
191966
+ {
191967
+ "type": "string",
191968
+ "enum": [
191969
+ "connect"
191970
+ ]
191971
+ },
191972
+ {
191973
+ "type": "string",
191974
+ "enum": [
191975
+ "disconnect"
191976
+ ]
191977
+ }
191978
+ ]
191979
+ }
191980
+ }
191468
191981
  },
191469
- "message": {
191470
- "type": "string"
191982
+ {
191983
+ "type": "object",
191984
+ "required": [
191985
+ "statusCode",
191986
+ "error",
191987
+ "message"
191988
+ ],
191989
+ "properties": {
191990
+ "statusCode": {
191991
+ "type": "number"
191992
+ },
191993
+ "error": {
191994
+ "type": "string"
191995
+ },
191996
+ "message": {
191997
+ "type": "string"
191998
+ }
191999
+ }
191471
192000
  }
191472
- }
192001
+ ]
191473
192002
  }
191474
192003
  }
191475
192004
  }
@@ -191560,7 +192089,7 @@
191560
192089
  "tags": [
191561
192090
  "domains"
191562
192091
  ],
191563
- "description": "Moves a live domain that sits in another workspace of the same organization into the request team, keeping its id, verification token, ownership proof, status and certificate. Needs, in the workspace it leaves, the role that may delete a domain there (manager or higher, raised by the backoffice lever asset_permission_floors), and mediabuyer or higher here; the body never names the source. Refused with 409 DOMAIN_MOVE_BLOCKED, listing every blocker, while live campaigns of the source use it, it hosts an SEO site, it runs on a Cloudflare zone or custom hostname, or the two workspaces resolve a different server IP for an A-record domain. Archived campaigns of the source stay there with their history and lose the domain. From a DELETED workspace of the organization (owner or admin of the organization): its campaigns lose the domain and its hosted SEO site goes offline instead of blocking, the workspace if restored comes back without the domain, and the move needs confirm_source_deleted: true, otherwise 409 DOMAIN_SOURCE_DELETED_NEEDS_CONFIRM says what would be lost and nothing changes. Already here answers 200 unchanged. 503 FEATURE_DISABLED while platform_domains_enabled or domain_move_enabled is off for the caller.",
192092
+ "description": "Moves a live domain that sits in another workspace of the same organization into the request team, keeping its id, verification token, ownership proof, status and certificate. Needs, in the workspace it leaves, the role that may delete a domain there (manager or higher, raised by the backoffice lever asset_permission_floors), and here the floor of connecting a domain (mediabuyer or higher, raised by the same lever); the body never names the source. Refused with 409 DOMAIN_MOVE_BLOCKED, listing every blocker, while live campaigns of the source use it, it hosts an SEO site, it runs on a Cloudflare zone or custom hostname, or the two workspaces resolve a different server IP for an A-record domain. Archived campaigns of the source stay there with their history and lose the domain. From a DELETED workspace of the organization (owner or admin of the organization): its campaigns lose the domain and its hosted SEO site goes offline instead of blocking, the workspace if restored comes back without the domain, and the move needs confirm_source_deleted: true, otherwise 409 DOMAIN_SOURCE_DELETED_NEEDS_CONFIRM says what would be lost and nothing changes. Already here answers 200 unchanged. 503 FEATURE_DISABLED while platform_domains_enabled or domain_move_enabled is off for the caller.",
191564
192093
  "requestBody": {
191565
192094
  "required": true,
191566
192095
  "content": {
@@ -191724,7 +192253,7 @@
191724
192253
  "anyOf": [
191725
192254
  {
191726
192255
  "additionalProperties": false,
191727
- "description": "The move is refused (code DOMAIN_MOVE_FORBIDDEN): the domain is not in a workspace of the same organization, or the caller is below the floor of deleting a domain in the workspace that holds it (manager or higher, raised by the backoffice lever asset_permission_floors; owner or admin of the organization when that workspace is deleted), or not mediabuyer or higher here. The body never names the workspace nor gives its id.",
192256
+ "description": "The move is refused (code DOMAIN_MOVE_FORBIDDEN): the domain is not in a workspace of the same organization, or the caller is below the floor of deleting a domain in the workspace that holds it (manager or higher, raised by the backoffice lever asset_permission_floors; owner or admin of the organization when that workspace is deleted), or below the floor of connecting a domain here (mediabuyer or higher, raised by the same lever). The body never names the workspace nor gives its id.",
191728
192257
  "type": "object",
191729
192258
  "required": [
191730
192259
  "statusCode",
@@ -192280,23 +192809,70 @@
192280
192809
  "content": {
192281
192810
  "application/json": {
192282
192811
  "schema": {
192283
- "type": "object",
192284
- "required": [
192285
- "statusCode",
192286
- "error",
192287
- "message"
192288
- ],
192289
- "properties": {
192290
- "statusCode": {
192291
- "type": "number"
192292
- },
192293
- "error": {
192294
- "type": "string"
192812
+ "anyOf": [
192813
+ {
192814
+ "additionalProperties": false,
192815
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
192816
+ "type": "object",
192817
+ "required": [
192818
+ "error"
192819
+ ],
192820
+ "properties": {
192821
+ "statusCode": {
192822
+ "type": "number"
192823
+ },
192824
+ "error": {
192825
+ "type": "string"
192826
+ },
192827
+ "message": {
192828
+ "type": "string"
192829
+ },
192830
+ "code": {
192831
+ "type": "string"
192832
+ },
192833
+ "family": {
192834
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
192835
+ "type": "string"
192836
+ },
192837
+ "act": {
192838
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
192839
+ "anyOf": [
192840
+ {
192841
+ "type": "string",
192842
+ "enum": [
192843
+ "connect"
192844
+ ]
192845
+ },
192846
+ {
192847
+ "type": "string",
192848
+ "enum": [
192849
+ "disconnect"
192850
+ ]
192851
+ }
192852
+ ]
192853
+ }
192854
+ }
192295
192855
  },
192296
- "message": {
192297
- "type": "string"
192856
+ {
192857
+ "type": "object",
192858
+ "required": [
192859
+ "statusCode",
192860
+ "error",
192861
+ "message"
192862
+ ],
192863
+ "properties": {
192864
+ "statusCode": {
192865
+ "type": "number"
192866
+ },
192867
+ "error": {
192868
+ "type": "string"
192869
+ },
192870
+ "message": {
192871
+ "type": "string"
192872
+ }
192873
+ }
192298
192874
  }
192299
- }
192875
+ ]
192300
192876
  }
192301
192877
  }
192302
192878
  }
@@ -192556,23 +193132,70 @@
192556
193132
  "content": {
192557
193133
  "application/json": {
192558
193134
  "schema": {
192559
- "type": "object",
192560
- "required": [
192561
- "statusCode",
192562
- "error",
192563
- "message"
192564
- ],
192565
- "properties": {
192566
- "statusCode": {
192567
- "type": "number"
192568
- },
192569
- "error": {
192570
- "type": "string"
193135
+ "anyOf": [
193136
+ {
193137
+ "additionalProperties": false,
193138
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
193139
+ "type": "object",
193140
+ "required": [
193141
+ "error"
193142
+ ],
193143
+ "properties": {
193144
+ "statusCode": {
193145
+ "type": "number"
193146
+ },
193147
+ "error": {
193148
+ "type": "string"
193149
+ },
193150
+ "message": {
193151
+ "type": "string"
193152
+ },
193153
+ "code": {
193154
+ "type": "string"
193155
+ },
193156
+ "family": {
193157
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
193158
+ "type": "string"
193159
+ },
193160
+ "act": {
193161
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
193162
+ "anyOf": [
193163
+ {
193164
+ "type": "string",
193165
+ "enum": [
193166
+ "connect"
193167
+ ]
193168
+ },
193169
+ {
193170
+ "type": "string",
193171
+ "enum": [
193172
+ "disconnect"
193173
+ ]
193174
+ }
193175
+ ]
193176
+ }
193177
+ }
192571
193178
  },
192572
- "message": {
192573
- "type": "string"
193179
+ {
193180
+ "type": "object",
193181
+ "required": [
193182
+ "statusCode",
193183
+ "error",
193184
+ "message"
193185
+ ],
193186
+ "properties": {
193187
+ "statusCode": {
193188
+ "type": "number"
193189
+ },
193190
+ "error": {
193191
+ "type": "string"
193192
+ },
193193
+ "message": {
193194
+ "type": "string"
193195
+ }
193196
+ }
192574
193197
  }
192575
- }
193198
+ ]
192576
193199
  }
192577
193200
  }
192578
193201
  }
@@ -198296,7 +198919,7 @@
198296
198919
  "tags": [
198297
198920
  "fan-pages"
198298
198921
  ],
198299
- "description": "Marks selected non-Meta fan pages or Snapchat public profiles of the active workspace of the request as connected; pages of another workspace are left untouched.",
198922
+ "description": "Marks selected non-Meta fan pages or Snapchat public profiles of the active workspace of the request as connected; pages of another workspace are left untouched. 403 SUBSCRIPTION_INACTIVE or READ_ONLY without an active subscription.",
198300
198923
  "requestBody": {
198301
198924
  "required": true,
198302
198925
  "content": {
@@ -198374,6 +198997,51 @@
198374
198997
  }
198375
198998
  }
198376
198999
  },
199000
+ "403": {
199001
+ "description": "Forbidden - caller lacks the required role/permission",
199002
+ "content": {
199003
+ "application/json": {
199004
+ "schema": {
199005
+ "type": "object",
199006
+ "required": [
199007
+ "statusCode",
199008
+ "error",
199009
+ "message"
199010
+ ],
199011
+ "properties": {
199012
+ "statusCode": {
199013
+ "type": "integer"
199014
+ },
199015
+ "error": {
199016
+ "type": "string"
199017
+ },
199018
+ "message": {
199019
+ "type": "string"
199020
+ },
199021
+ "code": {
199022
+ "type": "string"
199023
+ },
199024
+ "status": {
199025
+ "type": "string"
199026
+ },
199027
+ "reason": {
199028
+ "anyOf": [
199029
+ {
199030
+ "type": "string"
199031
+ },
199032
+ {
199033
+ "type": "null"
199034
+ }
199035
+ ]
199036
+ },
199037
+ "request_id": {
199038
+ "type": "string"
199039
+ }
199040
+ }
199041
+ }
199042
+ }
199043
+ }
199044
+ },
198377
199045
  "500": {
198378
199046
  "description": "Internal server error",
198379
199047
  "content": {
@@ -198401,19 +199069,27 @@
198401
199069
  }
198402
199070
  },
198403
199071
  "503": {
198404
- "description": "Session revocation check unavailable (Redis): retry after the Retry-After header.",
198405
- "headers": {
198406
- "Retry-After": {
198407
- "description": "Seconds to wait before retrying the identical request.",
198408
- "schema": {
198409
- "type": "integer"
198410
- }
198411
- }
198412
- },
199072
+ "description": "Service unavailable",
198413
199073
  "content": {
198414
199074
  "application/json": {
198415
199075
  "schema": {
198416
- "$ref": "#/components/schemas/ErrorResponse"
199076
+ "type": "object",
199077
+ "required": [
199078
+ "statusCode",
199079
+ "error",
199080
+ "message"
199081
+ ],
199082
+ "properties": {
199083
+ "statusCode": {
199084
+ "type": "number"
199085
+ },
199086
+ "error": {
199087
+ "type": "string"
199088
+ },
199089
+ "message": {
199090
+ "type": "string"
199091
+ }
199092
+ }
198417
199093
  }
198418
199094
  }
198419
199095
  }
@@ -226287,6 +226963,627 @@
226287
226963
  ]
226288
226964
  }
226289
226965
  },
226966
+ "/api/v1/meta/profile-shares": {
226967
+ "get": {
226968
+ "operationId": "getApiV1MetaProfileShares",
226969
+ "summary": "List your Meta profiles and where they can be used",
226970
+ "tags": [
226971
+ "meta"
226972
+ ],
226973
+ "description": "Your own Meta connections (never a colleague's), each with the workspaces where it has a row and its status there, and your ad accounts there that it reaches; plus the workspaces where you work and may connect ad accounts, where \"use your Meta profile here\" can bring a profile without logging in to Meta again. 503 FEATURE_DISABLED while the runtime flag meta_profile_share_enabled is off for you.",
226974
+ "security": [
226975
+ {
226976
+ "bearerAuth": []
226977
+ }
226978
+ ],
226979
+ "responses": {
226980
+ "200": {
226981
+ "description": "Successful response",
226982
+ "content": {
226983
+ "application/json": {
226984
+ "schema": {
226985
+ "additionalProperties": false,
226986
+ "type": "object",
226987
+ "required": [
226988
+ "scope",
226989
+ "profiles",
226990
+ "destinations"
226991
+ ],
226992
+ "properties": {
226993
+ "scope": {
226994
+ "description": "Backoffice lever meta_profile_share_scope: `member_workspaces` every workspace where you work; `organization` only the workspaces of the organization of the profile.",
226995
+ "anyOf": [
226996
+ {
226997
+ "type": "string",
226998
+ "enum": [
226999
+ "member_workspaces"
227000
+ ]
227001
+ },
227002
+ {
227003
+ "type": "string",
227004
+ "enum": [
227005
+ "organization"
227006
+ ]
227007
+ }
227008
+ ]
227009
+ },
227010
+ "profiles": {
227011
+ "type": "array",
227012
+ "items": {
227013
+ "additionalProperties": false,
227014
+ "type": "object",
227015
+ "required": [
227016
+ "user_id",
227017
+ "name",
227018
+ "email",
227019
+ "token_type",
227020
+ "workspaces"
227021
+ ],
227022
+ "properties": {
227023
+ "user_id": {
227024
+ "description": "Meta id of the profile.",
227025
+ "type": "string"
227026
+ },
227027
+ "name": {
227028
+ "anyOf": [
227029
+ {
227030
+ "type": "string"
227031
+ },
227032
+ {
227033
+ "type": "null"
227034
+ }
227035
+ ]
227036
+ },
227037
+ "email": {
227038
+ "type": "string"
227039
+ },
227040
+ "token_type": {
227041
+ "description": "USER or SYSTEM_USER.",
227042
+ "anyOf": [
227043
+ {
227044
+ "type": "string"
227045
+ },
227046
+ {
227047
+ "type": "null"
227048
+ }
227049
+ ]
227050
+ },
227051
+ "workspaces": {
227052
+ "type": "array",
227053
+ "items": {
227054
+ "additionalProperties": false,
227055
+ "type": "object",
227056
+ "required": [
227057
+ "token_id",
227058
+ "team_id",
227059
+ "team_name",
227060
+ "organization_id",
227061
+ "organization_name",
227062
+ "token_status",
227063
+ "expires_at",
227064
+ "accounts"
227065
+ ],
227066
+ "properties": {
227067
+ "token_id": {
227068
+ "format": "uuid",
227069
+ "description": "The row of the profile in that workspace (token_id to share).",
227070
+ "type": "string"
227071
+ },
227072
+ "team_id": {
227073
+ "format": "uuid",
227074
+ "type": "string"
227075
+ },
227076
+ "team_name": {
227077
+ "type": "string"
227078
+ },
227079
+ "organization_id": {
227080
+ "format": "uuid",
227081
+ "type": "string"
227082
+ },
227083
+ "organization_name": {
227084
+ "type": "string"
227085
+ },
227086
+ "token_status": {
227087
+ "description": "ACTIVE, EXPIRED (reconnect) or INACTIVE (disconnected from there).",
227088
+ "type": "string"
227089
+ },
227090
+ "expires_at": {
227091
+ "anyOf": [
227092
+ {
227093
+ "format": "date-time",
227094
+ "type": "string"
227095
+ },
227096
+ {
227097
+ "type": "null"
227098
+ }
227099
+ ]
227100
+ },
227101
+ "accounts": {
227102
+ "description": "Your own ad accounts in that workspace that this profile reaches (the ones a transfer moves).",
227103
+ "type": "array",
227104
+ "items": {
227105
+ "additionalProperties": false,
227106
+ "type": "object",
227107
+ "required": [
227108
+ "account_id",
227109
+ "account_name",
227110
+ "connected"
227111
+ ],
227112
+ "properties": {
227113
+ "account_id": {
227114
+ "description": "Meta ad account id (act_…).",
227115
+ "type": "string"
227116
+ },
227117
+ "account_name": {
227118
+ "anyOf": [
227119
+ {
227120
+ "type": "string"
227121
+ },
227122
+ {
227123
+ "type": "null"
227124
+ }
227125
+ ]
227126
+ },
227127
+ "connected": {
227128
+ "description": "Switched on in that workspace.",
227129
+ "type": "boolean"
227130
+ }
227131
+ }
227132
+ }
227133
+ }
227134
+ }
227135
+ }
227136
+ }
227137
+ }
227138
+ }
227139
+ },
227140
+ "destinations": {
227141
+ "description": "The workspaces where you work and may connect ad accounts. With scope `organization` a profile goes only to those of its organizations.",
227142
+ "type": "array",
227143
+ "items": {
227144
+ "additionalProperties": false,
227145
+ "type": "object",
227146
+ "required": [
227147
+ "allows_system_user",
227148
+ "team_id",
227149
+ "team_name",
227150
+ "organization_id",
227151
+ "organization_name"
227152
+ ],
227153
+ "properties": {
227154
+ "allows_system_user": {
227155
+ "description": "A system user token may come here: your role passes the owner floor there, as for pasting one (otherwise only personal profiles).",
227156
+ "type": "boolean"
227157
+ },
227158
+ "team_id": {
227159
+ "format": "uuid",
227160
+ "type": "string"
227161
+ },
227162
+ "team_name": {
227163
+ "type": "string"
227164
+ },
227165
+ "organization_id": {
227166
+ "format": "uuid",
227167
+ "type": "string"
227168
+ },
227169
+ "organization_name": {
227170
+ "type": "string"
227171
+ }
227172
+ }
227173
+ }
227174
+ }
227175
+ }
227176
+ }
227177
+ }
227178
+ }
227179
+ },
227180
+ "401": {
227181
+ "description": "Unauthorized - missing or invalid bearer token",
227182
+ "content": {
227183
+ "application/json": {
227184
+ "schema": {
227185
+ "$ref": "#/components/schemas/ErrorResponse"
227186
+ }
227187
+ }
227188
+ }
227189
+ },
227190
+ "403": {
227191
+ "description": "Forbidden - caller lacks the required role/permission",
227192
+ "content": {
227193
+ "application/json": {
227194
+ "schema": {
227195
+ "additionalProperties": false,
227196
+ "type": "object",
227197
+ "required": [
227198
+ "error"
227199
+ ],
227200
+ "properties": {
227201
+ "statusCode": {
227202
+ "type": "number"
227203
+ },
227204
+ "error": {
227205
+ "type": "string"
227206
+ },
227207
+ "message": {
227208
+ "type": "string"
227209
+ },
227210
+ "code": {
227211
+ "type": "string"
227212
+ }
227213
+ }
227214
+ }
227215
+ }
227216
+ }
227217
+ },
227218
+ "503": {
227219
+ "description": "`FEATURE_DISABLED` while the runtime flag is off for the caller.",
227220
+ "content": {
227221
+ "application/json": {
227222
+ "schema": {
227223
+ "additionalProperties": false,
227224
+ "description": "`FEATURE_DISABLED` while the runtime flag is off for the caller.",
227225
+ "type": "object",
227226
+ "required": [
227227
+ "error",
227228
+ "code"
227229
+ ],
227230
+ "properties": {
227231
+ "error": {
227232
+ "type": "string"
227233
+ },
227234
+ "code": {
227235
+ "type": "string"
227236
+ }
227237
+ }
227238
+ }
227239
+ }
227240
+ }
227241
+ }
227242
+ }
227243
+ },
227244
+ "post": {
227245
+ "operationId": "postApiV1MetaProfileShares",
227246
+ "summary": "Use your Meta profile in this workspace",
227247
+ "tags": [
227248
+ "meta"
227249
+ ],
227250
+ "description": "Copies your Meta connection (token_id, one of your rows in another workspace) into the destination workspace (x-team-id, 400 SCOPE_TEAM_REQUIRED without it) with the same credential, without logging in to Meta again: the same token, so it grants nothing more than the row it comes from. Then the steps of the OAuth callback: the ad accounts the profile sees are checked and connected here, the picked ones move here with confirm_move (move_account_ids), the others held in another workspace stay there (accounts.held_elsewhere), and the pages, pixels and catalogs arrive with the sync started in the background. Refused before anything is written: 403 ACCOUNT_MOVE_NEEDS_PERSON with an API key; 404 PROFILE_NOT_FOUND; 403 PROFILE_NOT_YOURS for a colleague's profile; 409 PROFILE_NOT_ACTIVE when it is expired or disconnected (reconnect it first); 409 PROFILE_NEEDS_RECONNECT for a profile saved in an older format; 403 NOT_A_MEMBER_HERE when you do not work in the destination; 403 ASSET_ROLE_FLOOR below the floor of connecting ad accounts there (owner for a system user token); 403 PROFILE_OUT_OF_SCOPE outside the organization of the profile while the backoffice lever meta_profile_share_scope is `organization` (by default every workspace where you work). Already active here (and not lapsed): 200 `already_shared`, nothing written for the profile, the account step runs again; two shares at the same moment write one row and one audit. The copy takes the permissions of its source on the same Meta assets. Toward a workspace of another organization the profile comes and no account moves (accounts.outcome `cross_organization` when some were asked). accounts.all_moved says whether every account asked is here now, the condition for taking the profile out of its source. Every renewal and re-login of the profile counts for all its workspaces; disconnecting it from one workspace leaves the others. 503 FEATURE_DISABLED while the runtime flag meta_profile_share_enabled is off for you.",
227251
+ "requestBody": {
227252
+ "required": true,
227253
+ "content": {
227254
+ "application/json": {
227255
+ "schema": {
227256
+ "additionalProperties": false,
227257
+ "type": "object",
227258
+ "required": [
227259
+ "token_id"
227260
+ ],
227261
+ "properties": {
227262
+ "token_id": {
227263
+ "format": "uuid",
227264
+ "description": "Your Meta profile row in another workspace (GET /api/v1/meta/profile-shares, workspaces[].token_id).",
227265
+ "type": "string"
227266
+ },
227267
+ "confirm_move": {
227268
+ "description": "Move here the picked ad accounts (move_account_ids) that sit in another workspace of the organization. Without it no account moves: the free ones connect, the others stay where they are (accounts.held_elsewhere).",
227269
+ "type": "boolean"
227270
+ },
227271
+ "move_account_ids": {
227272
+ "maxLength": 3500,
227273
+ "pattern": "^[A-Za-z0-9_-]+(,[A-Za-z0-9_-]+)*$",
227274
+ "description": "With confirm_move=true: comma-separated external account ids (from GET /api/v1/ad-accounts/movable) to move. Only these move; the other accounts already assigned elsewhere stay in their workspace and do not block the connection. Without it, confirm_move moves every conflicting account. Ids from GET /api/v1/ad-accounts/movable/switched-off (your own accounts left switched off in another workspace, while that feature is on) move too and arrive switched off: switch them on from the Asset Hub, where the plan limit counts. On Meta one moves only when a token of yours in this workspace sees its Business Manager; otherwise it stays where it is.",
227275
+ "type": "string"
227276
+ }
227277
+ }
227278
+ }
227279
+ }
227280
+ }
227281
+ },
227282
+ "parameters": [
227283
+ {
227284
+ "schema": {
227285
+ "format": "uuid",
227286
+ "type": "string"
227287
+ },
227288
+ "in": "header",
227289
+ "name": "x-team-id",
227290
+ "required": false,
227291
+ "description": "Destination workspace team id."
227292
+ }
227293
+ ],
227294
+ "security": [
227295
+ {
227296
+ "bearerAuth": []
227297
+ }
227298
+ ],
227299
+ "responses": {
227300
+ "200": {
227301
+ "description": "Successful response",
227302
+ "content": {
227303
+ "application/json": {
227304
+ "schema": {
227305
+ "additionalProperties": false,
227306
+ "type": "object",
227307
+ "required": [
227308
+ "status",
227309
+ "token_id",
227310
+ "team_id",
227311
+ "accounts"
227312
+ ],
227313
+ "properties": {
227314
+ "status": {
227315
+ "description": "`already_shared` when the profile was already active here: nothing was written for the profile.",
227316
+ "anyOf": [
227317
+ {
227318
+ "type": "string",
227319
+ "enum": [
227320
+ "shared"
227321
+ ]
227322
+ },
227323
+ {
227324
+ "type": "string",
227325
+ "enum": [
227326
+ "already_shared"
227327
+ ]
227328
+ }
227329
+ ]
227330
+ },
227331
+ "token_id": {
227332
+ "format": "uuid",
227333
+ "description": "The row of the profile in this workspace.",
227334
+ "type": "string"
227335
+ },
227336
+ "team_id": {
227337
+ "format": "uuid",
227338
+ "type": "string"
227339
+ },
227340
+ "accounts": {
227341
+ "additionalProperties": false,
227342
+ "type": "object",
227343
+ "required": [
227344
+ "outcome",
227345
+ "moved",
227346
+ "all_moved",
227347
+ "held_elsewhere"
227348
+ ],
227349
+ "properties": {
227350
+ "outcome": {
227351
+ "description": "The step after the save, the one of the OAuth callback: `ok`; `forbidden` an account sits in a workspace where you cannot take accounts out (nothing moved); `conflict` an account is held in another workspace; `discovery_failed` Meta did not list the accounts now (the profile is here, the sync lists them); `cross_organization` accounts were asked (move_account_ids) but this workspace is in another organization than the profile's: ad accounts move only inside an organization, so none moved and they stay where they are (accounts.held_elsewhere).",
227352
+ "anyOf": [
227353
+ {
227354
+ "type": "string",
227355
+ "enum": [
227356
+ "ok"
227357
+ ]
227358
+ },
227359
+ {
227360
+ "type": "string",
227361
+ "enum": [
227362
+ "forbidden"
227363
+ ]
227364
+ },
227365
+ {
227366
+ "type": "string",
227367
+ "enum": [
227368
+ "conflict"
227369
+ ]
227370
+ },
227371
+ {
227372
+ "type": "string",
227373
+ "enum": [
227374
+ "discovery_failed"
227375
+ ]
227376
+ },
227377
+ {
227378
+ "type": "string",
227379
+ "enum": [
227380
+ "cross_organization"
227381
+ ]
227382
+ }
227383
+ ]
227384
+ },
227385
+ "moved": {
227386
+ "type": "boolean"
227387
+ },
227388
+ "all_moved": {
227389
+ "description": "Every account asked with move_account_ids is now in this workspace (read after the move; true when none was asked). Only then may the profile be taken out of the workspace it came from: a transfer that removes it otherwise switches off accounts that did not arrive.",
227390
+ "type": "boolean"
227391
+ },
227392
+ "held_elsewhere": {
227393
+ "description": "Accounts of the profile left in another workspace (not picked, or connected there by a colleague).",
227394
+ "type": "array",
227395
+ "items": {
227396
+ "type": "string"
227397
+ }
227398
+ },
227399
+ "message": {
227400
+ "type": "string"
227401
+ },
227402
+ "external_account_id": {
227403
+ "type": "string"
227404
+ }
227405
+ }
227406
+ }
227407
+ }
227408
+ }
227409
+ }
227410
+ }
227411
+ },
227412
+ "400": {
227413
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
227414
+ "content": {
227415
+ "application/json": {
227416
+ "schema": {
227417
+ "description": "Explicit destination workspace required: send the x-team-id header or activate a team scope for this operation.",
227418
+ "additionalProperties": false,
227419
+ "type": "object",
227420
+ "required": [
227421
+ "statusCode",
227422
+ "error",
227423
+ "message"
227424
+ ],
227425
+ "properties": {
227426
+ "statusCode": {
227427
+ "type": "number"
227428
+ },
227429
+ "error": {
227430
+ "type": "string"
227431
+ },
227432
+ "message": {
227433
+ "type": "string"
227434
+ },
227435
+ "code": {
227436
+ "description": "`SCOPE_TEAM_REQUIRED` when no destination workspace was given; a validation 400 keeps its own code (e.g. `FST_ERR_VALIDATION`).",
227437
+ "type": "string"
227438
+ }
227439
+ }
227440
+ }
227441
+ }
227442
+ }
227443
+ },
227444
+ "401": {
227445
+ "description": "Unauthorized - missing or invalid bearer token",
227446
+ "content": {
227447
+ "application/json": {
227448
+ "schema": {
227449
+ "$ref": "#/components/schemas/ErrorResponse"
227450
+ }
227451
+ }
227452
+ }
227453
+ },
227454
+ "403": {
227455
+ "description": "Forbidden, by `code`: `ACCOUNT_MOVE_NEEDS_PERSON` an API key (a person shares a profile, never a key); `PROFILE_NOT_YOURS` the profile was connected by someone else (they share it); `NOT_A_MEMBER_HERE` the caller does not work in the destination workspace; `ASSET_ROLE_FLOOR` the caller's role there is below the floor of connecting ad accounts (owner for a system user token, as for pasting one; raised by the backoffice lever asset_permission_floors); `PROFILE_OUT_OF_SCOPE` the destination is outside the organization of the profile while the backoffice lever meta_profile_share_scope is `organization`. Nothing is written.",
227456
+ "content": {
227457
+ "application/json": {
227458
+ "schema": {
227459
+ "additionalProperties": false,
227460
+ "description": "Forbidden, by `code`: `ACCOUNT_MOVE_NEEDS_PERSON` an API key (a person shares a profile, never a key); `PROFILE_NOT_YOURS` the profile was connected by someone else (they share it); `NOT_A_MEMBER_HERE` the caller does not work in the destination workspace; `ASSET_ROLE_FLOOR` the caller's role there is below the floor of connecting ad accounts (owner for a system user token, as for pasting one; raised by the backoffice lever asset_permission_floors); `PROFILE_OUT_OF_SCOPE` the destination is outside the organization of the profile while the backoffice lever meta_profile_share_scope is `organization`. Nothing is written.",
227461
+ "type": "object",
227462
+ "required": [
227463
+ "error"
227464
+ ],
227465
+ "properties": {
227466
+ "statusCode": {
227467
+ "type": "number"
227468
+ },
227469
+ "error": {
227470
+ "type": "string"
227471
+ },
227472
+ "message": {
227473
+ "type": "string"
227474
+ },
227475
+ "code": {
227476
+ "type": "string"
227477
+ },
227478
+ "family": {
227479
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
227480
+ "type": "string"
227481
+ },
227482
+ "act": {
227483
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
227484
+ "anyOf": [
227485
+ {
227486
+ "type": "string",
227487
+ "enum": [
227488
+ "connect"
227489
+ ]
227490
+ },
227491
+ {
227492
+ "type": "string",
227493
+ "enum": [
227494
+ "disconnect"
227495
+ ]
227496
+ }
227497
+ ]
227498
+ }
227499
+ }
227500
+ }
227501
+ }
227502
+ }
227503
+ },
227504
+ "404": {
227505
+ "description": "Resource not found",
227506
+ "content": {
227507
+ "application/json": {
227508
+ "schema": {
227509
+ "additionalProperties": false,
227510
+ "type": "object",
227511
+ "required": [
227512
+ "error"
227513
+ ],
227514
+ "properties": {
227515
+ "statusCode": {
227516
+ "type": "number"
227517
+ },
227518
+ "error": {
227519
+ "type": "string"
227520
+ },
227521
+ "message": {
227522
+ "type": "string"
227523
+ },
227524
+ "code": {
227525
+ "type": "string"
227526
+ }
227527
+ }
227528
+ }
227529
+ }
227530
+ }
227531
+ },
227532
+ "409": {
227533
+ "description": "Conflict - resource state prevents the operation",
227534
+ "content": {
227535
+ "application/json": {
227536
+ "schema": {
227537
+ "additionalProperties": false,
227538
+ "type": "object",
227539
+ "required": [
227540
+ "error"
227541
+ ],
227542
+ "properties": {
227543
+ "statusCode": {
227544
+ "type": "number"
227545
+ },
227546
+ "error": {
227547
+ "type": "string"
227548
+ },
227549
+ "message": {
227550
+ "type": "string"
227551
+ },
227552
+ "code": {
227553
+ "type": "string"
227554
+ }
227555
+ }
227556
+ }
227557
+ }
227558
+ }
227559
+ },
227560
+ "503": {
227561
+ "description": "`FEATURE_DISABLED` while the runtime flag is off for the caller.",
227562
+ "content": {
227563
+ "application/json": {
227564
+ "schema": {
227565
+ "additionalProperties": false,
227566
+ "description": "`FEATURE_DISABLED` while the runtime flag is off for the caller.",
227567
+ "type": "object",
227568
+ "required": [
227569
+ "error",
227570
+ "code"
227571
+ ],
227572
+ "properties": {
227573
+ "error": {
227574
+ "type": "string"
227575
+ },
227576
+ "code": {
227577
+ "type": "string"
227578
+ }
227579
+ }
227580
+ }
227581
+ }
227582
+ }
227583
+ }
227584
+ }
227585
+ }
227586
+ },
226290
227587
  "/api/v1/meta/users/deactivate": {
226291
227588
  "post": {
226292
227589
  "operationId": "postApiV1MetaUsersDeactivate",
@@ -251371,7 +252668,7 @@
251371
252668
  "tags": [
251372
252669
  "profitability"
251373
252670
  ],
251374
- "description": "Scans the accessible sessions' profitability configurations, whether or not the margin alert is switched on, and returns campaign-level margins below each configured threshold. Each row states whether its revenue is tracked or estimated. Rows are limited to campaigns whose ad account belonged to the selected workspace(s) on that day.",
252671
+ "description": "Scans the profitability settings of the selected workspace(s) (their defaults when never saved), whether or not the margin alert is switched on, and returns campaign-level margins below each workspace's own threshold, over its own lookback window. Each row states whether its revenue is tracked or estimated. Rows are limited to campaigns whose ad account belonged to that workspace on that day.",
251375
252672
  "parameters": [
251376
252673
  {
251377
252674
  "schema": {
@@ -252690,6 +253987,7 @@
252690
253987
  "currency": {
252691
253988
  "minLength": 3,
252692
253989
  "maxLength": 10,
253990
+ "description": "Base currency of the workspace. A new value must be an ISO 4217 code of three upper-case letters (400 INVALID_CURRENCY otherwise); the value already saved is accepted as it is.",
252693
253991
  "type": "string"
252694
253992
  },
252695
253993
  "attribution_window_days": {
@@ -252827,7 +254125,7 @@
252827
254125
  "tags": [
252828
254126
  "profitability"
252829
254127
  ],
252830
- "description": "Updates the profitability settings of the explicit workspace (x-team-id or an active team scope) and, for shipping and payment fee, of the chosen store; then schedules recent rematerialization when currency or store costs change. Requires the owner role in that workspace. Without an explicit workspace the request is refused with 400 SCOPE_TEAM_REQUIRED. Switching the margin alert on is refused with 422 MARGIN_ALERT_REQUIRES_TRACKED_REVENUE when no tracked revenue source (Shopify, WooCommerce or a tracker) is connected in that workspace.",
254128
+ "description": "Updates the profitability settings of the explicit workspace (x-team-id or an active team scope) and, for shipping and payment fee, of the chosen store; then schedules recent rematerialization when currency or store costs change. Requires the owner role in that workspace. Without an explicit workspace the request is refused with 400 SCOPE_TEAM_REQUIRED. Switching the margin alert on is refused with 422 MARGIN_ALERT_REQUIRES_TRACKED_REVENUE when no tracked revenue source (Shopify, WooCommerce or a tracker) is connected in that workspace. A new currency that is not an ISO 4217 code of three upper-case letters is refused with 400 INVALID_CURRENCY; the currency already saved is accepted as it is.",
252831
254129
  "requestBody": {
252832
254130
  "required": true,
252833
254131
  "content": {
@@ -252866,6 +254164,7 @@
252866
254164
  "currency": {
252867
254165
  "minLength": 3,
252868
254166
  "maxLength": 10,
254167
+ "description": "Base currency of the workspace. A new value must be an ISO 4217 code of three upper-case letters (400 INVALID_CURRENCY otherwise); the value already saved is accepted as it is.",
252869
254168
  "type": "string"
252870
254169
  },
252871
254170
  "attribution_window_days": {
@@ -252976,6 +254275,7 @@
252976
254275
  "currency": {
252977
254276
  "minLength": 3,
252978
254277
  "maxLength": 10,
254278
+ "description": "Base currency of the workspace. A new value must be an ISO 4217 code of three upper-case letters (400 INVALID_CURRENCY otherwise); the value already saved is accepted as it is.",
252979
254279
  "type": "string"
252980
254280
  },
252981
254281
  "attribution_window_days": {
@@ -324508,6 +325808,47 @@
324508
325808
  }
324509
325809
  }
324510
325810
  },
325811
+ {
325812
+ "additionalProperties": false,
325813
+ "description": "The role in the workspace is below the floor for connecting a domain here (`family: domain`, `act: connect`), raised by the backoffice lever \"asset_permission_floors\". Only when the claim mints a subdomain.",
325814
+ "type": "object",
325815
+ "required": [
325816
+ "code",
325817
+ "error"
325818
+ ],
325819
+ "properties": {
325820
+ "code": {
325821
+ "type": "string",
325822
+ "enum": [
325823
+ "ASSET_ROLE_FLOOR"
325824
+ ]
325825
+ },
325826
+ "error": {
325827
+ "type": "string"
325828
+ },
325829
+ "family": {
325830
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
325831
+ "type": "string"
325832
+ },
325833
+ "act": {
325834
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
325835
+ "anyOf": [
325836
+ {
325837
+ "type": "string",
325838
+ "enum": [
325839
+ "connect"
325840
+ ]
325841
+ },
325842
+ {
325843
+ "type": "string",
325844
+ "enum": [
325845
+ "disconnect"
325846
+ ]
325847
+ }
325848
+ ]
325849
+ }
325850
+ }
325851
+ },
324511
325852
  {
324512
325853
  "additionalProperties": true,
324513
325854
  "description": "The framework-shaped error the auth/role/flag guards emit.",
@@ -324579,37 +325920,216 @@
324579
325920
  }
324580
325921
  }
324581
325922
  },
324582
- "500": {
324583
- "description": "A refusal from the SEO module, with a stable code.",
325923
+ "500": {
325924
+ "description": "A refusal from the SEO module, with a stable code.",
325925
+ "content": {
325926
+ "application/json": {
325927
+ "schema": {
325928
+ "additionalProperties": false,
325929
+ "description": "A refusal from the SEO module, with a stable code.",
325930
+ "type": "object",
325931
+ "required": [
325932
+ "code",
325933
+ "error"
325934
+ ],
325935
+ "properties": {
325936
+ "code": {
325937
+ "description": "Stable machine-readable error code.",
325938
+ "type": "string"
325939
+ },
325940
+ "error": {
325941
+ "type": "string"
325942
+ }
325943
+ }
325944
+ }
325945
+ }
325946
+ }
325947
+ },
325948
+ "503": {
325949
+ "description": "The SEO module or the hosting channel is disabled (503): nothing is claimed.",
325950
+ "content": {
325951
+ "application/json": {
325952
+ "schema": {
325953
+ "description": "The SEO module or the hosting channel is disabled (503): nothing is claimed.",
325954
+ "anyOf": [
325955
+ {
325956
+ "additionalProperties": false,
325957
+ "description": "A refusal from the SEO module, with a stable code.",
325958
+ "type": "object",
325959
+ "required": [
325960
+ "code",
325961
+ "error"
325962
+ ],
325963
+ "properties": {
325964
+ "code": {
325965
+ "description": "Stable machine-readable error code.",
325966
+ "type": "string"
325967
+ },
325968
+ "error": {
325969
+ "type": "string"
325970
+ }
325971
+ }
325972
+ },
325973
+ {
325974
+ "additionalProperties": true,
325975
+ "description": "The framework-shaped error the auth/role/flag guards emit.",
325976
+ "type": "object",
325977
+ "properties": {
325978
+ "error": {
325979
+ "type": "string"
325980
+ },
325981
+ "message": {
325982
+ "type": "string"
325983
+ },
325984
+ "statusCode": {
325985
+ "type": "integer"
325986
+ }
325987
+ }
325988
+ }
325989
+ ]
325990
+ }
325991
+ }
325992
+ }
325993
+ }
325994
+ }
325995
+ }
325996
+ },
325997
+ "/api/v1/seo/sites/{siteId}/hosted/detach": {
325998
+ "post": {
325999
+ "operationId": "detachSeoHostedSite",
326000
+ "summary": "Detach an SEO site from its hosting domain",
326001
+ "tags": [
326002
+ "seo"
326003
+ ],
326004
+ "description": "U9 — detach an SEO site from the domain that hosts it. Closes the hosted binding, takes every page served for the site on that host offline and withdraws the delivery rows that had a version online, in one transaction with an SEO audit row (`seo_hosted_site.detached`). Afterwards the domain can be moved or deleted from the Domains section, and the site can be bound to another host from its publishing card. Pieces already published do not come back on their own on a new host; deliveries still in flight are resumed with Retry. A stop command: it answers even with the SEO module switched off, and it is not gated by the hosting channel switch, so pages put online can always be taken down. RBAC: the SEO write floor (super_admin, admin, owner, manager, mediabuyer).",
326005
+ "requestBody": {
326006
+ "required": true,
326007
+ "content": {
326008
+ "application/json": {
326009
+ "schema": {
326010
+ "additionalProperties": false,
326011
+ "type": "object",
326012
+ "required": [
326013
+ "confirm"
326014
+ ],
326015
+ "properties": {
326016
+ "confirm": {
326017
+ "description": "Required: detaching takes every page served on that host offline, and published pieces do not come back on their own.",
326018
+ "type": "boolean",
326019
+ "enum": [
326020
+ true
326021
+ ]
326022
+ }
326023
+ }
326024
+ }
326025
+ }
326026
+ }
326027
+ },
326028
+ "parameters": [
326029
+ {
326030
+ "schema": {
326031
+ "format": "uuid",
326032
+ "type": "string"
326033
+ },
326034
+ "in": "path",
326035
+ "name": "siteId",
326036
+ "required": true,
326037
+ "description": "The SEO site the hosted subdomain is claimed for."
326038
+ }
326039
+ ],
326040
+ "security": [
326041
+ {
326042
+ "bearerAuth": []
326043
+ }
326044
+ ],
326045
+ "responses": {
326046
+ "200": {
326047
+ "description": "The site is detached: binding closed, pages offline.",
326048
+ "content": {
326049
+ "application/json": {
326050
+ "schema": {
326051
+ "additionalProperties": false,
326052
+ "description": "The site is detached: binding closed, pages offline.",
326053
+ "type": "object",
326054
+ "required": [
326055
+ "consegne_ritirate",
326056
+ "esito",
326057
+ "host",
326058
+ "pagine_ritirate",
326059
+ "tc_domain_id"
326060
+ ],
326061
+ "properties": {
326062
+ "consegne_ritirate": {
326063
+ "description": "Delivery rows that had a version online on this host and are now withdrawn.",
326064
+ "minimum": 0,
326065
+ "type": "integer"
326066
+ },
326067
+ "esito": {
326068
+ "type": "string",
326069
+ "enum": [
326070
+ "staccato"
326071
+ ]
326072
+ },
326073
+ "host": {
326074
+ "description": "The hostname the site was served on.",
326075
+ "type": "string"
326076
+ },
326077
+ "pagine_ritirate": {
326078
+ "description": "Served pages taken offline.",
326079
+ "minimum": 0,
326080
+ "type": "integer"
326081
+ },
326082
+ "tc_domain_id": {
326083
+ "description": "The domain that is now free to move or delete in the Domains section.",
326084
+ "format": "uuid",
326085
+ "type": "string"
326086
+ }
326087
+ }
326088
+ }
326089
+ }
326090
+ }
326091
+ },
326092
+ "400": {
326093
+ "description": "A refusal from the SEO module, with a stable code.",
326094
+ "content": {
326095
+ "application/json": {
326096
+ "schema": {
326097
+ "additionalProperties": false,
326098
+ "description": "A refusal from the SEO module, with a stable code.",
326099
+ "type": "object",
326100
+ "required": [
326101
+ "code",
326102
+ "error"
326103
+ ],
326104
+ "properties": {
326105
+ "code": {
326106
+ "description": "Stable machine-readable error code.",
326107
+ "type": "string"
326108
+ },
326109
+ "error": {
326110
+ "type": "string"
326111
+ }
326112
+ }
326113
+ }
326114
+ }
326115
+ }
326116
+ },
326117
+ "401": {
326118
+ "description": "Unauthorized - missing or invalid bearer token",
324584
326119
  "content": {
324585
326120
  "application/json": {
324586
326121
  "schema": {
324587
- "additionalProperties": false,
324588
- "description": "A refusal from the SEO module, with a stable code.",
324589
- "type": "object",
324590
- "required": [
324591
- "code",
324592
- "error"
324593
- ],
324594
- "properties": {
324595
- "code": {
324596
- "description": "Stable machine-readable error code.",
324597
- "type": "string"
324598
- },
324599
- "error": {
324600
- "type": "string"
324601
- }
324602
- }
326122
+ "$ref": "#/components/schemas/ErrorResponse"
324603
326123
  }
324604
326124
  }
324605
326125
  }
324606
326126
  },
324607
- "503": {
324608
- "description": "The SEO module or the hosting channel is disabled (503): nothing is claimed.",
326127
+ "403": {
326128
+ "description": "Forbidden: the guards refuse before the handler runs, and their shape is the framework one.",
324609
326129
  "content": {
324610
326130
  "application/json": {
324611
326131
  "schema": {
324612
- "description": "The SEO module or the hosting channel is disabled (503): nothing is claimed.",
326132
+ "description": "Forbidden: the guards refuse before the handler runs, and their shape is the framework one.",
324613
326133
  "anyOf": [
324614
326134
  {
324615
326135
  "additionalProperties": false,
@@ -324629,170 +326149,9 @@
324629
326149
  }
324630
326150
  }
324631
326151
  },
324632
- {
324633
- "additionalProperties": true,
324634
- "description": "The framework-shaped error the auth/role/flag guards emit.",
324635
- "type": "object",
324636
- "properties": {
324637
- "error": {
324638
- "type": "string"
324639
- },
324640
- "message": {
324641
- "type": "string"
324642
- },
324643
- "statusCode": {
324644
- "type": "integer"
324645
- }
324646
- }
324647
- }
324648
- ]
324649
- }
324650
- }
324651
- }
324652
- }
324653
- }
324654
- }
324655
- },
324656
- "/api/v1/seo/sites/{siteId}/hosted/detach": {
324657
- "post": {
324658
- "operationId": "detachSeoHostedSite",
324659
- "summary": "Detach an SEO site from its hosting domain",
324660
- "tags": [
324661
- "seo"
324662
- ],
324663
- "description": "U9 — detach an SEO site from the domain that hosts it. Closes the hosted binding, takes every page served for the site on that host offline and withdraws the delivery rows that had a version online, in one transaction with an SEO audit row (`seo_hosted_site.detached`). Afterwards the domain can be moved or deleted from the Domains section, and the site can be bound to another host from its publishing card. Pieces already published do not come back on their own on a new host; deliveries still in flight are resumed with Retry. A stop command: it answers even with the SEO module switched off, and it is not gated by the hosting channel switch, so pages put online can always be taken down. RBAC: the SEO write floor (super_admin, admin, owner, manager, mediabuyer).",
324664
- "requestBody": {
324665
- "required": true,
324666
- "content": {
324667
- "application/json": {
324668
- "schema": {
324669
- "additionalProperties": false,
324670
- "type": "object",
324671
- "required": [
324672
- "confirm"
324673
- ],
324674
- "properties": {
324675
- "confirm": {
324676
- "description": "Required: detaching takes every page served on that host offline, and published pieces do not come back on their own.",
324677
- "type": "boolean",
324678
- "enum": [
324679
- true
324680
- ]
324681
- }
324682
- }
324683
- }
324684
- }
324685
- }
324686
- },
324687
- "parameters": [
324688
- {
324689
- "schema": {
324690
- "format": "uuid",
324691
- "type": "string"
324692
- },
324693
- "in": "path",
324694
- "name": "siteId",
324695
- "required": true,
324696
- "description": "The SEO site the hosted subdomain is claimed for."
324697
- }
324698
- ],
324699
- "security": [
324700
- {
324701
- "bearerAuth": []
324702
- }
324703
- ],
324704
- "responses": {
324705
- "200": {
324706
- "description": "The site is detached: binding closed, pages offline.",
324707
- "content": {
324708
- "application/json": {
324709
- "schema": {
324710
- "additionalProperties": false,
324711
- "description": "The site is detached: binding closed, pages offline.",
324712
- "type": "object",
324713
- "required": [
324714
- "consegne_ritirate",
324715
- "esito",
324716
- "host",
324717
- "pagine_ritirate",
324718
- "tc_domain_id"
324719
- ],
324720
- "properties": {
324721
- "consegne_ritirate": {
324722
- "description": "Delivery rows that had a version online on this host and are now withdrawn.",
324723
- "minimum": 0,
324724
- "type": "integer"
324725
- },
324726
- "esito": {
324727
- "type": "string",
324728
- "enum": [
324729
- "staccato"
324730
- ]
324731
- },
324732
- "host": {
324733
- "description": "The hostname the site was served on.",
324734
- "type": "string"
324735
- },
324736
- "pagine_ritirate": {
324737
- "description": "Served pages taken offline.",
324738
- "minimum": 0,
324739
- "type": "integer"
324740
- },
324741
- "tc_domain_id": {
324742
- "description": "The domain that is now free to move or delete in the Domains section.",
324743
- "format": "uuid",
324744
- "type": "string"
324745
- }
324746
- }
324747
- }
324748
- }
324749
- }
324750
- },
324751
- "400": {
324752
- "description": "A refusal from the SEO module, with a stable code.",
324753
- "content": {
324754
- "application/json": {
324755
- "schema": {
324756
- "additionalProperties": false,
324757
- "description": "A refusal from the SEO module, with a stable code.",
324758
- "type": "object",
324759
- "required": [
324760
- "code",
324761
- "error"
324762
- ],
324763
- "properties": {
324764
- "code": {
324765
- "description": "Stable machine-readable error code.",
324766
- "type": "string"
324767
- },
324768
- "error": {
324769
- "type": "string"
324770
- }
324771
- }
324772
- }
324773
- }
324774
- }
324775
- },
324776
- "401": {
324777
- "description": "Unauthorized - missing or invalid bearer token",
324778
- "content": {
324779
- "application/json": {
324780
- "schema": {
324781
- "$ref": "#/components/schemas/ErrorResponse"
324782
- }
324783
- }
324784
- }
324785
- },
324786
- "403": {
324787
- "description": "Forbidden: the guards refuse before the handler runs, and their shape is the framework one.",
324788
- "content": {
324789
- "application/json": {
324790
- "schema": {
324791
- "description": "Forbidden: the guards refuse before the handler runs, and their shape is the framework one.",
324792
- "anyOf": [
324793
326152
  {
324794
326153
  "additionalProperties": false,
324795
- "description": "A refusal from the SEO module, with a stable code.",
326154
+ "description": "The role in the workspace is below the floor for connecting a domain here (`family: domain`, `act: connect`), raised by the backoffice lever \"asset_permission_floors\". Only when the claim mints a subdomain.",
324796
326155
  "type": "object",
324797
326156
  "required": [
324798
326157
  "code",
@@ -324800,11 +326159,34 @@
324800
326159
  ],
324801
326160
  "properties": {
324802
326161
  "code": {
324803
- "description": "Stable machine-readable error code.",
324804
- "type": "string"
326162
+ "type": "string",
326163
+ "enum": [
326164
+ "ASSET_ROLE_FLOOR"
326165
+ ]
324805
326166
  },
324806
326167
  "error": {
324807
326168
  "type": "string"
326169
+ },
326170
+ "family": {
326171
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
326172
+ "type": "string"
326173
+ },
326174
+ "act": {
326175
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
326176
+ "anyOf": [
326177
+ {
326178
+ "type": "string",
326179
+ "enum": [
326180
+ "connect"
326181
+ ]
326182
+ },
326183
+ {
326184
+ "type": "string",
326185
+ "enum": [
326186
+ "disconnect"
326187
+ ]
326188
+ }
326189
+ ]
324808
326190
  }
324809
326191
  }
324810
326192
  },
@@ -361319,6 +362701,12 @@
361319
362701
  "CAMPAIGN_PUBLISHED"
361320
362702
  ]
361321
362703
  },
362704
+ {
362705
+ "type": "string",
362706
+ "enum": [
362707
+ "BULK_LAUNCH_COMPLETED"
362708
+ ]
362709
+ },
361322
362710
  {
361323
362711
  "type": "string",
361324
362712
  "enum": [
@@ -361409,12 +362797,6 @@
361409
362797
  "REPORT_READY"
361410
362798
  ]
361411
362799
  },
361412
- {
361413
- "type": "string",
361414
- "enum": [
361415
- "BULK_LAUNCH_COMPLETED"
361416
- ]
361417
- },
361418
362800
  {
361419
362801
  "type": "string",
361420
362802
  "enum": [
@@ -361513,6 +362895,12 @@
361513
362895
  "CAMPAIGN_PUBLISHED"
361514
362896
  ]
361515
362897
  },
362898
+ {
362899
+ "type": "string",
362900
+ "enum": [
362901
+ "BULK_LAUNCH_COMPLETED"
362902
+ ]
362903
+ },
361516
362904
  {
361517
362905
  "type": "string",
361518
362906
  "enum": [
@@ -361603,12 +362991,6 @@
361603
362991
  "REPORT_READY"
361604
362992
  ]
361605
362993
  },
361606
- {
361607
- "type": "string",
361608
- "enum": [
361609
- "BULK_LAUNCH_COMPLETED"
361610
- ]
361611
- },
361612
362994
  {
361613
362995
  "type": "string",
361614
362996
  "enum": [
@@ -361663,6 +363045,12 @@
361663
363045
  "CAMPAIGN_PUBLISHED"
361664
363046
  ]
361665
363047
  },
363048
+ {
363049
+ "type": "string",
363050
+ "enum": [
363051
+ "BULK_LAUNCH_COMPLETED"
363052
+ ]
363053
+ },
361666
363054
  {
361667
363055
  "type": "string",
361668
363056
  "enum": [
@@ -361753,12 +363141,6 @@
361753
363141
  "REPORT_READY"
361754
363142
  ]
361755
363143
  },
361756
- {
361757
- "type": "string",
361758
- "enum": [
361759
- "BULK_LAUNCH_COMPLETED"
361760
- ]
361761
- },
361762
363144
  {
361763
363145
  "type": "string",
361764
363146
  "enum": [
@@ -361960,6 +363342,12 @@
361960
363342
  "CAMPAIGN_PUBLISHED"
361961
363343
  ]
361962
363344
  },
363345
+ {
363346
+ "type": "string",
363347
+ "enum": [
363348
+ "BULK_LAUNCH_COMPLETED"
363349
+ ]
363350
+ },
361963
363351
  {
361964
363352
  "type": "string",
361965
363353
  "enum": [
@@ -362050,12 +363438,6 @@
362050
363438
  "REPORT_READY"
362051
363439
  ]
362052
363440
  },
362053
- {
362054
- "type": "string",
362055
- "enum": [
362056
- "BULK_LAUNCH_COMPLETED"
362057
- ]
362058
- },
362059
363441
  {
362060
363442
  "type": "string",
362061
363443
  "enum": [
@@ -362179,6 +363561,12 @@
362179
363561
  "CAMPAIGN_PUBLISHED"
362180
363562
  ]
362181
363563
  },
363564
+ {
363565
+ "type": "string",
363566
+ "enum": [
363567
+ "BULK_LAUNCH_COMPLETED"
363568
+ ]
363569
+ },
362182
363570
  {
362183
363571
  "type": "string",
362184
363572
  "enum": [
@@ -362269,12 +363657,6 @@
362269
363657
  "REPORT_READY"
362270
363658
  ]
362271
363659
  },
362272
- {
362273
- "type": "string",
362274
- "enum": [
362275
- "BULK_LAUNCH_COMPLETED"
362276
- ]
362277
- },
362278
363660
  {
362279
363661
  "type": "string",
362280
363662
  "enum": [
@@ -371706,6 +373088,67 @@
371706
373088
  "items": {
371707
373089
  "type": "string"
371708
373090
  }
373091
+ },
373092
+ "tiktok": {
373093
+ "additionalProperties": false,
373094
+ "description": "TikTok post choices; required when a TikTok account is a target.",
373095
+ "type": "object",
373096
+ "required": [
373097
+ "privacyLevel",
373098
+ "allowComment",
373099
+ "allowDuet",
373100
+ "allowStitch",
373101
+ "yourBrand",
373102
+ "brandedContent"
373103
+ ],
373104
+ "properties": {
373105
+ "privacyLevel": {
373106
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
373107
+ "anyOf": [
373108
+ {
373109
+ "type": "string",
373110
+ "enum": [
373111
+ "PUBLIC_TO_EVERYONE"
373112
+ ]
373113
+ },
373114
+ {
373115
+ "type": "string",
373116
+ "enum": [
373117
+ "MUTUAL_FOLLOW_FRIENDS"
373118
+ ]
373119
+ },
373120
+ {
373121
+ "type": "string",
373122
+ "enum": [
373123
+ "FOLLOWER_OF_CREATOR"
373124
+ ]
373125
+ },
373126
+ {
373127
+ "type": "string",
373128
+ "enum": [
373129
+ "SELF_ONLY"
373130
+ ]
373131
+ }
373132
+ ]
373133
+ },
373134
+ "allowComment": {
373135
+ "type": "boolean"
373136
+ },
373137
+ "allowDuet": {
373138
+ "type": "boolean"
373139
+ },
373140
+ "allowStitch": {
373141
+ "type": "boolean"
373142
+ },
373143
+ "yourBrand": {
373144
+ "description": "Promotes the creator own business (brand_organic_toggle).",
373145
+ "type": "boolean"
373146
+ },
373147
+ "brandedContent": {
373148
+ "description": "Paid partnership with a third party (brand_content_toggle).",
373149
+ "type": "boolean"
373150
+ }
373151
+ }
371709
373152
  }
371710
373153
  }
371711
373154
  },
@@ -371894,6 +373337,67 @@
371894
373337
  "items": {
371895
373338
  "type": "string"
371896
373339
  }
373340
+ },
373341
+ "tiktok": {
373342
+ "additionalProperties": false,
373343
+ "description": "TikTok post choices; required when a TikTok account is a target.",
373344
+ "type": "object",
373345
+ "required": [
373346
+ "privacyLevel",
373347
+ "allowComment",
373348
+ "allowDuet",
373349
+ "allowStitch",
373350
+ "yourBrand",
373351
+ "brandedContent"
373352
+ ],
373353
+ "properties": {
373354
+ "privacyLevel": {
373355
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
373356
+ "anyOf": [
373357
+ {
373358
+ "type": "string",
373359
+ "enum": [
373360
+ "PUBLIC_TO_EVERYONE"
373361
+ ]
373362
+ },
373363
+ {
373364
+ "type": "string",
373365
+ "enum": [
373366
+ "MUTUAL_FOLLOW_FRIENDS"
373367
+ ]
373368
+ },
373369
+ {
373370
+ "type": "string",
373371
+ "enum": [
373372
+ "FOLLOWER_OF_CREATOR"
373373
+ ]
373374
+ },
373375
+ {
373376
+ "type": "string",
373377
+ "enum": [
373378
+ "SELF_ONLY"
373379
+ ]
373380
+ }
373381
+ ]
373382
+ },
373383
+ "allowComment": {
373384
+ "type": "boolean"
373385
+ },
373386
+ "allowDuet": {
373387
+ "type": "boolean"
373388
+ },
373389
+ "allowStitch": {
373390
+ "type": "boolean"
373391
+ },
373392
+ "yourBrand": {
373393
+ "description": "Promotes the creator own business (brand_organic_toggle).",
373394
+ "type": "boolean"
373395
+ },
373396
+ "brandedContent": {
373397
+ "description": "Paid partnership with a third party (brand_content_toggle).",
373398
+ "type": "boolean"
373399
+ }
373400
+ }
371897
373401
  }
371898
373402
  }
371899
373403
  },
@@ -371990,6 +373494,67 @@
371990
373494
  "items": {
371991
373495
  "type": "string"
371992
373496
  }
373497
+ },
373498
+ "tiktok": {
373499
+ "additionalProperties": false,
373500
+ "description": "TikTok post choices; required when a TikTok account is a target.",
373501
+ "type": "object",
373502
+ "required": [
373503
+ "privacyLevel",
373504
+ "allowComment",
373505
+ "allowDuet",
373506
+ "allowStitch",
373507
+ "yourBrand",
373508
+ "brandedContent"
373509
+ ],
373510
+ "properties": {
373511
+ "privacyLevel": {
373512
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
373513
+ "anyOf": [
373514
+ {
373515
+ "type": "string",
373516
+ "enum": [
373517
+ "PUBLIC_TO_EVERYONE"
373518
+ ]
373519
+ },
373520
+ {
373521
+ "type": "string",
373522
+ "enum": [
373523
+ "MUTUAL_FOLLOW_FRIENDS"
373524
+ ]
373525
+ },
373526
+ {
373527
+ "type": "string",
373528
+ "enum": [
373529
+ "FOLLOWER_OF_CREATOR"
373530
+ ]
373531
+ },
373532
+ {
373533
+ "type": "string",
373534
+ "enum": [
373535
+ "SELF_ONLY"
373536
+ ]
373537
+ }
373538
+ ]
373539
+ },
373540
+ "allowComment": {
373541
+ "type": "boolean"
373542
+ },
373543
+ "allowDuet": {
373544
+ "type": "boolean"
373545
+ },
373546
+ "allowStitch": {
373547
+ "type": "boolean"
373548
+ },
373549
+ "yourBrand": {
373550
+ "description": "Promotes the creator own business (brand_organic_toggle).",
373551
+ "type": "boolean"
373552
+ },
373553
+ "brandedContent": {
373554
+ "description": "Paid partnership with a third party (brand_content_toggle).",
373555
+ "type": "boolean"
373556
+ }
373557
+ }
371993
373558
  }
371994
373559
  }
371995
373560
  },
@@ -372188,6 +373753,67 @@
372188
373753
  "items": {
372189
373754
  "type": "string"
372190
373755
  }
373756
+ },
373757
+ "tiktok": {
373758
+ "additionalProperties": false,
373759
+ "description": "TikTok post choices; required when a TikTok account is a target.",
373760
+ "type": "object",
373761
+ "required": [
373762
+ "privacyLevel",
373763
+ "allowComment",
373764
+ "allowDuet",
373765
+ "allowStitch",
373766
+ "yourBrand",
373767
+ "brandedContent"
373768
+ ],
373769
+ "properties": {
373770
+ "privacyLevel": {
373771
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
373772
+ "anyOf": [
373773
+ {
373774
+ "type": "string",
373775
+ "enum": [
373776
+ "PUBLIC_TO_EVERYONE"
373777
+ ]
373778
+ },
373779
+ {
373780
+ "type": "string",
373781
+ "enum": [
373782
+ "MUTUAL_FOLLOW_FRIENDS"
373783
+ ]
373784
+ },
373785
+ {
373786
+ "type": "string",
373787
+ "enum": [
373788
+ "FOLLOWER_OF_CREATOR"
373789
+ ]
373790
+ },
373791
+ {
373792
+ "type": "string",
373793
+ "enum": [
373794
+ "SELF_ONLY"
373795
+ ]
373796
+ }
373797
+ ]
373798
+ },
373799
+ "allowComment": {
373800
+ "type": "boolean"
373801
+ },
373802
+ "allowDuet": {
373803
+ "type": "boolean"
373804
+ },
373805
+ "allowStitch": {
373806
+ "type": "boolean"
373807
+ },
373808
+ "yourBrand": {
373809
+ "description": "Promotes the creator own business (brand_organic_toggle).",
373810
+ "type": "boolean"
373811
+ },
373812
+ "brandedContent": {
373813
+ "description": "Paid partnership with a third party (brand_content_toggle).",
373814
+ "type": "boolean"
373815
+ }
373816
+ }
372191
373817
  }
372192
373818
  }
372193
373819
  },
@@ -372407,6 +374033,67 @@
372407
374033
  "items": {
372408
374034
  "type": "string"
372409
374035
  }
374036
+ },
374037
+ "tiktok": {
374038
+ "additionalProperties": false,
374039
+ "description": "TikTok post choices; required when a TikTok account is a target.",
374040
+ "type": "object",
374041
+ "required": [
374042
+ "privacyLevel",
374043
+ "allowComment",
374044
+ "allowDuet",
374045
+ "allowStitch",
374046
+ "yourBrand",
374047
+ "brandedContent"
374048
+ ],
374049
+ "properties": {
374050
+ "privacyLevel": {
374051
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
374052
+ "anyOf": [
374053
+ {
374054
+ "type": "string",
374055
+ "enum": [
374056
+ "PUBLIC_TO_EVERYONE"
374057
+ ]
374058
+ },
374059
+ {
374060
+ "type": "string",
374061
+ "enum": [
374062
+ "MUTUAL_FOLLOW_FRIENDS"
374063
+ ]
374064
+ },
374065
+ {
374066
+ "type": "string",
374067
+ "enum": [
374068
+ "FOLLOWER_OF_CREATOR"
374069
+ ]
374070
+ },
374071
+ {
374072
+ "type": "string",
374073
+ "enum": [
374074
+ "SELF_ONLY"
374075
+ ]
374076
+ }
374077
+ ]
374078
+ },
374079
+ "allowComment": {
374080
+ "type": "boolean"
374081
+ },
374082
+ "allowDuet": {
374083
+ "type": "boolean"
374084
+ },
374085
+ "allowStitch": {
374086
+ "type": "boolean"
374087
+ },
374088
+ "yourBrand": {
374089
+ "description": "Promotes the creator own business (brand_organic_toggle).",
374090
+ "type": "boolean"
374091
+ },
374092
+ "brandedContent": {
374093
+ "description": "Paid partnership with a third party (brand_content_toggle).",
374094
+ "type": "boolean"
374095
+ }
374096
+ }
372410
374097
  }
372411
374098
  }
372412
374099
  },
@@ -372651,6 +374338,67 @@
372651
374338
  "items": {
372652
374339
  "type": "string"
372653
374340
  }
374341
+ },
374342
+ "tiktok": {
374343
+ "additionalProperties": false,
374344
+ "description": "TikTok post choices; required when a TikTok account is a target.",
374345
+ "type": "object",
374346
+ "required": [
374347
+ "privacyLevel",
374348
+ "allowComment",
374349
+ "allowDuet",
374350
+ "allowStitch",
374351
+ "yourBrand",
374352
+ "brandedContent"
374353
+ ],
374354
+ "properties": {
374355
+ "privacyLevel": {
374356
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
374357
+ "anyOf": [
374358
+ {
374359
+ "type": "string",
374360
+ "enum": [
374361
+ "PUBLIC_TO_EVERYONE"
374362
+ ]
374363
+ },
374364
+ {
374365
+ "type": "string",
374366
+ "enum": [
374367
+ "MUTUAL_FOLLOW_FRIENDS"
374368
+ ]
374369
+ },
374370
+ {
374371
+ "type": "string",
374372
+ "enum": [
374373
+ "FOLLOWER_OF_CREATOR"
374374
+ ]
374375
+ },
374376
+ {
374377
+ "type": "string",
374378
+ "enum": [
374379
+ "SELF_ONLY"
374380
+ ]
374381
+ }
374382
+ ]
374383
+ },
374384
+ "allowComment": {
374385
+ "type": "boolean"
374386
+ },
374387
+ "allowDuet": {
374388
+ "type": "boolean"
374389
+ },
374390
+ "allowStitch": {
374391
+ "type": "boolean"
374392
+ },
374393
+ "yourBrand": {
374394
+ "description": "Promotes the creator own business (brand_organic_toggle).",
374395
+ "type": "boolean"
374396
+ },
374397
+ "brandedContent": {
374398
+ "description": "Paid partnership with a third party (brand_content_toggle).",
374399
+ "type": "boolean"
374400
+ }
374401
+ }
372654
374402
  }
372655
374403
  }
372656
374404
  },
@@ -372901,6 +374649,67 @@
372901
374649
  "items": {
372902
374650
  "type": "string"
372903
374651
  }
374652
+ },
374653
+ "tiktok": {
374654
+ "additionalProperties": false,
374655
+ "description": "TikTok post choices; required when a TikTok account is a target.",
374656
+ "type": "object",
374657
+ "required": [
374658
+ "privacyLevel",
374659
+ "allowComment",
374660
+ "allowDuet",
374661
+ "allowStitch",
374662
+ "yourBrand",
374663
+ "brandedContent"
374664
+ ],
374665
+ "properties": {
374666
+ "privacyLevel": {
374667
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
374668
+ "anyOf": [
374669
+ {
374670
+ "type": "string",
374671
+ "enum": [
374672
+ "PUBLIC_TO_EVERYONE"
374673
+ ]
374674
+ },
374675
+ {
374676
+ "type": "string",
374677
+ "enum": [
374678
+ "MUTUAL_FOLLOW_FRIENDS"
374679
+ ]
374680
+ },
374681
+ {
374682
+ "type": "string",
374683
+ "enum": [
374684
+ "FOLLOWER_OF_CREATOR"
374685
+ ]
374686
+ },
374687
+ {
374688
+ "type": "string",
374689
+ "enum": [
374690
+ "SELF_ONLY"
374691
+ ]
374692
+ }
374693
+ ]
374694
+ },
374695
+ "allowComment": {
374696
+ "type": "boolean"
374697
+ },
374698
+ "allowDuet": {
374699
+ "type": "boolean"
374700
+ },
374701
+ "allowStitch": {
374702
+ "type": "boolean"
374703
+ },
374704
+ "yourBrand": {
374705
+ "description": "Promotes the creator own business (brand_organic_toggle).",
374706
+ "type": "boolean"
374707
+ },
374708
+ "brandedContent": {
374709
+ "description": "Paid partnership with a third party (brand_content_toggle).",
374710
+ "type": "boolean"
374711
+ }
374712
+ }
372904
374713
  }
372905
374714
  }
372906
374715
  },
@@ -373154,6 +374963,67 @@
373154
374963
  "items": {
373155
374964
  "type": "string"
373156
374965
  }
374966
+ },
374967
+ "tiktok": {
374968
+ "additionalProperties": false,
374969
+ "description": "TikTok post choices; required when a TikTok account is a target.",
374970
+ "type": "object",
374971
+ "required": [
374972
+ "privacyLevel",
374973
+ "allowComment",
374974
+ "allowDuet",
374975
+ "allowStitch",
374976
+ "yourBrand",
374977
+ "brandedContent"
374978
+ ],
374979
+ "properties": {
374980
+ "privacyLevel": {
374981
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
374982
+ "anyOf": [
374983
+ {
374984
+ "type": "string",
374985
+ "enum": [
374986
+ "PUBLIC_TO_EVERYONE"
374987
+ ]
374988
+ },
374989
+ {
374990
+ "type": "string",
374991
+ "enum": [
374992
+ "MUTUAL_FOLLOW_FRIENDS"
374993
+ ]
374994
+ },
374995
+ {
374996
+ "type": "string",
374997
+ "enum": [
374998
+ "FOLLOWER_OF_CREATOR"
374999
+ ]
375000
+ },
375001
+ {
375002
+ "type": "string",
375003
+ "enum": [
375004
+ "SELF_ONLY"
375005
+ ]
375006
+ }
375007
+ ]
375008
+ },
375009
+ "allowComment": {
375010
+ "type": "boolean"
375011
+ },
375012
+ "allowDuet": {
375013
+ "type": "boolean"
375014
+ },
375015
+ "allowStitch": {
375016
+ "type": "boolean"
375017
+ },
375018
+ "yourBrand": {
375019
+ "description": "Promotes the creator own business (brand_organic_toggle).",
375020
+ "type": "boolean"
375021
+ },
375022
+ "brandedContent": {
375023
+ "description": "Paid partnership with a third party (brand_content_toggle).",
375024
+ "type": "boolean"
375025
+ }
375026
+ }
373157
375027
  }
373158
375028
  }
373159
375029
  },
@@ -376566,18 +378436,18 @@
376566
378436
  }
376567
378437
  },
376568
378438
  "403": {
376569
- "description": "Forbidden - caller lacks the required role/permission",
378439
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376570
378440
  "content": {
376571
378441
  "application/json": {
376572
378442
  "schema": {
376573
378443
  "additionalProperties": false,
378444
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376574
378445
  "type": "object",
376575
378446
  "required": [
376576
378447
  "statusCode",
376577
378448
  "error",
376578
378449
  "message",
376579
- "code",
376580
- "resource"
378450
+ "code"
376581
378451
  ],
376582
378452
  "properties": {
376583
378453
  "statusCode": {
@@ -376594,6 +378464,27 @@
376594
378464
  },
376595
378465
  "resource": {
376596
378466
  "type": "string"
378467
+ },
378468
+ "family": {
378469
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
378470
+ "type": "string"
378471
+ },
378472
+ "act": {
378473
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
378474
+ "anyOf": [
378475
+ {
378476
+ "type": "string",
378477
+ "enum": [
378478
+ "connect"
378479
+ ]
378480
+ },
378481
+ {
378482
+ "type": "string",
378483
+ "enum": [
378484
+ "disconnect"
378485
+ ]
378486
+ }
378487
+ ]
376597
378488
  }
376598
378489
  }
376599
378490
  }
@@ -376785,18 +378676,18 @@
376785
378676
  }
376786
378677
  },
376787
378678
  "403": {
376788
- "description": "Forbidden - caller lacks the required role/permission",
378679
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376789
378680
  "content": {
376790
378681
  "application/json": {
376791
378682
  "schema": {
376792
378683
  "additionalProperties": false,
378684
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376793
378685
  "type": "object",
376794
378686
  "required": [
376795
378687
  "statusCode",
376796
378688
  "error",
376797
378689
  "message",
376798
- "code",
376799
- "resource"
378690
+ "code"
376800
378691
  ],
376801
378692
  "properties": {
376802
378693
  "statusCode": {
@@ -376813,6 +378704,27 @@
376813
378704
  },
376814
378705
  "resource": {
376815
378706
  "type": "string"
378707
+ },
378708
+ "family": {
378709
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
378710
+ "type": "string"
378711
+ },
378712
+ "act": {
378713
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
378714
+ "anyOf": [
378715
+ {
378716
+ "type": "string",
378717
+ "enum": [
378718
+ "connect"
378719
+ ]
378720
+ },
378721
+ {
378722
+ "type": "string",
378723
+ "enum": [
378724
+ "disconnect"
378725
+ ]
378726
+ }
378727
+ ]
376816
378728
  }
376817
378729
  }
376818
378730
  }
@@ -376921,18 +378833,18 @@
376921
378833
  }
376922
378834
  },
376923
378835
  "403": {
376924
- "description": "Forbidden - caller lacks the required role/permission",
378836
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376925
378837
  "content": {
376926
378838
  "application/json": {
376927
378839
  "schema": {
376928
378840
  "additionalProperties": false,
378841
+ "description": "Forbidden: the SMM quota (PLAN_LIMIT_EXCEEDED, with `resource`), or `code: ASSET_ROLE_FLOOR` when the caller's role in the workspace is below the floor of connecting social accounts (the code floor, raised by the backoffice lever asset_permission_floors).",
376929
378842
  "type": "object",
376930
378843
  "required": [
376931
378844
  "statusCode",
376932
378845
  "error",
376933
378846
  "message",
376934
- "code",
376935
- "resource"
378847
+ "code"
376936
378848
  ],
376937
378849
  "properties": {
376938
378850
  "statusCode": {
@@ -376949,6 +378861,27 @@
376949
378861
  },
376950
378862
  "resource": {
376951
378863
  "type": "string"
378864
+ },
378865
+ "family": {
378866
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
378867
+ "type": "string"
378868
+ },
378869
+ "act": {
378870
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
378871
+ "anyOf": [
378872
+ {
378873
+ "type": "string",
378874
+ "enum": [
378875
+ "connect"
378876
+ ]
378877
+ },
378878
+ {
378879
+ "type": "string",
378880
+ "enum": [
378881
+ "disconnect"
378882
+ ]
378883
+ }
378884
+ ]
376952
378885
  }
376953
378886
  }
376954
378887
  }
@@ -377143,6 +379076,189 @@
377143
379076
  }
377144
379077
  }
377145
379078
  },
379079
+ "/api/v1/smm/accounts/{id}/tiktok/creator-info": {
379080
+ "get": {
379081
+ "operationId": "getApiV1SmmAccountsByIdTiktokCreatorInfo",
379082
+ "summary": "Read the posting options of a connected TikTok account",
379083
+ "tags": [
379084
+ "smm"
379085
+ ],
379086
+ "description": "Queries TikTok creator_info for the given connected TikTok account: nickname, the privacy levels the creator may use, which interactions the creator turned off and the maximum video duration. Read fresh every time the publish screen opens, as the TikTok Content Sharing Guidelines require. 404 when the account is not a TikTok account of the current team; 502 when TikTok refuses, for instance because the creator cannot post right now.",
379087
+ "parameters": [
379088
+ {
379089
+ "schema": {
379090
+ "type": "string"
379091
+ },
379092
+ "in": "path",
379093
+ "name": "id",
379094
+ "required": true
379095
+ }
379096
+ ],
379097
+ "security": [
379098
+ {
379099
+ "bearerAuth": []
379100
+ }
379101
+ ],
379102
+ "responses": {
379103
+ "200": {
379104
+ "description": "Successful response",
379105
+ "content": {
379106
+ "application/json": {
379107
+ "schema": {
379108
+ "additionalProperties": false,
379109
+ "type": "object",
379110
+ "required": [
379111
+ "creatorInfo"
379112
+ ],
379113
+ "properties": {
379114
+ "creatorInfo": {
379115
+ "additionalProperties": false,
379116
+ "type": "object",
379117
+ "required": [
379118
+ "commentDisabled",
379119
+ "duetDisabled",
379120
+ "nickname",
379121
+ "privacyLevelOptions",
379122
+ "stitchDisabled"
379123
+ ],
379124
+ "properties": {
379125
+ "avatarUrl": {
379126
+ "type": "string"
379127
+ },
379128
+ "commentDisabled": {
379129
+ "type": "boolean"
379130
+ },
379131
+ "duetDisabled": {
379132
+ "type": "boolean"
379133
+ },
379134
+ "maxVideoPostDurationSec": {
379135
+ "type": "integer"
379136
+ },
379137
+ "nickname": {
379138
+ "type": "string"
379139
+ },
379140
+ "privacyLevelOptions": {
379141
+ "type": "array",
379142
+ "items": {
379143
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
379144
+ "anyOf": [
379145
+ {
379146
+ "type": "string",
379147
+ "enum": [
379148
+ "PUBLIC_TO_EVERYONE"
379149
+ ]
379150
+ },
379151
+ {
379152
+ "type": "string",
379153
+ "enum": [
379154
+ "MUTUAL_FOLLOW_FRIENDS"
379155
+ ]
379156
+ },
379157
+ {
379158
+ "type": "string",
379159
+ "enum": [
379160
+ "FOLLOWER_OF_CREATOR"
379161
+ ]
379162
+ },
379163
+ {
379164
+ "type": "string",
379165
+ "enum": [
379166
+ "SELF_ONLY"
379167
+ ]
379168
+ }
379169
+ ]
379170
+ }
379171
+ },
379172
+ "stitchDisabled": {
379173
+ "type": "boolean"
379174
+ },
379175
+ "username": {
379176
+ "type": "string"
379177
+ }
379178
+ }
379179
+ }
379180
+ }
379181
+ }
379182
+ }
379183
+ }
379184
+ },
379185
+ "401": {
379186
+ "description": "Unauthorized - missing or invalid bearer token",
379187
+ "content": {
379188
+ "application/json": {
379189
+ "schema": {
379190
+ "$ref": "#/components/schemas/ErrorResponse"
379191
+ }
379192
+ }
379193
+ }
379194
+ },
379195
+ "404": {
379196
+ "description": "Resource not found",
379197
+ "content": {
379198
+ "application/json": {
379199
+ "schema": {
379200
+ "additionalProperties": false,
379201
+ "type": "object",
379202
+ "required": [
379203
+ "error"
379204
+ ],
379205
+ "properties": {
379206
+ "error": {
379207
+ "type": "string"
379208
+ }
379209
+ }
379210
+ }
379211
+ }
379212
+ }
379213
+ },
379214
+ "502": {
379215
+ "description": "Bad gateway - upstream provider failed",
379216
+ "content": {
379217
+ "application/json": {
379218
+ "schema": {
379219
+ "additionalProperties": false,
379220
+ "type": "object",
379221
+ "required": [
379222
+ "error"
379223
+ ],
379224
+ "properties": {
379225
+ "error": {
379226
+ "type": "string"
379227
+ }
379228
+ }
379229
+ }
379230
+ }
379231
+ }
379232
+ },
379233
+ "503": {
379234
+ "description": "Service unavailable",
379235
+ "content": {
379236
+ "application/json": {
379237
+ "schema": {
379238
+ "additionalProperties": false,
379239
+ "type": "object",
379240
+ "required": [
379241
+ "error",
379242
+ "code"
379243
+ ],
379244
+ "properties": {
379245
+ "error": {
379246
+ "type": "string"
379247
+ },
379248
+ "code": {
379249
+ "type": "string",
379250
+ "enum": [
379251
+ "FEATURE_DISABLED"
379252
+ ]
379253
+ }
379254
+ }
379255
+ }
379256
+ }
379257
+ }
379258
+ }
379259
+ }
379260
+ }
379261
+ },
377146
379262
  "/api/v1/smm/publish": {
377147
379263
  "post": {
377148
379264
  "operationId": "postApiV1SmmPublish",
@@ -377211,6 +379327,67 @@
377211
379327
  },
377212
379328
  "firstComment": {
377213
379329
  "type": "string"
379330
+ },
379331
+ "tiktok": {
379332
+ "additionalProperties": false,
379333
+ "description": "TikTok post choices; required when a TikTok account is a target.",
379334
+ "type": "object",
379335
+ "required": [
379336
+ "privacyLevel",
379337
+ "allowComment",
379338
+ "allowDuet",
379339
+ "allowStitch",
379340
+ "yourBrand",
379341
+ "brandedContent"
379342
+ ],
379343
+ "properties": {
379344
+ "privacyLevel": {
379345
+ "description": "TikTok privacy level; must be one of the creator privacy_level_options.",
379346
+ "anyOf": [
379347
+ {
379348
+ "type": "string",
379349
+ "enum": [
379350
+ "PUBLIC_TO_EVERYONE"
379351
+ ]
379352
+ },
379353
+ {
379354
+ "type": "string",
379355
+ "enum": [
379356
+ "MUTUAL_FOLLOW_FRIENDS"
379357
+ ]
379358
+ },
379359
+ {
379360
+ "type": "string",
379361
+ "enum": [
379362
+ "FOLLOWER_OF_CREATOR"
379363
+ ]
379364
+ },
379365
+ {
379366
+ "type": "string",
379367
+ "enum": [
379368
+ "SELF_ONLY"
379369
+ ]
379370
+ }
379371
+ ]
379372
+ },
379373
+ "allowComment": {
379374
+ "type": "boolean"
379375
+ },
379376
+ "allowDuet": {
379377
+ "type": "boolean"
379378
+ },
379379
+ "allowStitch": {
379380
+ "type": "boolean"
379381
+ },
379382
+ "yourBrand": {
379383
+ "description": "Promotes the creator own business (brand_organic_toggle).",
379384
+ "type": "boolean"
379385
+ },
379386
+ "brandedContent": {
379387
+ "description": "Paid partnership with a third party (brand_content_toggle).",
379388
+ "type": "boolean"
379389
+ }
379390
+ }
377214
379391
  }
377215
379392
  }
377216
379393
  }
@@ -377714,200 +379891,229 @@
377714
379891
  }
377715
379892
  },
377716
379893
  "403": {
377717
- "description": "TOKEN_NOT_YOURS, or the API-key permission refusal.",
377718
- "content": {
377719
- "application/json": {
377720
- "schema": {
377721
- "additionalProperties": false,
377722
- "description": "TOKEN_NOT_YOURS, or the API-key permission refusal.",
377723
- "type": "object",
377724
- "required": [
377725
- "error"
377726
- ],
377727
- "properties": {
377728
- "code": {
377729
- "type": "string"
377730
- },
377731
- "error": {
377732
- "type": "string"
377733
- },
377734
- "message": {
377735
- "type": "string"
377736
- },
377737
- "statusCode": {
377738
- "type": "integer"
377739
- }
377740
- }
377741
- }
377742
- }
377743
- }
377744
- },
377745
- "404": {
377746
- "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
377747
- "content": {
377748
- "application/json": {
377749
- "schema": {
377750
- "additionalProperties": false,
377751
- "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
377752
- "type": "object",
377753
- "required": [
377754
- "code",
377755
- "error"
377756
- ],
377757
- "properties": {
377758
- "code": {
377759
- "type": "string"
377760
- },
377761
- "error": {
377762
- "type": "string"
377763
- }
377764
- }
377765
- }
377766
- }
377767
- }
377768
- },
377769
- "409": {
377770
- "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
377771
- "content": {
377772
- "application/json": {
377773
- "schema": {
377774
- "additionalProperties": false,
377775
- "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
377776
- "type": "object",
377777
- "required": [
377778
- "code",
377779
- "error"
377780
- ],
377781
- "properties": {
377782
- "code": {
377783
- "type": "string"
377784
- },
377785
- "error": {
377786
- "type": "string"
377787
- }
377788
- }
377789
- }
377790
- }
377791
- }
377792
- },
377793
- "429": {
377794
- "description": "Too many requests - rate limit exceeded. Reachable on every API-key operation: the per-key cap sold with the plan answers `code: API_KEY_RATE_LIMITED` with `retry_after_seconds` and the `Retry-After` header. The global per-IP limiter can answer here too, with the same status and only `statusCode`, `error` and `message`.",
377795
- "content": {
377796
- "application/json": {
377797
- "schema": {
377798
- "$ref": "#/components/schemas/RateLimitedResponse"
377799
- }
377800
- }
377801
- }
377802
- },
377803
- "500": {
377804
- "description": "Internal server error",
377805
- "content": {
377806
- "application/json": {
377807
- "schema": {
377808
- "additionalProperties": true,
377809
- "type": "object",
377810
- "required": [
377811
- "error"
377812
- ],
377813
- "properties": {
377814
- "error": {
377815
- "type": "string"
377816
- },
377817
- "statusCode": {
377818
- "type": "integer"
377819
- },
377820
- "message": {
377821
- "type": "string"
377822
- }
377823
- }
377824
- }
377825
- }
377826
- }
377827
- },
377828
- "503": {
377829
- "description": "Session revocation check unavailable (Redis): retry after the Retry-After header.",
377830
- "headers": {
377831
- "Retry-After": {
377832
- "description": "Seconds to wait before retrying the identical request.",
377833
- "schema": {
377834
- "type": "integer"
377835
- }
377836
- }
377837
- },
377838
- "content": {
377839
- "application/json": {
377840
- "schema": {
377841
- "$ref": "#/components/schemas/ErrorResponse"
377842
- }
377843
- }
377844
- }
377845
- }
377846
- }
377847
- }
377848
- },
377849
- "/api/v1/snapchat/toggle-account": {
377850
- "post": {
377851
- "operationId": "toggleSnapchatAccount",
377852
- "summary": "Toggle Snapchat ad-account connection",
377853
- "tags": [
377854
- "snapchat"
377855
- ],
377856
- "description": "Updates the connected flag for a Snapchat ad account and its platform connection row.",
377857
- "requestBody": {
377858
- "required": true,
377859
- "content": {
377860
- "application/json": {
377861
- "schema": {
377862
- "additionalProperties": false,
377863
- "type": "object",
377864
- "required": [
377865
- "account_id",
377866
- "connected"
377867
- ],
377868
- "properties": {
377869
- "account_id": {
377870
- "minLength": 1,
377871
- "type": "string"
377872
- },
377873
- "connected": {
377874
- "type": "boolean"
377875
- }
377876
- }
377877
- }
377878
- }
377879
- }
377880
- },
377881
- "security": [
377882
- {
377883
- "bearerAuth": []
377884
- },
377885
- {
377886
- "apiKeyAuth": []
377887
- }
377888
- ],
377889
- "responses": {
377890
- "200": {
377891
- "description": "Successful response",
377892
- "content": {
377893
- "application/json": {
377894
- "schema": {
377895
- "additionalProperties": false,
377896
- "type": "object",
377897
- "required": [
377898
- "success"
377899
- ],
377900
- "properties": {
377901
- "success": {
377902
- "type": "boolean"
377903
- }
377904
- }
377905
- }
377906
- }
377907
- }
377908
- },
377909
- "401": {
377910
- "description": "Unauthorized - missing or invalid bearer token",
379894
+ "description": "TOKEN_NOT_YOURS, or the API-key permission refusal.",
379895
+ "content": {
379896
+ "application/json": {
379897
+ "schema": {
379898
+ "additionalProperties": false,
379899
+ "description": "TOKEN_NOT_YOURS, or the API-key permission refusal.",
379900
+ "type": "object",
379901
+ "required": [
379902
+ "error"
379903
+ ],
379904
+ "properties": {
379905
+ "code": {
379906
+ "type": "string"
379907
+ },
379908
+ "error": {
379909
+ "type": "string"
379910
+ },
379911
+ "message": {
379912
+ "type": "string"
379913
+ },
379914
+ "statusCode": {
379915
+ "type": "integer"
379916
+ }
379917
+ }
379918
+ }
379919
+ }
379920
+ }
379921
+ },
379922
+ "404": {
379923
+ "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
379924
+ "content": {
379925
+ "application/json": {
379926
+ "schema": {
379927
+ "additionalProperties": false,
379928
+ "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
379929
+ "type": "object",
379930
+ "required": [
379931
+ "code",
379932
+ "error"
379933
+ ],
379934
+ "properties": {
379935
+ "code": {
379936
+ "type": "string"
379937
+ },
379938
+ "error": {
379939
+ "type": "string"
379940
+ }
379941
+ }
379942
+ }
379943
+ }
379944
+ }
379945
+ },
379946
+ "409": {
379947
+ "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
379948
+ "content": {
379949
+ "application/json": {
379950
+ "schema": {
379951
+ "additionalProperties": false,
379952
+ "description": "TOKEN_NOT_FOUND (404) or TOKEN_NOT_ACTIVE (409).",
379953
+ "type": "object",
379954
+ "required": [
379955
+ "code",
379956
+ "error"
379957
+ ],
379958
+ "properties": {
379959
+ "code": {
379960
+ "type": "string"
379961
+ },
379962
+ "error": {
379963
+ "type": "string"
379964
+ }
379965
+ }
379966
+ }
379967
+ }
379968
+ }
379969
+ },
379970
+ "429": {
379971
+ "description": "Too many requests - rate limit exceeded. Reachable on every API-key operation: the per-key cap sold with the plan answers `code: API_KEY_RATE_LIMITED` with `retry_after_seconds` and the `Retry-After` header. The global per-IP limiter can answer here too, with the same status and only `statusCode`, `error` and `message`.",
379972
+ "content": {
379973
+ "application/json": {
379974
+ "schema": {
379975
+ "$ref": "#/components/schemas/RateLimitedResponse"
379976
+ }
379977
+ }
379978
+ }
379979
+ },
379980
+ "500": {
379981
+ "description": "Internal server error",
379982
+ "content": {
379983
+ "application/json": {
379984
+ "schema": {
379985
+ "additionalProperties": true,
379986
+ "type": "object",
379987
+ "required": [
379988
+ "error"
379989
+ ],
379990
+ "properties": {
379991
+ "error": {
379992
+ "type": "string"
379993
+ },
379994
+ "statusCode": {
379995
+ "type": "integer"
379996
+ },
379997
+ "message": {
379998
+ "type": "string"
379999
+ }
380000
+ }
380001
+ }
380002
+ }
380003
+ }
380004
+ },
380005
+ "503": {
380006
+ "description": "Session revocation check unavailable (Redis): retry after the Retry-After header.",
380007
+ "headers": {
380008
+ "Retry-After": {
380009
+ "description": "Seconds to wait before retrying the identical request.",
380010
+ "schema": {
380011
+ "type": "integer"
380012
+ }
380013
+ }
380014
+ },
380015
+ "content": {
380016
+ "application/json": {
380017
+ "schema": {
380018
+ "$ref": "#/components/schemas/ErrorResponse"
380019
+ }
380020
+ }
380021
+ }
380022
+ }
380023
+ }
380024
+ }
380025
+ },
380026
+ "/api/v1/snapchat/toggle-account": {
380027
+ "post": {
380028
+ "operationId": "toggleSnapchatAccount",
380029
+ "summary": "Toggle Snapchat ad-account connection",
380030
+ "tags": [
380031
+ "snapchat"
380032
+ ],
380033
+ "description": "Updates the connected flag for the caller's live Snapchat ad account row and its platform connection row. 404 when the caller has no live row of that account (never connected, or revoked with the Snapchat disconnect).",
380034
+ "requestBody": {
380035
+ "required": true,
380036
+ "content": {
380037
+ "application/json": {
380038
+ "schema": {
380039
+ "additionalProperties": false,
380040
+ "type": "object",
380041
+ "required": [
380042
+ "account_id",
380043
+ "connected"
380044
+ ],
380045
+ "properties": {
380046
+ "account_id": {
380047
+ "minLength": 1,
380048
+ "type": "string"
380049
+ },
380050
+ "connected": {
380051
+ "type": "boolean"
380052
+ }
380053
+ }
380054
+ }
380055
+ }
380056
+ }
380057
+ },
380058
+ "security": [
380059
+ {
380060
+ "bearerAuth": []
380061
+ },
380062
+ {
380063
+ "apiKeyAuth": []
380064
+ }
380065
+ ],
380066
+ "responses": {
380067
+ "200": {
380068
+ "description": "Successful response",
380069
+ "content": {
380070
+ "application/json": {
380071
+ "schema": {
380072
+ "additionalProperties": false,
380073
+ "type": "object",
380074
+ "required": [
380075
+ "success"
380076
+ ],
380077
+ "properties": {
380078
+ "success": {
380079
+ "type": "boolean"
380080
+ }
380081
+ }
380082
+ }
380083
+ }
380084
+ }
380085
+ },
380086
+ "401": {
380087
+ "description": "Unauthorized - missing or invalid bearer token",
380088
+ "content": {
380089
+ "application/json": {
380090
+ "schema": {
380091
+ "additionalProperties": true,
380092
+ "type": "object",
380093
+ "required": [
380094
+ "error"
380095
+ ],
380096
+ "properties": {
380097
+ "error": {
380098
+ "type": "string"
380099
+ },
380100
+ "statusCode": {
380101
+ "type": "integer"
380102
+ },
380103
+ "message": {
380104
+ "type": "string"
380105
+ },
380106
+ "request_id": {
380107
+ "type": "string",
380108
+ "description": "Fastify request id, propagated for support correlation."
380109
+ }
380110
+ }
380111
+ }
380112
+ }
380113
+ }
380114
+ },
380115
+ "403": {
380116
+ "description": "Forbidden - caller lacks the required role/permission",
377911
380117
  "content": {
377912
380118
  "application/json": {
377913
380119
  "schema": {
@@ -377925,18 +380131,14 @@
377925
380131
  },
377926
380132
  "message": {
377927
380133
  "type": "string"
377928
- },
377929
- "request_id": {
377930
- "type": "string",
377931
- "description": "Fastify request id, propagated for support correlation."
377932
380134
  }
377933
380135
  }
377934
380136
  }
377935
380137
  }
377936
380138
  }
377937
380139
  },
377938
- "403": {
377939
- "description": "Forbidden - caller lacks the required role/permission",
380140
+ "404": {
380141
+ "description": "Resource not found",
377940
380142
  "content": {
377941
380143
  "application/json": {
377942
380144
  "schema": {
@@ -401568,23 +403770,70 @@
401568
403770
  "content": {
401569
403771
  "application/json": {
401570
403772
  "schema": {
401571
- "type": "object",
401572
- "required": [
401573
- "statusCode",
401574
- "error",
401575
- "message"
401576
- ],
401577
- "properties": {
401578
- "statusCode": {
401579
- "type": "number"
401580
- },
401581
- "error": {
401582
- "type": "string"
403773
+ "anyOf": [
403774
+ {
403775
+ "additionalProperties": false,
403776
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
403777
+ "type": "object",
403778
+ "required": [
403779
+ "error"
403780
+ ],
403781
+ "properties": {
403782
+ "statusCode": {
403783
+ "type": "number"
403784
+ },
403785
+ "error": {
403786
+ "type": "string"
403787
+ },
403788
+ "message": {
403789
+ "type": "string"
403790
+ },
403791
+ "code": {
403792
+ "type": "string"
403793
+ },
403794
+ "family": {
403795
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
403796
+ "type": "string"
403797
+ },
403798
+ "act": {
403799
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
403800
+ "anyOf": [
403801
+ {
403802
+ "type": "string",
403803
+ "enum": [
403804
+ "connect"
403805
+ ]
403806
+ },
403807
+ {
403808
+ "type": "string",
403809
+ "enum": [
403810
+ "disconnect"
403811
+ ]
403812
+ }
403813
+ ]
403814
+ }
403815
+ }
401583
403816
  },
401584
- "message": {
401585
- "type": "string"
403817
+ {
403818
+ "type": "object",
403819
+ "required": [
403820
+ "statusCode",
403821
+ "error",
403822
+ "message"
403823
+ ],
403824
+ "properties": {
403825
+ "statusCode": {
403826
+ "type": "number"
403827
+ },
403828
+ "error": {
403829
+ "type": "string"
403830
+ },
403831
+ "message": {
403832
+ "type": "string"
403833
+ }
403834
+ }
401586
403835
  }
401587
- }
403836
+ ]
401588
403837
  }
401589
403838
  }
401590
403839
  }
@@ -403321,42 +405570,89 @@
403321
405570
  }
403322
405571
  }
403323
405572
  },
403324
- "401": {
403325
- "description": "Unauthorized - missing or invalid bearer token",
403326
- "content": {
403327
- "application/json": {
403328
- "schema": {
403329
- "$ref": "#/components/schemas/ErrorResponse"
403330
- }
403331
- }
403332
- }
403333
- },
403334
- "403": {
403335
- "description": "Forbidden - caller lacks the required role/permission",
403336
- "content": {
403337
- "application/json": {
403338
- "schema": {
403339
- "type": "object",
403340
- "required": [
403341
- "statusCode",
403342
- "error",
403343
- "message"
403344
- ],
403345
- "properties": {
403346
- "statusCode": {
403347
- "type": "number"
403348
- },
403349
- "error": {
403350
- "type": "string"
403351
- },
403352
- "message": {
403353
- "type": "string"
403354
- }
403355
- }
403356
- }
403357
- }
403358
- }
403359
- },
405573
+ "401": {
405574
+ "description": "Unauthorized - missing or invalid bearer token",
405575
+ "content": {
405576
+ "application/json": {
405577
+ "schema": {
405578
+ "$ref": "#/components/schemas/ErrorResponse"
405579
+ }
405580
+ }
405581
+ }
405582
+ },
405583
+ "403": {
405584
+ "description": "Forbidden - caller lacks the required role/permission",
405585
+ "content": {
405586
+ "application/json": {
405587
+ "schema": {
405588
+ "anyOf": [
405589
+ {
405590
+ "additionalProperties": false,
405591
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
405592
+ "type": "object",
405593
+ "required": [
405594
+ "error"
405595
+ ],
405596
+ "properties": {
405597
+ "statusCode": {
405598
+ "type": "number"
405599
+ },
405600
+ "error": {
405601
+ "type": "string"
405602
+ },
405603
+ "message": {
405604
+ "type": "string"
405605
+ },
405606
+ "code": {
405607
+ "type": "string"
405608
+ },
405609
+ "family": {
405610
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
405611
+ "type": "string"
405612
+ },
405613
+ "act": {
405614
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
405615
+ "anyOf": [
405616
+ {
405617
+ "type": "string",
405618
+ "enum": [
405619
+ "connect"
405620
+ ]
405621
+ },
405622
+ {
405623
+ "type": "string",
405624
+ "enum": [
405625
+ "disconnect"
405626
+ ]
405627
+ }
405628
+ ]
405629
+ }
405630
+ }
405631
+ },
405632
+ {
405633
+ "type": "object",
405634
+ "required": [
405635
+ "statusCode",
405636
+ "error",
405637
+ "message"
405638
+ ],
405639
+ "properties": {
405640
+ "statusCode": {
405641
+ "type": "number"
405642
+ },
405643
+ "error": {
405644
+ "type": "string"
405645
+ },
405646
+ "message": {
405647
+ "type": "string"
405648
+ }
405649
+ }
405650
+ }
405651
+ ]
405652
+ }
405653
+ }
405654
+ }
405655
+ },
403360
405656
  "409": {
403361
405657
  "description": "The domain is already tracked (code DOMAIN_ALREADY_ASSIGNED). The body says where, never with a workspace id.",
403362
405658
  "content": {
@@ -403911,23 +406207,70 @@
403911
406207
  "content": {
403912
406208
  "application/json": {
403913
406209
  "schema": {
403914
- "type": "object",
403915
- "required": [
403916
- "statusCode",
403917
- "error",
403918
- "message"
403919
- ],
403920
- "properties": {
403921
- "statusCode": {
403922
- "type": "number"
403923
- },
403924
- "error": {
403925
- "type": "string"
406210
+ "anyOf": [
406211
+ {
406212
+ "additionalProperties": false,
406213
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
406214
+ "type": "object",
406215
+ "required": [
406216
+ "error"
406217
+ ],
406218
+ "properties": {
406219
+ "statusCode": {
406220
+ "type": "number"
406221
+ },
406222
+ "error": {
406223
+ "type": "string"
406224
+ },
406225
+ "message": {
406226
+ "type": "string"
406227
+ },
406228
+ "code": {
406229
+ "type": "string"
406230
+ },
406231
+ "family": {
406232
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
406233
+ "type": "string"
406234
+ },
406235
+ "act": {
406236
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
406237
+ "anyOf": [
406238
+ {
406239
+ "type": "string",
406240
+ "enum": [
406241
+ "connect"
406242
+ ]
406243
+ },
406244
+ {
406245
+ "type": "string",
406246
+ "enum": [
406247
+ "disconnect"
406248
+ ]
406249
+ }
406250
+ ]
406251
+ }
406252
+ }
403926
406253
  },
403927
- "message": {
403928
- "type": "string"
406254
+ {
406255
+ "type": "object",
406256
+ "required": [
406257
+ "statusCode",
406258
+ "error",
406259
+ "message"
406260
+ ],
406261
+ "properties": {
406262
+ "statusCode": {
406263
+ "type": "number"
406264
+ },
406265
+ "error": {
406266
+ "type": "string"
406267
+ },
406268
+ "message": {
406269
+ "type": "string"
406270
+ }
406271
+ }
403929
406272
  }
403930
- }
406273
+ ]
403931
406274
  }
403932
406275
  }
403933
406276
  }
@@ -404022,7 +406365,7 @@
404022
406365
  "tags": [
404023
406366
  "traffic-filter"
404024
406367
  ],
404025
- "description": "Moves a live domain that sits in another workspace of the same organization into the request team, keeping its id, verification token, ownership proof, status and certificate. Needs, in the workspace it leaves, the role that may delete a domain there (manager or higher, raised by the backoffice lever asset_permission_floors), and mediabuyer or higher here; the body never names the source. Refused with 409 DOMAIN_MOVE_BLOCKED, listing every blocker, while live campaigns of the source use it, it hosts an SEO site, it runs on a Cloudflare zone or custom hostname, or the two workspaces resolve a different server IP for an A-record domain. Archived campaigns of the source stay there with their history and lose the domain. From a DELETED workspace of the organization (owner or admin of the organization): its campaigns lose the domain and its hosted SEO site goes offline instead of blocking, the workspace if restored comes back without the domain, and the move needs confirm_source_deleted: true, otherwise 409 DOMAIN_SOURCE_DELETED_NEEDS_CONFIRM says what would be lost and nothing changes. Already here answers 200 unchanged. Session only, no API key. 503 FEATURE_DISABLED while domain_move_enabled is off for the caller.",
406368
+ "description": "Moves a live domain that sits in another workspace of the same organization into the request team, keeping its id, verification token, ownership proof, status and certificate. Needs, in the workspace it leaves, the role that may delete a domain there (manager or higher, raised by the backoffice lever asset_permission_floors), and here the floor of connecting a domain (mediabuyer or higher, raised by the same lever); the body never names the source. Refused with 409 DOMAIN_MOVE_BLOCKED, listing every blocker, while live campaigns of the source use it, it hosts an SEO site, it runs on a Cloudflare zone or custom hostname, or the two workspaces resolve a different server IP for an A-record domain. Archived campaigns of the source stay there with their history and lose the domain. From a DELETED workspace of the organization (owner or admin of the organization): its campaigns lose the domain and its hosted SEO site goes offline instead of blocking, the workspace if restored comes back without the domain, and the move needs confirm_source_deleted: true, otherwise 409 DOMAIN_SOURCE_DELETED_NEEDS_CONFIRM says what would be lost and nothing changes. Already here answers 200 unchanged. Session only, no API key. 503 FEATURE_DISABLED while domain_move_enabled is off for the caller.",
404026
406369
  "requestBody": {
404027
406370
  "required": true,
404028
406371
  "content": {
@@ -404186,7 +406529,7 @@
404186
406529
  "anyOf": [
404187
406530
  {
404188
406531
  "additionalProperties": false,
404189
- "description": "The move is refused (code DOMAIN_MOVE_FORBIDDEN): the domain is not in a workspace of the same organization, or the caller is below the floor of deleting a domain in the workspace that holds it (manager or higher, raised by the backoffice lever asset_permission_floors; owner or admin of the organization when that workspace is deleted), or not mediabuyer or higher here. The body never names the workspace nor gives its id.",
406532
+ "description": "The move is refused (code DOMAIN_MOVE_FORBIDDEN): the domain is not in a workspace of the same organization, or the caller is below the floor of deleting a domain in the workspace that holds it (manager or higher, raised by the backoffice lever asset_permission_floors; owner or admin of the organization when that workspace is deleted), or below the floor of connecting a domain here (mediabuyer or higher, raised by the same lever). The body never names the workspace nor gives its id.",
404190
406533
  "type": "object",
404191
406534
  "required": [
404192
406535
  "statusCode",
@@ -405589,23 +407932,70 @@
405589
407932
  "content": {
405590
407933
  "application/json": {
405591
407934
  "schema": {
405592
- "type": "object",
405593
- "required": [
405594
- "statusCode",
405595
- "error",
405596
- "message"
405597
- ],
405598
- "properties": {
405599
- "statusCode": {
405600
- "type": "number"
405601
- },
405602
- "error": {
405603
- "type": "string"
407935
+ "anyOf": [
407936
+ {
407937
+ "additionalProperties": false,
407938
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
407939
+ "type": "object",
407940
+ "required": [
407941
+ "error"
407942
+ ],
407943
+ "properties": {
407944
+ "statusCode": {
407945
+ "type": "number"
407946
+ },
407947
+ "error": {
407948
+ "type": "string"
407949
+ },
407950
+ "message": {
407951
+ "type": "string"
407952
+ },
407953
+ "code": {
407954
+ "type": "string"
407955
+ },
407956
+ "family": {
407957
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
407958
+ "type": "string"
407959
+ },
407960
+ "act": {
407961
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
407962
+ "anyOf": [
407963
+ {
407964
+ "type": "string",
407965
+ "enum": [
407966
+ "connect"
407967
+ ]
407968
+ },
407969
+ {
407970
+ "type": "string",
407971
+ "enum": [
407972
+ "disconnect"
407973
+ ]
407974
+ }
407975
+ ]
407976
+ }
407977
+ }
405604
407978
  },
405605
- "message": {
405606
- "type": "string"
407979
+ {
407980
+ "type": "object",
407981
+ "required": [
407982
+ "statusCode",
407983
+ "error",
407984
+ "message"
407985
+ ],
407986
+ "properties": {
407987
+ "statusCode": {
407988
+ "type": "number"
407989
+ },
407990
+ "error": {
407991
+ "type": "string"
407992
+ },
407993
+ "message": {
407994
+ "type": "string"
407995
+ }
407996
+ }
405607
407997
  }
405608
- }
407998
+ ]
405609
407999
  }
405610
408000
  }
405611
408001
  }
@@ -405872,23 +408262,70 @@
405872
408262
  "content": {
405873
408263
  "application/json": {
405874
408264
  "schema": {
405875
- "type": "object",
405876
- "required": [
405877
- "statusCode",
405878
- "error",
405879
- "message"
405880
- ],
405881
- "properties": {
405882
- "statusCode": {
405883
- "type": "number"
405884
- },
405885
- "error": {
405886
- "type": "string"
408265
+ "anyOf": [
408266
+ {
408267
+ "additionalProperties": false,
408268
+ "description": "Forbidden. With `code: ASSET_ROLE_FLOOR`: the caller's role in the workspace is below the floor for connecting this kind of asset here (`act: connect`) or for removing it from here (`act: disconnect`): the code floor, raised by the backoffice lever \"asset_permission_floors\".",
408269
+ "type": "object",
408270
+ "required": [
408271
+ "error"
408272
+ ],
408273
+ "properties": {
408274
+ "statusCode": {
408275
+ "type": "number"
408276
+ },
408277
+ "error": {
408278
+ "type": "string"
408279
+ },
408280
+ "message": {
408281
+ "type": "string"
408282
+ },
408283
+ "code": {
408284
+ "type": "string"
408285
+ },
408286
+ "family": {
408287
+ "description": "With ASSET_ROLE_FLOOR: the asset family of the refused act.",
408288
+ "type": "string"
408289
+ },
408290
+ "act": {
408291
+ "description": "With ASSET_ROLE_FLOOR: connecting here, or removing from here.",
408292
+ "anyOf": [
408293
+ {
408294
+ "type": "string",
408295
+ "enum": [
408296
+ "connect"
408297
+ ]
408298
+ },
408299
+ {
408300
+ "type": "string",
408301
+ "enum": [
408302
+ "disconnect"
408303
+ ]
408304
+ }
408305
+ ]
408306
+ }
408307
+ }
405887
408308
  },
405888
- "message": {
405889
- "type": "string"
408309
+ {
408310
+ "type": "object",
408311
+ "required": [
408312
+ "statusCode",
408313
+ "error",
408314
+ "message"
408315
+ ],
408316
+ "properties": {
408317
+ "statusCode": {
408318
+ "type": "number"
408319
+ },
408320
+ "error": {
408321
+ "type": "string"
408322
+ },
408323
+ "message": {
408324
+ "type": "string"
408325
+ }
408326
+ }
405890
408327
  }
405891
- }
408328
+ ]
405892
408329
  }
405893
408330
  }
405894
408331
  }
@@ -485621,13 +488058,21 @@
485621
488058
  "permissions_context": {
485622
488059
  "type": "object",
485623
488060
  "required": [
488061
+ "api_key_roles",
485624
488062
  "asset_capabilities",
485625
488063
  "role"
485626
488064
  ],
485627
488065
  "properties": {
488066
+ "api_key_roles": {
488067
+ "description": "The roles that open the API keys page and its routes (list, create, edit and delete one's own keys): platform staff plus the workspace roles of the backoffice lever `api_key_creator_roles`, every role by default. The same list the routes decide with, with the rule of `requireRole` (the global role first, then the role in the workspace).",
488068
+ "type": "array",
488069
+ "items": {
488070
+ "type": "string"
488071
+ }
488072
+ },
485628
488073
  "asset_capabilities": {
485629
488074
  "additionalProperties": false,
485630
- "description": "Per asset family, what the caller may do in this workspace: connect (`connect`), bring here from another workspace (`move_here`), take out of here and move away (`disconnect`: for ad accounts also deleting their own credential with its rows; for domains deleting one), and change pixels (`pixel.write`: switch on, link to ad accounts, share on Meta). The code floors raised by the backoffice lever `asset_permission_floors`. The routes enforce the same floors (403 ASSET_ROLE_FLOOR).",
488075
+ "description": "Per asset family, what the caller may do in this workspace: connect (`connect`), bring here from another workspace (`move_here`), take out of here and move away (`disconnect`: for ad accounts also deleting their own credential with its rows; for domains deleting one; for domains `connect` is creating, importing, registering or claiming one), and change pixels (`pixel.write`: switch on, link to ad accounts, share on Meta). The code floors raised by the backoffice lever `asset_permission_floors`. The routes enforce the same floors (403 ASSET_ROLE_FLOOR).",
485631
488076
  "type": "object",
485632
488077
  "required": [
485633
488078
  "ad_account",
@@ -485678,9 +488123,13 @@
485678
488123
  "additionalProperties": false,
485679
488124
  "type": "object",
485680
488125
  "required": [
488126
+ "connect",
485681
488127
  "disconnect"
485682
488128
  ],
485683
488129
  "properties": {
488130
+ "connect": {
488131
+ "type": "boolean"
488132
+ },
485684
488133
  "disconnect": {
485685
488134
  "type": "boolean"
485686
488135
  }
@@ -497367,13 +499816,23 @@
497367
499816
  ],
497368
499817
  "properties": {
497369
499818
  "statusCode": {
497370
- "type": "number"
499819
+ "type": "integer"
497371
499820
  },
497372
499821
  "error": {
497373
499822
  "type": "string"
497374
499823
  },
497375
499824
  "message": {
497376
499825
  "type": "string"
499826
+ },
499827
+ "code": {
499828
+ "type": "string"
499829
+ },
499830
+ "request_id": {
499831
+ "type": "string"
499832
+ },
499833
+ "details": {
499834
+ "type": "object",
499835
+ "additionalProperties": {}
497377
499836
  }
497378
499837
  }
497379
499838
  }
@@ -498031,7 +500490,7 @@
498031
500490
  "tags": [
498032
500491
  "meta"
498033
500492
  ],
498034
- "description": "Remove users connection from the database and refreshes Meta Business token status. A `sheet_id` other than the caller's is honoured for super_admin, and for an owner only when that person is a member of the active workspace of the request and the owner is owner in every workspace that person works in; otherwise the caller's own connections are the target.",
500493
+ "description": "Remove users connection from the database and refreshes Meta Business token status. A `sheet_id` other than the caller's is honoured for super_admin, and for an owner only when that person is a member of the active workspace of the request and the owner is owner in every workspace that person works in; otherwise the caller's own connections are the target. The connections are removed by profile name in EVERY workspace of that person, not only in the active one: a Meta profile used in several workspaces (the same connection shared, or connected in each) leaves all of them. To take a profile out of one workspace only, deactivate its row there (POST /api/v1/meta/users/deactivate).",
498035
500494
  "requestBody": {
498036
500495
  "required": true,
498037
500496
  "content": {