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

# Start a saved or prebuilt Play run

> Starts a durable Play run for a saved or prebuilt play name. Read run.id from the response, then poll getRun until run.status is terminal.

Authentication: workspace API key in `Authorization: Bearer <key>`.

## Errors

| Status | Meaning |
| - | - |
| 400 | The request conflicts with current state or a retained request identity. |
| 401 | The request conflicts with current state or a retained request identity. |
| 402 | The request conflicts with current state or a retained request identity. |
| 404 | The request conflicts with current state or a retained request identity. |
| 409 | The request conflicts with current state or a retained request identity. |
| 422 | The request conflicts with current state or a retained request identity. |
| 429 | The request conflicts with current state or a retained request identity. |
| 500 | The request conflicts with current state or a retained request identity. |
| 503 | A required service is unavailable. Respect Retry-After when present. |


## OpenAPI

````yaml openapi.json POST /api/v2/plays/run
openapi: 3.1.1
info:
  title: Deepline API
  version: v2
  description: >-
    Discover typed GTM tools and callable Plays, then execute a tool or start
    and inspect a durable Deepline Play run. Use the MCP endpoint when your
    client supports Model Context Protocol.
  contact:
    name: Deepline support
    email: team@deepline.com
    url: https://deepline.com/contact
servers:
  - url: https://code.deepline.com
    description: Deepline production runtime API
security: []
tags:
  - name: Health
    description: Availability checks.
  - name: Billing
    description: Safe recovery of existing purchase intent.
  - name: Tools
    description: Discover and execute typed provider tools.
  - name: Plays
    description: Discover, start, and inspect durable Play runs.
externalDocs:
  description: API reference
  url: https://deepline.com/docs/api-reference
paths:
  /api/v2/plays/run:
    post:
      tags:
        - Plays
      summary: Start a saved or prebuilt Play run
      description: >-
        Starts a durable Play run for a saved or prebuilt play name. Read run.id
        from the response, then poll getRun until run.status is terminal.
      operationId: startPlayRun
      requestBody:
        required: true
        description: A saved or prebuilt Play reference with its typed input.
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: Saved or prebuilt Play reference.
                input:
                  type: object
                  description: Input matching the selected Play schema.
                  additionalProperties: true
                revisionId:
                  type: string
                  description: Run a specific saved revision belonging to the named Play.
                force:
                  type: boolean
                  description: Compatibility flag. Active sibling runs are allowed.
                forceToolRefresh:
                  type: boolean
                  description: Bypass cached dataset and tool-call reuse.
                maxCredits:
                  type: number
                  exclusiveMinimum: 0
                  description: >-
                    Per-run Deepline-credit cap. Replaces the Play’s declared
                    maxCreditsPerRun for this run.
                maxConcurrentExternalCalls:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  default: 64
                  description: >-
                    Per-run ceiling on concurrently resident provider-tool
                    executions and direct HTTP calls.
                maxConcurrentRows:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  description: >-
                    Run-wide default and ceiling for live dataset-map row
                    resolvers.
                waitForCompletionMs:
                  type: integer
                  minimum: 0
                  maximum: 15000
                  default: 0
                  description: >-
                    Briefly wait for completion. A timeout returns the existing
                    run, not a new execution.
                terminalStatus:
                  enum:
                    - full
                  description: >-
                    With a completion wait, request the full terminal detail
                    wrapper.
            example:
              name: prebuilt/person-linkedin-to-email
              input:
                linkedin_url: https://www.linkedin.com/in/example-person/
      responses:
        '200':
          description: A successful Runtime API response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlayRunPackage'
              example:
                schemaVersion: 1
                kind: play_run
                run:
                  id: play/prebuilt/person-linkedin-to-email/run/example
                  playName: person-linkedin-to-email
                  status: running
                steps: []
                outputs: {}
                resultState: not_returned
                datasets: []
                next:
                  inspect:
                    kind: deepline_run_inspect
                    runId: play/prebuilt/person-linkedin-to-email/run/example
                    command: >-
                      deepline runs get
                      play/prebuilt/person-linkedin-to-email/run/example
                    api:
                      method: GET
                      path: >-
                        /api/v2/runs/play%2Fprebuilt%2Fperson-linkedin-to-email%2Frun%2Fexample
                  billing:
                    kind: deepline_run_billing
                    runId: play/prebuilt/person-linkedin-to-email/run/example
                    command: >-
                      deepline billing usage --run-id
                      play/prebuilt/person-linkedin-to-email/run/example
                    api:
                      method: GET
                      path: >-
                        /api/v2/runs/play%2Fprebuilt%2Fperson-linkedin-to-email%2Frun%2Fexample?full=true
                  logs:
                    kind: deepline_run_logs
                    runId: play/prebuilt/person-linkedin-to-email/run/example
                    view: tail
                    limit: 100
                    command: >-
                      deepline runs logs
                      play/prebuilt/person-linkedin-to-email/run/example --limit
                      100
                    api:
                      method: GET
                      path: >-
                        /api/v2/runs/play%2Fprebuilt%2Fperson-linkedin-to-email%2Frun%2Fexample/logs?limit=100
        '400':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '401':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '402':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '404':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '409':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '422':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '429':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '500':
          description: >-
            The request conflicts with current state or a retained request
            identity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
        '503':
          description: A required service is unavailable. Respect Retry-After when present.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Unauthorized
          headers:
            Retry-After:
              description: Minimum whole seconds to wait before retrying the request.
              schema:
                type: integer
                minimum: 1
      security:
        - bearerAuth: []
components:
  schemas:
    PlayRunPackage:
      type: object
      required:
        - schemaVersion
        - kind
        - run
        - steps
        - outputs
        - datasets
        - next
      properties:
        schemaVersion:
          type: integer
          const: 1
        kind:
          type: string
          const: play_run
        run:
          type: object
          required:
            - id
            - playName
            - status
          properties:
            id:
              type: string
            playName:
              type: string
            status:
              type: string
              enum:
                - queued
                - running
                - waiting
                - completed
                - failed
                - cancelled
            dashboardUrl:
              type: string
              format: uri
          additionalProperties: true
        steps:
          type: array
          items:
            type: object
            additionalProperties: true
        outputs:
          type: object
          additionalProperties: true
        datasets:
          type: array
          items:
            type: object
            additionalProperties: true
        next:
          type: object
          additionalProperties: true
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          oneOf:
            - type: string
              description: Route-specific error message.
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
                resolution:
                  type: string
              additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Deepline workspace API key
      description: >-
        Create a workspace API key in the Deepline dashboard before calling
        authenticated endpoints.

````

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