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

# Get Onboarding Form

> Retrieve your team's custom onboarding form together with its active questions

Each team can configure a single custom onboarding form that affiliates fill out as part of their onboarding flow. This endpoint returns the form's metadata and the ordered list of currently active questions.

Returns `404 NOT_FOUND` when no onboarding form has been created for your team yet.

## Response

<ResponseField name="success" type="boolean">
  Always `true` for successful responses
</ResponseField>

<ResponseField name="data" type="object">
  The onboarding form object.

  <Expandable title="Data Object Properties">
    <ResponseField name="id" type="string">
      Unique identifier for the form
    </ResponseField>

    <ResponseField name="name" type="string">
      Form display name (max 200 characters)
    </ResponseField>

    <ResponseField name="description" type="string | null">
      Optional form description (max 1000 characters)
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the form was created
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of the last update
    </ResponseField>

    <ResponseField name="questions" type="array">
      Active questions in display order.

      <Expandable title="Question Properties">
        <ResponseField name="id" type="string">
          Unique identifier for the question
        </ResponseField>

        <ResponseField name="question" type="string">
          The question prompt shown to the affiliate
        </ResponseField>

        <ResponseField name="type" type="string">
          Question type. One of `single_choice`, `multiple_choice`, `text_input`, `textarea`.
        </ResponseField>

        <ResponseField name="is_required" type="boolean">
          Whether an answer is required to complete onboarding
        </ResponseField>

        <ResponseField name="options" type="array">
          Available choices for `single_choice` and `multiple_choice` questions. Empty array for text questions.
        </ResponseField>

        <ResponseField name="order" type="integer">
          0-based position used to sort questions in the form
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.affonso.io/v1/onboarding-form" \
    -H "Authorization: Bearer sk_live_your_api_key"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "id": "cmf8onb0001p3010onbform1",
      "name": "Affiliate Onboarding",
      "description": "Tell us a bit about how you plan to promote our product.",
      "created_at": "2024-04-10T08:00:00.000Z",
      "updated_at": "2024-04-15T14:30:00.000Z",
      "questions": [
        {
          "id": "cmq1onb000onbq1",
          "question": "Which channels will you use to promote us?",
          "type": "multiple_choice",
          "is_required": true,
          "options": ["YouTube", "Newsletter", "Blog", "Social"],
          "order": 0
        },
        {
          "id": "cmq1onb000onbq2",
          "question": "Tell us about your audience",
          "type": "textarea",
          "is_required": false,
          "options": [],
          "order": 1
        }
      ]
    }
  }
  ```

  ```json Response (404) theme={null}
  {
    "success": false,
    "error": {
      "code": "NOT_FOUND",
      "message": "No onboarding form found for your team"
    }
  }
  ```
</ResponseExample>

## Notes

* Only questions with `status: true` are returned. Soft-deleted questions are excluded.
* Each team has at most one onboarding form. To modify it, use `PATCH /v1/onboarding-form`.
