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

# Create an SRT source

> The source is created inactive and accepts no stream until it is activated. Its name must be unused. Requires the `livesources:source-management` permission.



## OpenAPI

````yaml https://api.up.telestream.com/livesources/v1/openapi.json post /sources
openapi: 3.1.0
info:
  contact:
    email: cloudsupport@telestream.net
    name: API Support
    url: https://www.telestream.com
  description: >-
    Programmatic access to live sources: the SRT streams the platform ingests
    for you.

    Compatibility. Within a version we only add: new endpoints, new optional
    request fields and new optional response fields, and new problem types.
    Clients must ignore response fields and problem types they do not recognise,
    and fall back to the HTTP status class for an unrecognised problem type.
    Anything else - removing or renaming a field, narrowing a type, requiring a
    previously optional field, a new enum value in a response, or changing the
    status for an existing condition - arrives as a new major version under a
    new path.

    A version stays available until it is retired. A retired operation answers
    410 Gone with the operation-retired problem type; a retirement is announced
    when it is decided rather than on a fixed schedule.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: https://www.telestream.net/telestream-cloud/terms.htm
  title: Telestream Live Sources API
  version: 1.0.0
servers:
  - url: https://api.up.telestream.com/livesources/v1
security:
  - apiKey: []
tags:
  - description: What the presented API key may do.
    name: Access
  - description: Live sources and their ingest lifecycle.
    name: Sources
paths:
  /sources:
    post:
      tags:
        - Sources
      summary: Create an SRT source
      description: >-
        The source is created inactive and accepts no stream until it is
        activated. Its name must be unused. Requires the
        `livesources:source-management` permission.
      operationId: CreateSrtSource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SrtSourceInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Source'
          description: The created source.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    SrtSourceInput:
      additionalProperties: false
      properties:
        description:
          example: Main camera feed from the studio floor.
          type: string
        engine_version:
          description: >-
            The engine version to pin, as `major.minor.patch`; omit it to follow
            the current engine. Pinning is not honoured: the value is kept, and
            the source follows the current engine.
          maxLength: 32
          type: string
        expected_properties:
          additionalProperties: true
          description: >-
            What the stream is expected to look like. It has to follow the
            expected properties schema of the source's engine version.
          type: object
        name:
          description: Identifies the source.
          example: Studio camera 1
          maxLength: 512
          minLength: 1
          type: string
        recovery_location:
          description: The store to buffer stream data for recovery in, as a `tmi://` URL.
          type: string
        recovery_max_size:
          default: 1
          description: The recovery buffer's size limit in GB, per session.
          minimum: 1
          type: integer
        region:
          maxLength: 30
          type: string
        srt_settings:
          additionalProperties: true
          description: >-
            How the source should receive its stream. It has to follow the SRT
            settings schema of the source's engine version; a document that does
            not is refused.
          type: object
        tags:
          example:
            - studio
            - camera
          items:
            type: string
          type: array
      required:
        - name
        - srt_settings
        - expected_properties
      type: object
    Source:
      description: >-
        A source's configuration, lifecycle state and what is currently arriving
        on it. Every source of this version is fed over SRT.
      properties:
        activated_at:
          format: date-time
          type: string
        active_receiver:
          allOf:
            - $ref: '#/components/schemas/ConnectionType'
          description: Which connection the stream is currently taken from.
        description:
          type: string
        engine_version:
          description: >-
            The engine version the source pins, as `major.minor.patch`; empty
            when it follows the current engine.
          type: string
        expected_properties:
          additionalProperties: true
          description: >-
            What the stream is expected to look like. Its shape is the expected
            properties schema of the source's engine version.
          type: object
        id:
          format: uuid
          type: string
        kind:
          $ref: '#/components/schemas/SourceKind'
        name:
          type: string
        passthrough_url:
          description: >-
            Where the stream can be pulled from; present only while an active
            source offers passthrough.
          type: string
        primary_connection_state:
          $ref: '#/components/schemas/ConnectionState'
        primary_ingress_url:
          description: >-
            Where the stream is pushed to. Absent until the source is active,
            and for a source that connects out rather than listening.
          type: string
        recovery_location:
          description: >-
            The store holding buffered stream data for recovery, as a `tmi://`
            URL.
          type: string
        recovery_max_size:
          description: The recovery buffer's size limit in GB, per session.
          type: integer
        redundancy:
          description: >-
            Whether the source is received over two connections. Read-only; it
            follows the SRT settings, which are where the second connection is
            configured.
          readOnly: true
          type: boolean
        region:
          description: Where the stream receiver is placed.
          type: string
        secondary_connection_state:
          $ref: '#/components/schemas/ConnectionState'
        secondary_ingress_url:
          description: >-
            The second connection's ingress URL; present only for a redundantly
            received active source.
          type: string
        srt_settings:
          additionalProperties: true
          description: >-
            How the source receives its stream. Its shape is the SRT settings
            schema of the source's engine version.
          type: object
        status:
          $ref: '#/components/schemas/SourceStatus'
        stream_metadata:
          additionalProperties: true
          description: >-
            What was detected in the incoming stream; absent until a stream
            arrives. Its shape is the metadata schema of the source's engine
            version.
          type: object
        tags:
          items:
            type: string
          type: array
        transport_statistics_passthrough:
          description: >-
            The passthrough output's sender statistics, one entry per connected
            consumer.
          items:
            additionalProperties: true
            type: object
          type: array
        transport_statistics_primary:
          additionalProperties: true
          description: >-
            How the primary connection is performing. Its shape is the transport
            statistics schema of the source's engine version.
          type: object
        transport_statistics_secondary:
          additionalProperties: true
          description: >-
            How the secondary connection is performing; the same shape as the
            primary connection's.
          type: object
      required:
        - id
        - kind
        - name
        - description
        - status
        - primary_connection_state
        - secondary_connection_state
        - engine_version
        - redundancy
        - active_receiver
        - srt_settings
        - expected_properties
      type: object
    ConnectionType:
      description: Which of a redundantly received source's two connections is meant.
      enum:
        - primary
        - secondary
        - unknown
      type: string
    SourceKind:
      description: The protocol a source is fed over.
      enum:
        - srt
      type: string
    ConnectionState:
      description: >-
        `waiting` has not been connected to yet; `connected` is receiving;
        `disconnected` was connected and is no longer.
      enum:
        - waiting
        - connected
        - disconnected
      type: string
    SourceStatus:
      description: >-
        `inactive` accepts no stream; `pending` is being provisioned; `active`
        is ready to receive; `stopping` is still releasing its resources;
        `error` cannot be used until it is deactivated.
      enum:
        - inactive
        - pending
        - active
        - stopping
        - error
      type: string
    Problem:
      description: An RFC 9457 problem document.
      properties:
        detail:
          description: >-
            What went wrong this time, in words meant for a person. Branch on
            `type` rather than parsing it.
          type: string
        instance:
          description: The request path the problem occurred on.
          type: string
        status:
          description: >-
            The HTTP status code, repeated so a logged payload is
            self-describing.
          type: integer
        title:
          description: A short, stable summary of the problem type.
          type: string
        trace_id:
          description: Correlates this response with the server-side logs.
          type: string
        type:
          description: >-
            Identifies the kind of problem. Branch on this rather than on the
            message.
          type: string
      required:
        - type
        - title
        - status
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The request could not be understood.
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The request carries no usable API key.
      headers:
        WWW-Authenticate:
          description: The scheme to present a key with.
          schema:
            type: string
    Forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The caller may not perform this action.
    Conflict:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: >-
        The action is refused by the current state of the resource, or the name
        it asks for is taken. The problem type names the condition to fix.
    PayloadTooLarge:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The request body exceeds what the API reads.
    InternalError:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: The request could not be completed.
    ServiceUnavailable:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      description: A transient condition prevented the request; it is worth retrying.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
  securitySchemes:
    apiKey:
      description: >-
        A platform API key, presented as `Authorization: Bearer <API_KEY>`. Each
        operation says which permission the key needs.
      scheme: bearer
      type: http

````

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