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

# Create spiideo integration

> CreateSpiideoIntegration

 Creates new integration.



## OpenAPI

````yaml post /integration/spiideo/v1/integrations
openapi: 3.0.3
info:
  title: Studio API - Motto
  version: 0.0.0
servers:
  - url: https://api.mottostreaming.com
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: AccountService
    description: Account management service
  - name: ActionConfigurationService
    description: Action configuration service definition
  - name: ActionSecretService
    description: Action type service definition
  - name: ActionService
    description: Action service definition
  - name: ActionTypeService
    description: Action type service definition
  - name: ActivityService
    description: Activity service definition
  - name: AdService
    description: Ad management service.
  - name: AnnotationService
    description: Annotation service definition
  - name: AnnotationSetService
    description: Annotation service definition
  - name: AnnotationTypeService
    description: Annotation service definition
  - name: AssetService
    description: Asset management service.
  - name: AuthService
    description: Auth service definition
  - name: BannerService
    description: Banner service definition
  - name: BannerV2Service_v2
    description: Banner service definition
  - name: CleengService
    description: CleengService service definition
  - name: ClipService
    description: ClipService is the service that handles Clip operations.
  - name: ConfigurationService
    description: >-
      Configuration management service. These configurations allow modifying the
      behavior of streams, uploads, simulcasts, etc.
  - name: ContentTypeService
    description: ContentType service definition
  - name: CreativeWorkService
    description: CreativeWork service definition
  - name: EntitlementService
    description: Entitlement service definition
  - name: EntityService
    description: Entity service definition
  - name: EventService
    description: Event service definition
  - name: FileService
    description: OTT files management.
  - name: IngestService
    description: Ingest management service.
  - name: IngestService_v2
    description: Ingest management service.
  - name: LiveStreamService
    description: LiveStream management service.
  - name: LiveStreamService_v2
    description: LiveStream management service.
  - name: OfferService
    description: Offer service definition
  - name: OrganizationService
    description: Organization management service.
  - name: PageService
    description: Page service definition
  - name: PlatformService
    description: Platform service definition
  - name: PlaylistService
    description: Playlist management service.
  - name: ProjectService
    description: Project management service.
  - name: SimulcastService
    description: Simulcast management service.
  - name: SlugService
    description: Slug service definition
  - name: SpiideoService
    description: SpiideoService service definition
  - name: StandingService
    description: Standing service definition
  - name: StitcherService
    description: StitcherService is the service that handles stitching operations.
  - name: StripeService
    description: StripeService service definition
  - name: SubscriptionService
    description: Subscription service definition
  - name: SubtitleService
    description: SubtitleService is the service that handles Subtitle operations.
  - name: TransactionService
    description: Transaction service definition
  - name: UploadService
    description: Upload management service.
  - name: UsageService
    description: The UsageService provides methods to retrieve usage data for SKUs.
  - name: UserService
    description: User management service
  - name: VODService
    description: VODService is the service that handles VOD operations.
  - name: VODService_v2
    description: VODService is the service that handles VOD operations.
  - name: VideoProtectionService
    description: VideoProtection management service.
  - name: VideoProtectionService_v2
    description: VideoProtection management service.
  - name: VideoService
    description: Video management service.
paths:
  /integration/spiideo/v1/integrations:
    post:
      tags:
        - SpiideoService
      description: |-
        CreateSpiideoIntegration

         Creates new integration.
      operationId: SpiideoService_CreateSpiideoIntegration
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/motto.integration.spiideo.v1.SpiideoIntegration
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/motto.integration.spiideo.v1.CreateSpiideoIntegrationResponse
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
components:
  schemas:
    motto.integration.spiideo.v1.SpiideoIntegration:
      required:
        - project_id
        - account_id
        - user_id
        - client_id
        - client_secret
      type: object
      properties:
        project_id:
          type: string
          description: The Motto project to which this integration belongs
        account_id:
          type: string
          description: The Spiideo account ID.
        user_id:
          type: string
          description: The Spiideo user ID.
        client_id:
          type: string
          description: The Spiideo client ID.
        client_secret:
          type: string
          description: The Spiideo client secret.
        default_minutes_before_start:
          type: string
          description: >-
            The default number of minutes before the start of a game to turn on
            the camera. If not set, a default value will be used.
        default_duration_minutes:
          type: string
          description: >-
            The default duration in minutes for which the camera should be on.
            If not set, a default value will be used.
        default_spiideo_sport:
          type: string
          description: >-
            The default Spiideo sport to use when creating games. This should
            match the enum values in Spiideo, e.g. "football", "basketball",
            etc.
             This is used when the sport cannot be determined from the event type (via the event type mapping).
        sync_teams:
          type: boolean
          description: >-
            Whether to create teams in Spiideo based on Motto teams if they do
            not exist, or update them if they do.
             If false, you must manually provide the mapping between Motto teams and Spiideo teams, and keep it up to date. In this case,
             when trying to create a Spiideo game and there is no mapping for a team, the operation will fail.
             Defaults to false.
        locale:
          type: string
          description: >-
            The locale you would like to use for the objects being created in
            Spiideo. You must make sure this locale is also
             supported within your existing Motto project (on events, teams and players). If it does not, it will fallback to
             non-localized values.

             The format should be the language code, e.g. "en", "de", "fr", etc, optionally followed by a region code, e.g. "en-US", "en-GB", etc.
        enabled:
          type: boolean
          description: >-
            Whether the integration is enabled. If false, no Spiideo-related
            operations will be performed. You can still
             create entity mappings and update event type mappings, but they will not be used until the integration is enabled.
        share_with_account_ids:
          type: array
          items:
            type: string
          description: >-
            When a game is created, it can be shared with other accounts in
            Spiideo automatically.
             This field contains the list of account IDs
             with which the game should be shared.
        stream_unlisted_events:
          type: boolean
          description: >-
            Whether to stream unlisted events in Spiideo. If false, unlisted
            events will be not be connected to Spiideo, and
             events that were previously published will be deleted from Spiideo once they become unlisted.
             Defaults to false.
        schedule_ahead_days:
          type: string
          description: >-
            The number of days to look forwards in time to schedule games in
            Spiideo.
             For example, if this is set to 7, the integration will only schedule Motto events in Spiideo that are happening within the next 7 days.
             If it's further out, the integration will not schedule them until they are within the next 7 days.
             If not set, a reasonable default amount of days will be used.
      description: SpiideoIntegration
    motto.integration.spiideo.v1.CreateSpiideoIntegrationResponse:
      type: object
      properties:
        integration:
          $ref: '#/components/schemas/motto.integration.spiideo.v1.SpiideoIntegration'
    google.rpc.Status:
      type: object
      properties:
        code:
          type: integer
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/google.protobuf.Any'
          description: >-
            A list of messages that carry the error details.  There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs. It
        is used by [gRPC](https://github.com/grpc). Each `Status` message
        contains three pieces of data: error code, error message, and error
        details. You can find out more about this error model and how to work
        with it in the [API Design
        Guide](https://cloud.google.com/apis/design/errors).
    google.protobuf.Any:
      type: object
      properties:
        '@type':
          type: string
          description: The type of the serialized message.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````