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

# Create broadcastEvent resource



## OpenAPI

````yaml https://api.amply-app.com/v1/openapi.json post /v1/broadcasts/{broadcastId}/broadcastClients/{broadcastClientId}/broadcastEvents
openapi: 3.1.0
info:
  title: Amply API
  version: 1.0.0
  description: >-
    Authentication: send your API key in the `X-API-KEY` header.


    Each API key is tied to a single broadcast. A key cannot manage multiple
    broadcasts.


    API keys can be generated from the broadcast developer settings.
servers:
  - url: https://api.amply-app.com
security:
  - ApiKeyAuth: []
tags:
  - name: broadcastEvent resource
    description: API endpoints for managing broadcastEvent resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastEventResponse'
    x-tag-schema-example:
      type: app.opened
      metadata: {}
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastNetworkingForm resource
    description: API endpoints for managing broadcastNetworkingForm resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastNetworkingForm'
    x-tag-schema-example:
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: media resource
    description: API endpoints for managing media resources
    x-tag-schema:
      $ref: '#/components/schemas/media'
    x-tag-schema-example:
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _userId: string
      mediaUrl: string
      external: true
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastContact resource
    description: API endpoints for managing broadcastContact resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastContact'
    x-tag-schema-example:
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastCategory resource
    description: API endpoints for managing broadcastCategory resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastCategory'
    x-tag-schema-example:
      status: draft
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastClient resource
    description: API endpoints for managing broadcastClient resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastClient'
    x-tag-schema-example:
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastDiffuser resource
    description: API endpoints for managing broadcastDiffuser resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastDiffuser'
    x-tag-schema-example:
      type: webSite
      seo:
        title: string
        metaDescription: string
        indexing: true
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastCampaign resource
    description: API endpoints for managing broadcastCampaign resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastCampaign'
    x-tag-schema-example:
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastArticle resource
    description: API endpoints for managing broadcastArticle resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastArticle'
    x-tag-schema-example:
      status: draft
      blocks:
        - type: media
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcast resource
    description: API endpoints for managing broadcast resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcast'
    x-tag-schema-example:
      name: x
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastHost resource
    description: API endpoints for managing broadcastHost resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastHost'
    x-tag-schema-example:
      name: x
      status: draft
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastInterestPoint resource
    description: API endpoints for managing broadcastInterestPoint resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastInterestPoint'
    x-tag-schema-example:
      mapId: 64b7f8b6f23a4a4f3d0a9b12
      status: draft
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastMap resource
    description: API endpoints for managing broadcastMap resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastMap'
    x-tag-schema-example:
      type: image
      status: draft
      metadata: {}
  - name: broadcastMember resource
    description: API endpoints for managing broadcastMember resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastMember'
    x-tag-schema-example:
      email: user@example.com
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastPage resource
    description: API endpoints for managing broadcastPage resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastPage'
    x-tag-schema-example:
      status: draft
      blocks:
        - type: media
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: revision resource
    description: API endpoints for managing revision resources
    x-tag-schema:
      $ref: '#/components/schemas/revision'
    x-tag-schema-example:
      tos:
        accepted: true
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: broadcastSession resource
    description: API endpoints for managing broadcastSession resources
    x-tag-schema:
      $ref: '#/components/schemas/broadcastSession'
    x-tag-schema-example:
      status: draft
      time: {}
      blocks:
        - type: media
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: workflow resource
    description: API endpoints for managing workflow resources
    x-tag-schema:
      $ref: '#/components/schemas/workflow'
    x-tag-schema-example:
      entryNodeId: x
      nodes:
        - id: x
          position:
            - 0
            - 0
          type: amply
          config:
            operation:
              type: string
              value: string
            resource:
              type: string
              value: string
      name: x
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: workflowRun resource
    description: API endpoints for managing workflowRun resources
    x-tag-schema:
      $ref: '#/components/schemas/workflowRun'
    x-tag-schema-example:
      status: running
      durationMs: 0
      invokedNodeCount: 0
      context: {}
      nodeResults:
        - executionId: x
          index: 0
          nodeId: x
          nodeType: amply
          routeTaken: onSuccess
          durationMs: 0
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
  - name: font resource
    description: API endpoints for managing font resources
    x-tag-schema:
      $ref: '#/components/schemas/font'
    x-tag-schema-example:
      fontFamily: string
      weights:
        - weight: 0
          url: https://example.com
      _id: 64b7f8b6f23a4a4f3d0a9b12
      _createdAt: '2024-01-01T00:00:00.000Z'
paths:
  /v1/broadcasts/{broadcastId}/broadcastClients/{broadcastClientId}/broadcastEvents:
    post:
      tags:
        - broadcastEvent resource
      summary: Create broadcastEvent resource
      parameters:
        - name: broadcastId
          in: path
          required: true
          description: Resource identifier.
          schema:
            type: string
            format: objectId
          example: 64b7f8b6f23a4a4f3d0a9b12
        - name: broadcastClientId
          in: path
          required: true
          description: Resource identifier.
          schema:
            type: string
            format: objectId
          example: 64b7f8b6f23a4a4f3d0a9b12
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/broadcastEventCreate'
            example:
              type: app.opened
              metadata: {}
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/broadcastEventResponse'
components:
  schemas:
    broadcastEventCreate:
      allOf:
        - oneOf:
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - app.opened
                  example: app.opened
                payload:
                  nullable: true
              required:
                - type
              title: app.opened
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - client.auth_provider.linked
                  example: client.auth_provider.linked
                payload:
                  oneOf:
                    - type: object
                      properties:
                        authProviderType:
                          type: string
                          enum:
                            - oAuth
                          example: oAuth
                        authProviderKey:
                          nullable: true
                          type: string
                          example: string
                        authorization_code:
                          type: string
                          minLength: 1
                          example: x
                        code_verifier:
                          type: string
                          minLength: 1
                          example: x
                        redirect_uri:
                          type: string
                          minLength: 1
                          example: x
                        authorization_details:
                          nullable: true
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                minLength: 1
                                example: x
                              locations:
                                nullable: true
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  example: x
                              actions:
                                nullable: true
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  example: x
                              datatypes:
                                nullable: true
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  example: x
                              identifier:
                                nullable: true
                                type: string
                                minLength: 1
                                example: x
                              privileges:
                                nullable: true
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  example: x
                            required:
                              - type
                            additionalProperties: {}
                      required:
                        - authProviderType
                        - authorization_code
                        - code_verifier
                        - redirect_uri
                      title: oAuth
                    - type: object
                      properties:
                        authProviderType:
                          type: string
                          enum:
                            - fixedKeys
                          example: fixedKeys
                        authProviderKey:
                          nullable: true
                          type: string
                          example: string
                        key:
                          type: string
                          minLength: 1
                          example: x
                        password:
                          nullable: true
                          type: string
                          minLength: 1
                          example: x
                      required:
                        - authProviderType
                        - key
                      title: fixedKeys
              required:
                - type
                - payload
              title: client.auth_provider.linked
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - log
                  example: log
                payload:
                  nullable: true
                  type: object
                  additionalProperties: {}
              required:
                - type
              title: log
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - navigation
                  example: navigation
                payload:
                  type: object
                  properties:
                    from:
                      type: object
                      properties:
                        url:
                          description: Lien externe.
                          nullable: true
                          type: string
                          format: uri
                          example: https://example.com
                        broadcastArticleId:
                          description: Pointeur vers un article.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastPageId:
                          description: Pointeur vers une page.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastSessionId:
                          description: Pointeur vers une session.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastHostId:
                          description: Pointeur vers un host.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastInterestPointId:
                          description: Pointeur vers un point d'interet.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastMapId:
                          description: Pointeur vers une carte.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        nativeContent:
                          description: >-
                            Destination native (`home`, `articles`, `maps`,
                            `program`, etc.).
                          nullable: true
                          type: string
                          enum:
                            - contact
                            - localTicket
                            - articles
                            - maps
                            - home
                            - program
                            - hosts
                            - menu
                            - auth
                            - profile
                            - favorites
                            - campaigns
                            - networkingForms
                            - networkingScan
                            - meteo
                            - search
                          example: contact
                        query:
                          description: Filtres ou query params additionnels.
                          nullable: true
                          type: object
                          properties:
                            filters:
                              nullable: true
                              type: array
                              items: {}
                            filtersLogical:
                              nullable: true
                              type: string
                              enum:
                                - $and
                                - $or
                                - $nor
                              example: $and
                            limit:
                              nullable: true
                              anyOf:
                                - type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                  example: 0
                                - type: number
                                  enum:
                                    - -1
                                  example: -1
                            skip:
                              nullable: true
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                              example: 0
                            sort:
                              nullable: true
                              type: object
                              additionalProperties:
                                type: string
                                enum:
                                  - asc
                                  - desc
                                example: asc
                      description: Destination de navigation d'une tuile ou d'un bouton.
                    to:
                      type: object
                      properties:
                        url:
                          description: Lien externe.
                          nullable: true
                          type: string
                          format: uri
                          example: https://example.com
                        broadcastArticleId:
                          description: Pointeur vers un article.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastPageId:
                          description: Pointeur vers une page.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastSessionId:
                          description: Pointeur vers une session.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastHostId:
                          description: Pointeur vers un host.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastInterestPointId:
                          description: Pointeur vers un point d'interet.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        broadcastMapId:
                          description: Pointeur vers une carte.
                          nullable: true
                          type: string
                          minLength: 24
                          maxLength: 24
                          format: objectId
                          example: 64b7f8b6f23a4a4f3d0a9b12
                        nativeContent:
                          description: >-
                            Destination native (`home`, `articles`, `maps`,
                            `program`, etc.).
                          nullable: true
                          type: string
                          enum:
                            - contact
                            - localTicket
                            - articles
                            - maps
                            - home
                            - program
                            - hosts
                            - menu
                            - auth
                            - profile
                            - favorites
                            - campaigns
                            - networkingForms
                            - networkingScan
                            - meteo
                            - search
                          example: contact
                        query:
                          description: Filtres ou query params additionnels.
                          nullable: true
                          type: object
                          properties:
                            filters:
                              nullable: true
                              type: array
                              items: {}
                            filtersLogical:
                              nullable: true
                              type: string
                              enum:
                                - $and
                                - $or
                                - $nor
                              example: $and
                            limit:
                              nullable: true
                              anyOf:
                                - type: integer
                                  minimum: 0
                                  maximum: 9007199254740991
                                  example: 0
                                - type: number
                                  enum:
                                    - -1
                                  example: -1
                            skip:
                              nullable: true
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                              example: 0
                            sort:
                              nullable: true
                              type: object
                              additionalProperties:
                                type: string
                                enum:
                                  - asc
                                  - desc
                                example: asc
                      description: Destination de navigation d'une tuile ou d'un bouton.
                  required:
                    - from
                    - to
              required:
                - type
                - payload
              title: navigation
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - location.updated
                  example: location.updated
                payload:
                  type: object
                  properties:
                    latitude:
                      type: number
                      example: 0
                    longitude:
                      type: number
                      example: 0
                    accuracy:
                      type: number
                      example: 0
                  required:
                    - latitude
                    - longitude
                    - accuracy
                  additionalProperties: {}
              required:
                - type
                - payload
              title: location.updated
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - location.sharing.updated
                  example: location.sharing.updated
                payload:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                      example: true
                  required:
                    - enabled
                  additionalProperties: {}
              required:
                - type
                - payload
              title: location.sharing.updated
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - push.subscription.updated
                  example: push.subscription.updated
                payload:
                  type: object
                  properties:
                    fcmToken:
                      nullable: true
                      type: string
                      example: string
                    subscribed:
                      nullable: true
                      type: boolean
                      example: true
                  additionalProperties: {}
              required:
                - type
                - payload
              title: push.subscription.updated
            - type: object
              properties:
                occurredAt:
                  nullable: true
                type:
                  type: string
                  enum:
                    - notification.opened
                  example: notification.opened
                payload:
                  type: object
                  properties:
                    campaignId:
                      type: string
                      minLength: 24
                      maxLength: 24
                      format: objectId
                      example: 64b7f8b6f23a4a4f3d0a9b12
                  required:
                    - campaignId
                  additionalProperties: {}
              required:
                - type
                - payload
              title: notification.opened
        - type: object
          properties:
            metadata:
              type: object
              additionalProperties: {}
    broadcastEventResponse:
      allOf:
        - $ref: '#/components/schemas/broadcastEventCreate'
        - type: object
          properties:
            _id:
              type: string
              format: objectId
              example: 64b7f8b6f23a4a4f3d0a9b12
            _createdAt:
              type: string
              format: date-time
              example: '2024-01-01T00:00:00.000Z'
            _updatedAt:
              type: string
              format: date-time
              nullable: true
              example: '2024-01-01T00:00:00.000Z'
            _reference:
              nullable: true
              type: string
              example: string
          required:
            - _id
            - _createdAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Use the format `X-API-KEY YOUR_API_KEY`. Each key is tied to a single
        broadcast.

````

## Related topics

- [Create broadcast resource](/api-reference/broadcast-resource/create-broadcast-resource.md)
- [Create broadcastDiffuser resource](/api-reference/broadcastdiffuser-resource/create-broadcastdiffuser-resource.md)
- [Create broadcastHost resource](/api-reference/broadcasthost-resource/create-broadcasthost-resource.md)
- [Create broadcastCampaign resource](/api-reference/broadcastcampaign-resource/create-broadcastcampaign-resource.md)
- [Create broadcastCategory resource](/api-reference/broadcastcategory-resource/create-broadcastcategory-resource.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.