# Create a provisioning request (org_admin) (/docs/api-reference/provisioning/ProvisioningController_create)

`POST /api/provisioning-requests`

Base URL: https://api.xentr.ai

Authentication: bearer token (`Authorization: Bearer <token>`).

## Request body

Required.

Content type: `application/json`

```json
{
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "description": "Organization that owns the factory.",
      "example": "a1b2c3d4-1111-2222-3333-444455556666"
    },
    "factoryId": {
      "type": "string",
      "description": "Factory slug (not UUID) where the machine will live.",
      "example": "[factory-slug]"
    },
    "requestType": {
      "type": "string",
      "description": "Request type: add new machine or remove existing.",
      "enum": [
        "add",
        "remove"
      ],
      "default": "add",
      "example": "add"
    },
    "targetMachineId": {
      "type": "string",
      "description": "For removal requests: ID of the existing machine to remove.",
      "example": "a1b2c3d4-1111-2222-3333-444455556666"
    },
    "machineName": {
      "type": "string",
      "description": "Desired machine name (or existing machine name for removal).",
      "example": "CNC Lathe #4"
    },
    "machineType": {
      "type": "string",
      "description": "Machine type — IoT-connected or manual entry.",
      "enum": [
        "iot",
        "ai",
        "manual"
      ],
      "example": "iot"
    },
    "location": {
      "type": "string",
      "description": "Preferred physical location inside the factory.",
      "example": "Building A, Line 3"
    },
    "notes": {
      "type": "string",
      "description": "Additional notes / reason for removal.",
      "example": "Replacing with newer OPC UA model."
    }
  },
  "required": [
    "organizationId",
    "factoryId",
    "machineName",
    "machineType"
  ]
}
```

## Responses

### 201: Provisioning request created