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

# Quickstart

> Submit a DXF nesting request and receive the result via webhook.

This walks through a complete DXF nest: authenticate, submit, and receive the result. It
takes a few minutes and assumes you already have an [API key](/authentication).

<Steps>
  <Step title="Confirm your key works">
    ```bash theme={null}
    curl https://dev.api.nestapi.com/auth/validate \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```

    A `200` with `"Valid": true` means you're ready.
  </Step>

  <Step title="Prepare a webhook URL">
    Nesting is asynchronous. When a nest completes, NestAPI sends a `POST` with the result to a
    URL you supply as `ResultsWebhookUri`. For local testing, a tunnelling service (e.g. a
    request-bin or an ngrok URL) works well.

    See [Webhooks](/guides/webhooks) for the payload format and how to secure the endpoint.
  </Step>

  <Step title="Submit the nesting request">
    `POST /nesting` accepts base64-encoded DXF files together with the sheets to nest onto and
    the nesting settings. It returns a `RequestId` immediately.

    ```bash theme={null}
    curl https://dev.api.nestapi.com/nesting \
      -X POST \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "Request": {
          "Parts":    [ /* base64 DXF parts + quantities */ ],
          "Sheets":   [ /* stock sheets: size + quantity */ ],
          "Settings": { /* spacing, rotations, etc. */ }
        },
        "ResultsWebhookUri": "https://your-app.example.com/hooks/nestapi",
        "AutomaticallyStartNesting": true
      }'
    ```

    `AutomaticallyStartNesting: true` starts the nest immediately. Set it to `false` if you
    want to connect to SignalR for live progress first, then call `/nesting/delayedstart` —
    see the [nesting workflow](/guides/nesting-workflow).

    <Tip>
      For the exact shape of `Request` (`Base64NestingRequest`) — parts, sheets, and every
      setting — see the **Nesting** section of the [API Reference](/api-reference), and the
      [parts & sheets](/concepts/parts-and-sheets) and [nesting settings](/concepts/nesting-settings)
      concept pages.
    </Tip>
  </Step>

  <Step title="Receive the result">
    When the nest finishes, NestAPI `POST`s the `ApiNestingResult` to your webhook. It contains
    the layout, per-sheet placements, and material-usage figures.

    You can also fetch a result on demand once you have its `RequestId`:

    ```bash theme={null}
    curl "https://dev.api.nestapi.com/nesting/result/" \
      -X POST \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "RequestId": "THE_REQUEST_ID" }'
    ```
  </Step>

  <Step title="Export the nest">
    Turn the completed nest into production output — DXF and reports:

    ```bash theme={null}
    curl "https://dev.api.nestapi.com/nesting/export?RequestId=THE_REQUEST_ID" \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```

    See [export types](/concepts/export-types) for the available formats.
  </Step>
</Steps>

## What next?

<CardGroup cols={2}>
  <Card title="Nesting workflow" icon="diagram-project" href="/guides/nesting-workflow">
    The full async model, SignalR, and delayed start.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/webhooks">
    Payload format, retries, and securing your endpoint.
  </Card>
</CardGroup>
