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

# Execute Relay Action

> Run a browser-automated action against a stored credential. Long-running (up to ~4 min).



## OpenAPI

````yaml https://api.selcor.ai/v1/openapi.json post /v1/relay/execute
openapi: 3.1.0
info:
  title: Selcor Partner API
  version: 0.1.0
  description: API for managing workspaces, locations, voice agents, and relay executions.
servers:
  - url: https://api.selcor.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/relay/execute:
    post:
      tags:
        - Relay Execute
      summary: Execute Relay Action
      description: >-
        Run a browser-automated action against a stored credential. Long-running
        (up to ~4 min).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                credential_id:
                  type: string
                  minLength: 1
                  example: cred_abc123
                instruction:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  example: Download the patient list as CSV
                tier:
                  type: string
                  enum:
                    - read
                    - create
                    - update
                    - delete
                  example: read
                schema:
                  type: object
                  additionalProperties:
                    nullable: true
              required:
                - credential_id
                - instruction
                - tier
      responses:
        '200':
          description: Execution result
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ExecuteResult'
                  request_id:
                    type: string
                required:
                  - data
                  - request_id
      security:
        - bearerAuth: []
components:
  schemas:
    ExecuteResult:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        result:
          nullable: true
        turns:
          type: number
          nullable: true
        tokens_used:
          type: number
          nullable: true
        duration_ms:
          type: number
          nullable: true
        screenshots:
          nullable: true
        error:
          type: object
          nullable: true
          properties:
            code:
              type: string
            message:
              type: string
              nullable: true
            detail:
              nullable: true
          required:
            - code
            - message
      required:
        - id
        - status
        - turns
        - tokens_used
        - duration_ms
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API key in format: sk_live_...'

````