# Assign API resource roles to application

**POST /api/applications/{applicationId}/roles**

Assign API resource roles to the specified application. The API resource roles will be added to the existing API resource roles. Role IDs that are already assigned to the application are silently ignored.


## Servers
- Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.)


## Authentication methods
- O auth2


## Parameters

### Path parameters

- **applicationId** (string)
  The unique identifier of the application.



### Body: application/json (object)

- **roleIds** (array[string])
  An array of API resource role IDs to assign.



## Responses
### 201
The API resource roles have been assigned to the application successfully.

#### Body: application/json (object)
- **roleIds** (array[string])
  An array of API resource role IDs requested for assignment.

- **addedRoleIds** (array[string])
  An array of API resource role IDs newly assigned to the application. Role IDs already attached to the application are silently ignored and not present in this array.


### 400
Bad Request

### 401
Unauthorized

### 403
Forbidden

### 404
Not Found

### 422
Unprocessable Content


[Powered by Bump.sh](https://bump.sh)
