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

# Resolve a waiting migration hook

> Resume a hook listed on `GET .../migration/runs/{runId}` (e.g. `target_selection`). Prefer `hooks[].resume_path`.



## OpenAPI

````yaml /openapi/program.openapi.json post /surveys/{surveyId}/migration/runs/{runId}/hooks/{hookId}/resolve
openapi: 3.1.0
info:
  title: Questra Program API
  version: 0.0.1
  description: >-
    REST API for the Questra Program product. Browser users authenticate through
    Questra Auth SSO; automation uses workspace-scoped API keys (`Authorization:
    Bearer qpk_live_…`). API keys carry scopes enforced before handlers.
    Outbound webhooks follow Standard Webhooks (at-least-once delivery;
    consumers must be idempotent).
servers:
  - url: /v1
    description: Program API base path
security: []
paths:
  /surveys/{surveyId}/migration/runs/{runId}/hooks/{hookId}/resolve:
    post:
      tags:
        - Survey migration
      summary: Resolve a waiting migration hook
      description: >-
        Resume a hook listed on `GET .../migration/runs/{runId}` (e.g.
        `target_selection`). Prefer `hooks[].resume_path`.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: surveyId
          in: path
        - schema:
            type: string
            minLength: 1
            description: Workflow SDK run id (`wrun_...`)
          required: true
          description: Workflow SDK run id (`wrun_...`)
          name: runId
          in: path
        - schema:
            type: string
            minLength: 1
            description: Hook id from run detail (`hooks[].hook_id`).
          required: true
          description: Hook id from run detail (`hooks[].hook_id`).
          name: hookId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveHookRequest'
      responses:
        '200':
          description: Hook resumed or already resumed with the same payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveHookResponse'
        '202':
          description: Accepted before hook registration; maintenance will retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveHookResponse'
        '400':
          description: Unknown hook kind or invalid payload for that kind
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: Feature disabled (e.g. Questra Publish target not enabled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Survey, run, or hook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: Hook not waiting, or conflicting payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    ResolveHookRequest:
      type: object
      additionalProperties: {}
    ResolveHookResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ResolveHookResponseData'
      required:
        - data
    ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        resource:
          type: string
        slug:
          type: string
        file_id:
          type: string
        endpoint_id:
          type: string
        event_id:
          type: string
        delivery_id:
          type: string
        api_key_id:
          type: string
        integration_id:
          type: string
        audit_id:
          type: string
        status:
          type: string
        details: {}
        question_ids:
          type: array
          items:
            type: string
        survey_ids:
          type: array
          items:
            type: string
        revisions:
          type: array
          items:
            type: number
      required:
        - error
    ResolveHookResponseData:
      type: object
      properties:
        run_id:
          type: string
        hook_id:
          type: string
        kind:
          $ref: '#/components/schemas/WorkflowHookKind'
        state:
          type: string
          enum:
            - resumed
            - accepted
            - same
        result:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: >-
            Kind-specific result. For `target_selection`, `{ target:
            FrozenProgrammingTarget }`.
      required:
        - run_id
        - hook_id
        - kind
        - state
        - result
    WorkflowHookKind:
      type:
        - string
        - 'null'
      enum:
        - target_selection
        - template_selection
        - null
      description: >-
        Program hook kind when known from World metadata/token or bindings; null
        if unrecognized.

````