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

# Create Node

> Generate a new physical touchpoint.

### Body

<ParamField body="label" type="string" required>
  The internal name for this node (e.g., "Conference Room A").
</ParamField>

<ParamField body="function_type" type="string" required>
  The payload type. One of `redirect`, `vcard`, `wifi`, `microsite`, `digital_card`, or `action`.
</ParamField>

<ParamField body="payload" type="object" required>
  Type-specific configuration object. See [Node Types](/concepts/nodes#function-types) for payload schemas per type.

  **Redirect:** `{ "url": "https://..." }`

  **vCard:** `{ "first_name": "...", "last_name": "...", "email": "...", "phone": "..." }`

  **WiFi:** `{ "ssid": "...", "password": "...", "security": "WPA2" }`

  **Action:** `{ "action_type": "whatsapp", "phone": "...", "message": "..." }`
</ParamField>

<ParamField body="template_id" type="string">
  Bind to a template for enforced brand consistency. Locked fields cannot be overridden.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      The UUID of the node.
    </ResponseField>

    <ResponseField name="slug" type="string">
      The 8-char short code (e.g., `o1ulpplq`).
    </ResponseField>

    <ResponseField name="url" type="string">
      The public scan URL (e.g., `https://nearnode.io/v/o1ulpplq`).
    </ResponseField>

    <ResponseField name="function_type" type="string">
      The payload type.
    </ResponseField>

    <ResponseField name="status" type="string">
      The lifecycle status. New nodes start as `active`.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://nearnode.io/api/v1/nodes \
    -H "Authorization: Bearer sk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "label": "Lobby Entrance",
      "function_type": "redirect",
      "payload": {
        "url": "https://acme.com/checkin"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://nearnode.io/api/v1/nodes', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_live_...',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      label: 'Lobby Entrance',
      function_type: 'redirect',
      payload: {
        url: 'https://acme.com/checkin',
      },
    }),
  });

  const { data } = await response.json();
  console.log(data.url); // https://nearnode.io/v/o1ulpplq
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://nearnode.io/api/v1/nodes",
      headers={"Authorization": "Bearer sk_live_..."},
      json={
          "label": "Lobby Entrance",
          "function_type": "redirect",
          "payload": {
              "url": "https://acme.com/checkin",
          },
      },
  )

  data = response.json()["data"]
  print(data["url"])  # https://nearnode.io/v/o1ulpplq
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": "node_123abc-def4-5678-ghij-klmnopqrstuv",
      "slug": "o1ulpplq",
      "url": "https://nearnode.io/v/o1ulpplq",
      "function_type": "redirect",
      "status": "active"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid or missing API key"
  }
  ```

  ```json 422 theme={null}
  {
    "error": "Validation failed",
    "details": {
      "function_type": "Must be one of: redirect, vcard, wifi, microsite, digital_card, action"
    }
  }
  ```
</ResponseExample>
