> ## 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 event type mapping

> Creates a new event type mapping.



## OpenAPI

````yaml post /integration/spiideo/v1/event_type_mappings
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/event_type_mappings:
    post:
      tags:
        - SpiideoService
      description: Creates a new event type mapping.
      operationId: SpiideoService_CreateSpiideoEventTypeMapping
      parameters:
        - name: project_id
          in: query
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/motto.integration.spiideo.v1.SpiideoEventTypeMapping
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/motto.integration.spiideo.v1.CreateSpiideoEventTypeMappingResponse
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/google.rpc.Status'
components:
  schemas:
    motto.integration.spiideo.v1.SpiideoEventTypeMapping:
      required:
        - motto_event_type
        - home_team_field
        - away_team_field
        - scene_field
        - home_color_field
        - away_color_field
        - description_field
      type: object
      properties:
        motto_event_type:
          type: string
          description: The Motto event type this mapping applies to.
        home_team_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the home team.
             This has to be an entity reference.
             E.g. `fields.home_team`
        away_team_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the away team.
             This has to be an entity reference.
             E.g. `fields.away_team`
        scene_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the scene/venue.
             This has to be an entity reference.
             E.g. `fields.stadium` or `fields.venue`
        sport_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the sport.
             This has to be an entity reference OR if it matches exactly the Spiideo sport enum values, a string field,
             E.g. `fields.sport` (which may be an entity reference)
             E.g. `fields.sport_type` (which may be resolve to a string field with values like "football", "basketball", etc.)
             E.g. `football` (a hard-coded string field, instead of a resolvable field keypath).

             If not set, there are two alternative ways to indicate which sport should be used when an event of this type is created:
             1. The Spiideo sport configured on the TeamTypeMapping. This means the sport will be taken from the home team on the event.
             2. The Spiideo sport configured on the SpiideoIntegration. This is a last resort, if no other sport can be determined.
        home_color_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the home team color.
             This has to be a string field that contains a color value, e.g. "#FF0000" for red.
            E.g. `fields.home_color`
        away_color_field:
          type: string
          description: |-
            Field name on the Motto event type that maps to the away team color.
             This has to be a string field that contains a color value, e.g. "#0000FF" for blue.
             E.g. `fields.away_color`
        description_field:
          type: string
          description: >-
            Field name on the Motto event that maps to the Spiideo game
            description, which shows above the scoreboard in the Spiideo
            streams.
             This must be an entity reference OR a string field.
             E.g. `fields.competition` (in which case the name of the referenced competition will be the description)
             E.g. `description` or `fields.some_custom_description` (in which case the value of the field will be the description)
        spiideo_graphic_package_id:
          type: string
          description: >-
            The Spiideo graphic package ID to use for any Spiideo game object
            created for this event type.
             Required, unless using the production recipe ID.
        spiideo_storyboard_id:
          type: string
          description: >-
            The Spiideo storyboard ID to use for any Spiideo game object created
            for this event type.
             Required, unless using the production recipe ID.
        spiideo_production_recipe_id:
          type: string
          description: >-
            The Spiideo production recipe ID to use for any Spiideo game object
            created for this event type.
             Required, unless using the graphic package ID and storyboard ID.
      description: >-
        SpiideoEventTypeMapping maps a Motto event type to Spiideo event
        properties.
    motto.integration.spiideo.v1.CreateSpiideoEventTypeMappingResponse:
      type: object
      properties:
        event_type_mapping:
          $ref: >-
            #/components/schemas/motto.integration.spiideo.v1.SpiideoEventTypeMapping
    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

````