> ## Documentation Index
> Fetch the complete documentation index at: https://docs.semicola.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set an owned advertiser managed or self-serve



## OpenAPI

````yaml /openapi/buyer.yaml patch /api/v2/organization/advertisers/{advertiserId}/operating-mode
openapi: 3.1.0
info:
  title: Semicola Exchange buyer API
  version: 2.0.0
  description: >-
    Buyer endpoints: advertisers, storefronts and connections, product
    discovery, campaigns, proposals, media buys, creatives and reporting. Every
    write accepts an Idempotency-Key header.
servers:
  - url: https://api.semicola.com
security:
  - bearerAuth: []
  - sessionCookie: []
tags:
  - name: Advertisers
  - name: Storefronts
  - name: Product Discovery
  - name: Campaigns
  - name: Media Buys
  - name: Creatives
  - name: Catalogs
  - name: Reporting
  - name: Event Sources
  - name: Webhooks
  - name: Tasks
  - name: Audit Logs
  - name: Activity
paths:
  /api/v2/organization/advertisers/{advertiserId}/operating-mode:
    patch:
      tags:
        - Advertisers
      summary: Set an owned advertiser managed or self-serve
      operationId: patchOrganizationAdvertisersByAdvertiserIdOperatingMode
      parameters:
        - name: advertiserId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                operatingMode:
                  type: string
                  enum:
                    - managed
                    - self_serve
              required:
                - operatingMode
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    anyOf:
                      - type: object
                        properties:
                          lifecycle:
                            anyOf:
                              - type: object
                                properties:
                                  lifecycleId:
                                    type: string
                                  displayName:
                                    type: string
                                  provisioningMode:
                                    type: string
                                    enum:
                                      - managed
                                      - self_serve
                                  state:
                                    type: string
                                    enum:
                                      - invited
                                      - provisioning
                                      - ready
                                      - failed
                                      - revoked
                                  advertiserId:
                                    type:
                                      - string
                                      - 'null'
                                  targetAccountId:
                                    anyOf:
                                      - type: integer
                                        minimum: -9007199254740991
                                        maximum: 9007199254740991
                                      - type: 'null'
                                  managementCapability:
                                    type: string
                                    enum:
                                      - available
                                      - account_switch_required
                                      - unavailable
                                  joinLink:
                                    type: 'null'
                                  failure:
                                    anyOf:
                                      - type: object
                                        properties:
                                          code:
                                            type: string
                                          recoverable:
                                            type: boolean
                                            const: true
                                        required:
                                          - code
                                          - recoverable
                                        additionalProperties: false
                                      - type: 'null'
                                  createdAt:
                                    type: string
                                  updatedAt:
                                    type: string
                                required:
                                  - lifecycleId
                                  - displayName
                                  - provisioningMode
                                  - state
                                  - advertiserId
                                  - targetAccountId
                                  - managementCapability
                                  - joinLink
                                  - failure
                                  - createdAt
                                  - updatedAt
                                additionalProperties: false
                              - type: 'null'
                          advertiser:
                            anyOf:
                              - type: object
                                properties:
                                  rosterEntryId:
                                    type: string
                                  advertiserId:
                                    type: string
                                  displayName:
                                    type: string
                                  relationshipClass:
                                    type: string
                                    enum:
                                      - owned
                                      - delegated
                                      - counterparty
                                  operatorRelationship:
                                    type: string
                                    enum:
                                      - organization
                                      - client
                                      - external
                                  operatingMode:
                                    type: string
                                    enum:
                                      - managed
                                      - self_serve
                                  sandbox:
                                    type: boolean
                                  system:
                                    type: boolean
                                  binding:
                                    type: object
                                    properties:
                                      provenance:
                                        type: string
                                        enum:
                                          - compatibility_account
                                          - seller_buyer_sponsorship
                                          - advertiser_grant
                                          - advertiser_admission
                                          - adcp_account
                                      state:
                                        type: string
                                        enum:
                                          - resolved
                                          - partial
                                          - conflict
                                      reason:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - backing_account_missing
                                              - backing_account_is_container
                                              - display_name_missing
                                              - self_serve_sponsorship_missing
                                              - sponsorship_parent_mismatch
                                              - sponsorship_storefront_missing
                                              - duplicate_backing_records
                                          - type: 'null'
                                    required:
                                      - provenance
                                      - state
                                      - reason
                                    additionalProperties: false
                                  backing:
                                    oneOf:
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: compatibility_account
                                          accountId:
                                            type: integer
                                            exclusiveMinimum: 0
                                            maximum: 9007199254740991
                                          advertiserId:
                                            type: string
                                        required:
                                          - kind
                                          - accountId
                                          - advertiserId
                                        additionalProperties: false
                                      - type: object
                                        properties:
                                          kind:
                                            type: string
                                            const: authorized_relationship
                                          relationshipRef:
                                            type: string
                                          advertiserId:
                                            type: string
                                        required:
                                          - kind
                                          - relationshipRef
                                          - advertiserId
                                        additionalProperties: false
                                  delegation:
                                    type: 'null'
                                  capabilities:
                                    type: object
                                    properties:
                                      read:
                                        type: boolean
                                        const: true
                                      advertiserManagement:
                                        type: string
                                        enum:
                                          - available
                                          - account_switch_required
                                          - unavailable
                                      campaignManagement:
                                        type: string
                                        enum:
                                          - available
                                          - account_switch_required
                                          - unavailable
                                      relationshipManagement:
                                        type: string
                                        enum:
                                          - available
                                          - account_switch_required
                                          - unavailable
                                    required:
                                      - read
                                      - advertiserManagement
                                      - campaignManagement
                                      - relationshipManagement
                                    additionalProperties: false
                                  readiness:
                                    type: object
                                    properties:
                                      state:
                                        type: string
                                        enum:
                                          - ready
                                          - pending
                                          - suspended
                                          - revoked
                                          - disabled
                                          - incomplete
                                    required:
                                      - state
                                    additionalProperties: false
                                  accountSetupState:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - needs_setup
                                          - waiting_on_buyer
                                          - awaiting_billing
                                      - type: 'null'
                                  accountSetupRelationshipId:
                                    type: string
                                  buysCount:
                                    type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  lastActivityAt:
                                    type:
                                      - string
                                      - 'null'
                                  brandDomain:
                                    type: string
                                required:
                                  - rosterEntryId
                                  - advertiserId
                                  - displayName
                                  - relationshipClass
                                  - operatorRelationship
                                  - operatingMode
                                  - sandbox
                                  - system
                                  - binding
                                  - backing
                                  - delegation
                                  - capabilities
                                  - readiness
                                additionalProperties: false
                              - type: 'null'
                        required:
                          - lifecycle
                          - advertiser
                        additionalProperties: false
                      - type: 'null'
                  error:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          field:
                            type: string
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                      - type: 'null'
                required:
                  - data
                  - error
                additionalProperties: false
        default:
          description: >-
            Error envelope `{data: null, error: {code, message, field?,
            details?}}`.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or OAuth access token.
    sessionCookie:
      type: apiKey
      in: cookie
      name: sc_session

````