---
title: "Create API Key Role Assignment"
method: POST
path: "/v1/api-key-role-assignments"
tags: ["BackendService"]
---

# Create API Key Role Assignment

`POST /v1/api-key-role-assignments`

## Request body

- CreateAPIKeyRoleAssignmentRequest
  - `apiKeyRoleAssignment` APIKeyRoleAssignment
    - `id` string — The API Key Role Assignment ID. Starts with `api_key_role_assignment_...`.
    - `apiKeyId` string — The API Key ID.
    - `roleId` string — The Role ID.

## Response `200`

OK

- CreateAPIKeyRoleAssignmentResponse
  - `apiKeyRoleAssignment` APIKeyRoleAssignment
    - `id` string — The API Key Role Assignment ID. Starts with `api_key_role_assignment_...`.
    - `apiKeyId` string — The API Key ID.
    - `roleId` string — The Role ID.

## Other responses

- `400` — API Error
- `401` — API Error
- `403` — API Error
- `404` — API Error

---

[API](https://skmtc.net/tesseral-labs/apis/backendservice-api.md) · [All operations](https://skmtc.net/tesseral-labs/apis/backendservice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tesseral-labs/backendservice-api/versions/fe83f78ae20a/schema)
