# Update plugin-tag relationship

`PUT /api/plugin-tags/{id}`

Update properties of an existing plugin-tag relationship such as priority or featured status.

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (path, string, uuid, required) - Plugin-tag relationship ID
  Type: string, uuid

Request body: application/json (required)

Type: object

Schema: [UpdatePluginTagDTO](https://sourcey-gauzy.pages.dev/api-reference/models/updateplugintagdto/index.md)

- `tenant` (optional)
  Type: object

- `tenantId` (optional)
  Type: string

- `organization` (optional)
  Type: object

- `organizationId` (optional)
  Type: string

- `sentTo` (optional)
  Type: string

- `pluginId` (optional)
  Type: string, uuid
  
  Plugin ID to associate with the tag
  
  Example:
  
  ```json
  "123e4567-e89b-12d3-a456-426614174000"
  ```

- `tagId` (optional)
  Type: string, uuid
  
  Tag ID to associate with the plugin
  
  Example:
  
  ```json
  "987fcdeb-51a2-43d1-9f4e-123456789abc"
  ```

- `priority` (optional)
  Type: number
  
  Priority or weight of this tag association
  
  minimum: 0
  
  maximum: 100
  
  Example:
  
  ```json
  75
  ```

- `isFeatured` (optional)
  Type: boolean
  
  Whether this tag association is featured
  
  Example:
  
  ```json
  false
  ```

Responses:

- 200: Successfully updated plugin-tag relationship

Content type: application/json

Type: object

Schema: [PluginTag](https://sourcey-gauzy.pages.dev/api-reference/models/plugintag/index.md)

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `plugin` (required)
  Type: unknown
  
  The plugin associated with this tag relationship
  
  allOf:
    Reference: [Plugin_1](https://sourcey-gauzy.pages.dev/api-reference/models/plugin-1/index.md); Type: object

- `pluginId` (required)
  Type: string, uuid
  
  ID reference to the plugin

- `tag` (required)
  Type: unknown
  
  The tag associated with this plugin relationship
  
  allOf:
    Reference: [Tag](https://sourcey-gauzy.pages.dev/api-reference/models/tag/index.md); Type: object

- `tagId` (required)
  Type: string, uuid
  
  ID reference to the tag

- `appliedAt` (optional)
  Type: string, date-time
  
  Date when the tag was applied to the plugin

- `appliedById` (optional)
  Type: string, uuid
  
  ID of the user who applied the tag

- `priority` (optional)
  Type: number
  
  Priority or weight of this tag association (higher values = higher priority)
  
  default: 50
  
  minimum: 0
  
  maximum: 100

- `isFeatured` (optional)
  Type: boolean
  
  Whether this tag association is featured
  
  default: false

- 404: Plugin-tag relationship not found

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/plugin-tags/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "pluginId": "123e4567-e89b-12d3-a456-426614174000",
  "tagId": "987fcdeb-51a2-43d1-9f4e-123456789abc",
  "priority": 75,
  "isFeatured": false
}'
```

### JavaScript

```javascript
const body = `{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "pluginId": "123e4567-e89b-12d3-a456-426614174000",
  "tagId": "987fcdeb-51a2-43d1-9f4e-123456789abc",
  "priority": 75,
  "isFeatured": false
}`;

const response = await fetch('http://localhost:3000/api/plugin-tags/550e8400-e29b-41d4-a716-446655440000', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "pluginId": "123e4567-e89b-12d3-a456-426614174000",
  "tagId": "987fcdeb-51a2-43d1-9f4e-123456789abc",
  "priority": 75,
  "isFeatured": false
}'''

response = requests.put(
    'http://localhost:3000/api/plugin-tags/550e8400-e29b-41d4-a716-446655440000',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
