---
title: Een guardrail-toewijzing aanmaken | RunAPI
description: Koppel één guardrail aan een standaard API-sleutel of een accountlid.
url: https://runapi.ai/nl/docs/api/management/guardrail-assignments/create.md
canonical: https://runapi.ai/nl/docs/api/management/guardrail-assignments/create
locale: nl
---

> HTML-versie: https://runapi.ai/nl/docs/api/management/guardrail-assignments/create
> Site-index voor agents: https://runapi.ai/llms.txt

# Een guardrail-toewijzing aanmaken

Koppel één guardrail aan een standaard API-sleutel of een accountlid.

## Eindpunt

POST /api/v1/guardrail_assignments

Basis-URL: https://runapi.ai

API-versie: v1

Authenticatie: Authorization: Bearer YOUR_MANAGEMENT_API_KEY


Autorisatie: Accountbeheerders kunnen elk in aanmerking komend doel toewijzen. Gebruikers zonder beheerdersrechten kunnen alleen hun eigen standaard API-sleutels toewijzen.

## Verzoek

Stuur waarden alleen op de vermelde verzoeklocatie.

### JSON-body

```json
{
  "account_user_id": {
    "description": "Prefix-ID van een accountlid. Dit doel vereist een accountbeheerder.",
    "required": false,
    "type": "string"
  },
  "api_token_id": {
    "description": "Standaard API-sleutel prefix-ID. Geef exact één doel-ID op.",
    "required": false,
    "type": "string"
  },
  "guardrail_id": {
    "description": "Prefix-ID van de guardrail.",
    "required": true,
    "type": "string"
  }
}
```

## Succesvol antwoord

HTTP 201 - POST /api/v1/guardrail_assignments

```json
{
  "account_user_id": null,
  "api_token_id": "token_123",
  "created_at": "2026-07-27T10:00:00.000Z",
  "guardrail_id": "guardrail_123",
  "id": "guardrail_assignment_123"
}
```

## Foutrespons (401)

HTTP 401

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Authentication required"
}
```

## Foutrespons (403)

HTTP 403

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Management API key required"
}
```

## Foutrespons (400)

HTTP 400

### Responsschema

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Leesbare foutmelding.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Leesbare validatiesamenvatting.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Responsvoorbeeld

```json
{
  "error": "page must be an integer"
}
```

## Foutrespons (403)

HTTP 403

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Forbidden"
}
```

## Foutrespons (404)

HTTP 404

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare foutmelding.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Resource not found"
}
```

## Foutrespons (422)

HTTP 422

### Responsschema

```json
{
  "properties": {
    "error": {
      "description": "Leesbare validatiesamenvatting.",
      "type": "string"
    },
    "errors": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
      "type": "object"
    }
  },
  "required": [
    "error",
    "errors"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Responsvoorbeeld

```json
{
  "error": "Validation failed",
  "errors": {
    "base": [
      "Validation failed"
    ]
  }
}
```

## cURL-voorbeeld



### curl

```curl
curl -X POST https://runapi.ai/api/v1/guardrail_assignments \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"guardrail_id":"guardrail_123","api_token_id":"token_123"}'
```

## Gerelateerde referentie

- [Guardrail-toewijzingen](https://runapi.ai/nl/docs/api/management/guardrail-assignments.md)
- [Guardrail Assignment-object](https://runapi.ai/nl/docs/api/management/guardrail-assignments/object.md)

---

## Meer van RunAPI

- [Home](https://runapi.ai/nl/.md)
- [Modelcatalogus](https://runapi.ai/nl/models.md)
- [Prijzen](https://runapi.ai/nl/pricing.md)
- [Providers](https://runapi.ai/nl/models)
- [Documentatie](https://runapi.ai/nl/docs/guides)
- [SDK's](https://runapi.ai/nl/sdk.md)
- [CLI](https://runapi.ai/nl/cli.md)
- [MCP Server](https://runapi.ai/nl/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/nl/claude-code-vs-cursor.md)
- [Cursor API instellen](https://runapi.ai/nl/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/nl/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/nl/contact.md)
- [Contact](https://runapi.ai/nl/contact.md)
- [Voorwaarden](https://runapi.ai/nl/terms.md)
- [Privacy](https://runapi.ai/nl/privacy.md)
- [Site-index voor agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Gestructureerde gegevens

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/nl/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/nl",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/nlicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "nl",
    "@type": "TechArticle",
    "headline": "Een guardrail-toewijzing aanmaken",
    "description": "Koppel één guardrail aan een standaard API-sleutel of een accountlid.",
    "url": "https://runapi.ai/nl/docs/api/management/guardrail-assignments/create",
    "mainEntityOfPage": "https://runapi.ai/nl/docs/api/management/guardrail-assignments/create"
  }
]
```
