> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/monitoring-and-metadata/label-links.md).

# Label Links

Operations related to Label Links that associate labels with specific platform resources.

## POST /labels/{label\_id}/links/{labelable\_type}/{labelable\_id}

> Create label link by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Label links","description":"Operations related to Label Links that associate labels with specific platform resources."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/labels/{label_id}/links/{labelable_type}/{labelable_id}":{"post":{"description":"","tags":["Label links"],"operationId":"createLink","summary":"Create label link by id","responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"parameters":[{"style":"simple","required":true,"explode":false,"schema":{"type":"integer","format":"int64"},"description":"The label id","name":"label_id","in":"path"},{"name":"labelable_type","required":true,"explode":false,"schema":{"$ref":"#/components/schemas/LabelableType"},"description":"The type if the labelable item","style":"simple","in":"path"},{"schema":{"type":"integer","format":"int64"},"name":"labelable_id","in":"path","required":true,"explode":false,"description":"The id the labelable item","style":"simple"}]}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"LabelableType":{"type":"string","enum":["AD_GROUP","CREATIVE","DISPLAY_CAMPAIGN","EMAIL_CAMPAIGN","GOAL","SEGMENT","SERVICE_ITEM","EXPORT","IMPORT","DATA_CLEAN_ROOM_DATASET"],"readOnly":false}}}}
```

## DELETE /labels/{label\_id}/links/{labelable\_type}/{labelable\_id}

> Delete label link by id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Label links","description":"Operations related to Label Links that associate labels with specific platform resources."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/labels/{label_id}/links/{labelable_type}/{labelable_id}":{"delete":{"description":"","parameters":[{"name":"label_id","schema":{"type":"integer","format":"int64"},"explode":false,"description":"The label id","style":"simple","in":"path","required":true},{"description":"The type if the labelable item","schema":{"$ref":"#/components/schemas/LabelableType"},"explode":false,"style":"simple","in":"path","name":"labelable_type","required":true},{"name":"labelable_id","explode":false,"description":"The id the labelable item","in":"path","schema":{"type":"integer","format":"int64"},"required":true,"style":"simple"}],"operationId":"removeLink","tags":["Label links"],"summary":"Delete label link by id","responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"LabelableType":{"type":"string","enum":["AD_GROUP","CREATIVE","DISPLAY_CAMPAIGN","EMAIL_CAMPAIGN","GOAL","SEGMENT","SERVICE_ITEM","EXPORT","IMPORT","DATA_CLEAN_ROOM_DATASET"],"readOnly":false},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/monitoring-and-metadata/label-links.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
