> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/inbox/inbox-api/api-ref/tags.md).

# Tags

A Tag is an object that is used when tagging Chats and Messages.

A MessageTagging is a relationship object defining which Messages are tagged with which Tags.

A ChatTagging is a relationship object defining which Chats are tagged with which Tags.

A MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.

A ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.

## POST /api/v1/chat\_tagging/

> Assign a Tag to selected Chat.\
> \
> You cannot create the same Chat + Tag Tagging pair twice, however you can delete and create the same pair again.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"ChatTagging":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"tag":{"type":"integer","description":"ID of related Tag"},"chat":{"type":"string","title":"WhatsApp id","description":"WhatsApp ID — either a phone number in canonical form (e.g. 48123123123) or a Business-Scoped User ID (e.g. US.13491208655302741918) for users who have hidden their phone number."},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Chat is tagged."}},"required":["chat","id","tag"]}}},"paths":{"/api/v1/chat_tagging/":{"post":{"operationId":"createChatTagging","description":"Assign a Tag to selected Chat.\n\nYou cannot create the same Chat + Tag Tagging pair twice, however you can delete and create the same pair again.","tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTagging"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ChatTagging"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ChatTagging"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTagging"}}},"description":""}}}}}}
```

## GET /api/v1/chat\_tagging/{id}/

> Get a single Chat Tagging.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"ChatTagging":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"tag":{"type":"integer","description":"ID of related Tag"},"chat":{"type":"string","title":"WhatsApp id","description":"WhatsApp ID — either a phone number in canonical form (e.g. 48123123123) or a Business-Scoped User ID (e.g. US.13491208655302741918) for users who have hidden their phone number."},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Chat is tagged."}},"required":["chat","id","tag"]}}},"paths":{"/api/v1/chat_tagging/{id}/":{"get":{"operationId":"retrieveChatTagging","description":"Get a single Chat Tagging.","parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this chat tagging.","required":true}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTagging"}}},"description":""}}}}}}
```

## DELETE /api/v1/chat\_tagging/{id}/

> Remove a Tag from a Chat by deleting the Chat Tagging.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}}},"paths":{"/api/v1/chat_tagging/{id}/":{"delete":{"operationId":"destroyChatTagging","description":"Remove a Tag from a Chat by deleting the Chat Tagging.","parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this chat tagging.","required":true}],"tags":["Tags"],"responses":{"204":{"description":"No response body"}}}}}}
```

## GET /api/v1/chat\_tagging\_events/

> List all Chat tagging events for selected Chat

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"PaginatedChatTaggingEventList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ChatTaggingEvent"}}}},"ChatTaggingEvent":{"type":"object","properties":{"timestamp":{"type":"number","format":"double"},"action":{"$ref":"#/components/schemas/ActionEnum"},"tag":{"$ref":"#/components/schemas/Tag"},"chat":{"type":"string","title":"WhatsApp id","description":"WhatsApp ID — either a phone number in canonical form (e.g. 48123123123) or a Business-Scoped User ID (e.g. US.13491208655302741918) for users who have hidden their phone number.","readOnly":true},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Chat is tagged."},"done_by":{"$ref":"#/components/schemas/User"}},"required":["action","chat","done_by","tag","timestamp"]},"ActionEnum":{"enum":["added","removed"],"type":"string","description":"* `added` - Added\n* `removed` - Removed"},"Tag":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":1000},"web_inbox_color":{"type":"string","nullable":true,"description":"A Web App related setting - which color to show on the Web App frontend","maxLength":1000}},"required":["id","name"]},"User":{"type":"object","properties":{"url":{"type":"string","format":"uri","readOnly":true},"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Username that is used in combination with password during login.\n\nOnly alphanumeric characters are allowed (A-Z, a-z, 0-9)."},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"type":"string","format":"email","description":"E-mail address of this new user.\n\n"},"profile":{"allOf":[{"$ref":"#/components/schemas/UserProfile"}],"description":"Optional field used to create app users and additional admin users"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"readOnly":true,"description":"List of group objects the user belongs to (read-only)"},"group_ids":{"type":"array","items":{"type":"integer","writeOnly":true},"writeOnly":true,"description":"List of group IDs to assign to the user (write-only)"},"permissions":{"$ref":"#/components/schemas/Permissions"},"assigned_wa_ids":{"type":"array","items":{"type":"string"},"readOnly":true}},"required":["assigned_wa_ids","email","groups","id","permissions","url","username"]},"UserProfile":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/RoleEnum"}],"description":"<p>Possible values:<br>    * <code>user</code> (<strong>User</strong>) - can do everything that isn't marked as admin only in API documentation<br>    * <code>admin</code> (<strong>Admin</strong>) - can use all available API endpoints and has Inbox admin panel access<br>    * <code>app</code> (<strong>App integration</strong>) - can do everything regular users have access too, but has no access to inbox web frontend</p>\n\n* `user` - Regular user\n* `admin` - Admin\n* `app` - App integration"},"is_available":{"type":"boolean","description":"Manual status set by the user to indicate availability for communication."}}},"RoleEnum":{"enum":["user","admin","app"],"type":"string","description":"* `user` - Regular user\n* `admin` - Admin\n* `app` - App integration"},"GroupMember":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"]},"Permissions":{"type":"object","properties":{"can_use_tags":{"type":"boolean","description":"Uncheck this to disable tagging for related Users completely."},"can_read_chats":{"allOf":[{"$ref":"#/components/schemas/CanReadChatsEnum"}],"description":"<p>Possible values:<br><code>all</code> - User can read from All Chats<br>\n<code>group</code> - User can read from Only Chats assigned to User's Groups<br>\n<code>user</code> - User can read from Only Chats assigned to User directly<br>\n<code>none</code> - User can read from No Chats</p>\n\n* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"},"can_write_to_chats":{"allOf":[{"$ref":"#/components/schemas/CanWriteToChatsEnum"}],"description":"<p>Possible values:<br><code>all</code> - User can write to All Chats<br>\n<code>group</code> - User can write to Only Chats assigned to User's Groups<br>\n<code>user</code> - User can write to Only Chats assigned to User directly<br>\n<code>none</code> - User can write to No Chats</p>\n\n* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"}}},"CanReadChatsEnum":{"enum":["all","group","user","none"],"type":"string","description":"* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"},"CanWriteToChatsEnum":{"enum":["all","group","user","none"],"type":"string","description":"* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"}}},"paths":{"/api/v1/chat_tagging_events/":{"get":{"operationId":"listChatTaggingEvents","description":"List all Chat tagging events for selected Chat","parameters":[{"in":"query","name":"before_time","schema":{"type":"integer"},"description":"[POSIX timestamp](https://en.wikipedia.org/wiki/Unix_time).\n                  Returns only events that are **older** than specified `before_time`.\n\n\nThis should be used when implementing scroll of the event view from newest to oldest."},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"in":"query","name":"since_time","schema":{"type":"integer"},"description":"[POSIX timestamp](https://en.wikipedia.org/wiki/Unix_time).\n                  Returns only events that are **at the same timestamp or newer** than specified `since_time`.\n                  Note that, as opposed to `before_time` param, this param returns messages where timestamp is equal\n                  to the given value.\n\n\nThis should be used when implementing scroll of the event view from oldest to newest."},{"in":"query","name":"wa_id","schema":{"type":"string"},"description":"WhatsApp ID of related Chat"}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedChatTaggingEventList"}}},"description":""}}}}}}
```

## POST /api/v1/message\_tagging/

> Assign a Tag to selected Message.\
> \
> Note that by tagging a Message, corresponding Chat is tagged\
> automatically with the same tag.\
> \
> \
> You cannot create the same Message + Tag Tagging pair twice,\
> however you can delete and create the same pair again.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"MessageTagging":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"description":"This tagging relation ID. Used when deleting a tagging for example."},"tag":{"type":"integer","description":"ID of related Tag"},"message":{"type":"string","description":"Message ID string known from WABA payload"},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Message is tagged."}},"required":["id","message","tag"]}}},"paths":{"/api/v1/message_tagging/":{"post":{"operationId":"createMessageTagging","description":"Assign a Tag to selected Message.\n\nNote that by tagging a Message, corresponding Chat is tagged\nautomatically with the same tag.\n\n\nYou cannot create the same Message + Tag Tagging pair twice,\nhowever you can delete and create the same pair again.","tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTagging"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/MessageTagging"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MessageTagging"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTagging"}}},"description":""}}}}}}
```

## GET /api/v1/message\_tagging/{id}/

> Get a single Message Tagging.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"MessageTagging":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"description":"This tagging relation ID. Used when deleting a tagging for example."},"tag":{"type":"integer","description":"ID of related Tag"},"message":{"type":"string","description":"Message ID string known from WABA payload"},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Message is tagged."}},"required":["id","message","tag"]}}},"paths":{"/api/v1/message_tagging/{id}/":{"get":{"operationId":"retrieveMessageTagging","description":"Get a single Message Tagging.","parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this message tagging.","required":true}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageTagging"}}},"description":""}}}}}}
```

## DELETE /api/v1/message\_tagging/{id}/

> Remove a Tag from a Message by deleting the Message Tagging.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}}},"paths":{"/api/v1/message_tagging/{id}/":{"delete":{"operationId":"destroyMessageTagging","description":"Remove a Tag from a Message by deleting the Message Tagging.","parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this message tagging.","required":true}],"tags":["Tags"],"responses":{"204":{"description":"No response body"}}}}}}
```

## GET /api/v1/message\_tagging\_events/

> List all Message tagging events for selected Chat or Message

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"PaginatedMessageTaggingEventList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/MessageTaggingEvent"}}}},"MessageTaggingEvent":{"type":"object","properties":{"timestamp":{"type":"number","format":"double"},"action":{"$ref":"#/components/schemas/ActionEnum"},"tag":{"$ref":"#/components/schemas/Tag"},"message":{"type":"string","description":"Message ID string known from WABA payload"},"extra":{"nullable":true,"description":"Optional additional data. Should not be used on front-end apps. Use only to pass extra data between systems / apps / bots, when Message is tagged."},"done_by":{"$ref":"#/components/schemas/User"}},"required":["action","done_by","message","tag","timestamp"]},"ActionEnum":{"enum":["added","removed"],"type":"string","description":"* `added` - Added\n* `removed` - Removed"},"Tag":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":1000},"web_inbox_color":{"type":"string","nullable":true,"description":"A Web App related setting - which color to show on the Web App frontend","maxLength":1000}},"required":["id","name"]},"User":{"type":"object","properties":{"url":{"type":"string","format":"uri","readOnly":true},"id":{"type":"integer","readOnly":true},"username":{"type":"string","description":"Username that is used in combination with password during login.\n\nOnly alphanumeric characters are allowed (A-Z, a-z, 0-9)."},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"email":{"type":"string","format":"email","description":"E-mail address of this new user.\n\n"},"profile":{"allOf":[{"$ref":"#/components/schemas/UserProfile"}],"description":"Optional field used to create app users and additional admin users"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupMember"},"readOnly":true,"description":"List of group objects the user belongs to (read-only)"},"group_ids":{"type":"array","items":{"type":"integer","writeOnly":true},"writeOnly":true,"description":"List of group IDs to assign to the user (write-only)"},"permissions":{"$ref":"#/components/schemas/Permissions"},"assigned_wa_ids":{"type":"array","items":{"type":"string"},"readOnly":true}},"required":["assigned_wa_ids","email","groups","id","permissions","url","username"]},"UserProfile":{"type":"object","properties":{"role":{"allOf":[{"$ref":"#/components/schemas/RoleEnum"}],"description":"<p>Possible values:<br>    * <code>user</code> (<strong>User</strong>) - can do everything that isn't marked as admin only in API documentation<br>    * <code>admin</code> (<strong>Admin</strong>) - can use all available API endpoints and has Inbox admin panel access<br>    * <code>app</code> (<strong>App integration</strong>) - can do everything regular users have access too, but has no access to inbox web frontend</p>\n\n* `user` - Regular user\n* `admin` - Admin\n* `app` - App integration"},"is_available":{"type":"boolean","description":"Manual status set by the user to indicate availability for communication."}}},"RoleEnum":{"enum":["user","admin","app"],"type":"string","description":"* `user` - Regular user\n* `admin` - Admin\n* `app` - App integration"},"GroupMember":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"]},"Permissions":{"type":"object","properties":{"can_use_tags":{"type":"boolean","description":"Uncheck this to disable tagging for related Users completely."},"can_read_chats":{"allOf":[{"$ref":"#/components/schemas/CanReadChatsEnum"}],"description":"<p>Possible values:<br><code>all</code> - User can read from All Chats<br>\n<code>group</code> - User can read from Only Chats assigned to User's Groups<br>\n<code>user</code> - User can read from Only Chats assigned to User directly<br>\n<code>none</code> - User can read from No Chats</p>\n\n* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"},"can_write_to_chats":{"allOf":[{"$ref":"#/components/schemas/CanWriteToChatsEnum"}],"description":"<p>Possible values:<br><code>all</code> - User can write to All Chats<br>\n<code>group</code> - User can write to Only Chats assigned to User's Groups<br>\n<code>user</code> - User can write to Only Chats assigned to User directly<br>\n<code>none</code> - User can write to No Chats</p>\n\n* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"}}},"CanReadChatsEnum":{"enum":["all","group","user","none"],"type":"string","description":"* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"},"CanWriteToChatsEnum":{"enum":["all","group","user","none"],"type":"string","description":"* `all` - All Chats\n* `group` - Only Chats assigned to User's Groups\n* `user` - Only Chats assigned to User directly\n* `none` - No Chats"}}},"paths":{"/api/v1/message_tagging_events/":{"get":{"operationId":"listMessageTaggingEvents","description":"List all Message tagging events for selected Chat or Message","parameters":[{"in":"query","name":"before_time","schema":{"type":"integer"},"description":"[POSIX timestamp](https://en.wikipedia.org/wiki/Unix_time).\n              Returns only events that are **older** than specified `before_time`.\n\n\nThis should be used when implementing scroll of the event view from newest to oldest."},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"message_id","schema":{"type":"string"},"description":"Message ID"},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"in":"query","name":"since_time","schema":{"type":"integer"},"description":"[POSIX timestamp](https://en.wikipedia.org/wiki/Unix_time).\n              Returns only events that are **at the same timestamp or newer** than specified `since_time`.\n              Note that, as opposed to `before_time` param, this param returns messages where timestamp is equal\n              to the given value.\n\n\nThis should be used when implementing scroll of the event view from oldest to newest."},{"in":"query","name":"wa_id","schema":{"type":"string"},"description":"WhatsApp ID of related Chat"}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMessageTaggingEventList"}}},"description":""}}}}}}
```

## GET /api/v1/tags/

> List all Tags that can be used on Chats and Messages.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"PaginatedTagList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}},"Tag":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":1000},"web_inbox_color":{"type":"string","nullable":true,"description":"A Web App related setting - which color to show on the Web App frontend","maxLength":1000}},"required":["id","name"]}}},"paths":{"/api/v1/tags/":{"get":{"operationId":"listTags","description":"List all Tags that can be used on Chats and Messages.","parameters":[{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}}],"tags":["Tags"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTagList"}}},"description":""}}}}}}
```

## POST /api/v1/tags/

> Create a new Tag that can be later used to tag Messages or Chats

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}},"schemas":{"Tag":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string","maxLength":1000},"web_inbox_color":{"type":"string","nullable":true,"description":"A Web App related setting - which color to show on the Web App frontend","maxLength":1000}},"required":["id","name"]}}},"paths":{"/api/v1/tags/":{"post":{"operationId":"createTag","description":"Create a new Tag that can be later used to tag Messages or Chats","tags":["Tags"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Tag"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Tag"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":""}}}}}}
```

## DELETE /api/v1/tags/{id}/

> Delete a Tag. It is removed from every Chat and Message that has it.

```json
{"openapi":"3.0.3","info":{"title":"360dialog Inbox API","version":"1.28.0"},"tags":[{"name":"Tags","description":"A Tag is an object that is used when tagging Chats and Messages.\n\nA MessageTagging is a relationship object defining which Messages are tagged with which Tags.\n\nA ChatTagging is a relationship object defining which Chats are tagged with which Tags.\n\nA MessageTaggingEvent is a historical entry object defining which Messages were tagged with which Tags, by which User and when.\n\nA ChatTaggingEvent is a historical entry object defining which Chats were tagged with which Tags, by which User and when.\n\n"}],"servers":[{"url":"https://{YOUR_STACK_NAME}.inbox.getchat.360dialog.io/","description":"Your Inbox address. Open the Inbox from the 360dialog Hub to see it.","variables":{"YOUR_STACK_NAME":{"default":"your-stack","description":"The first part of your Inbox address"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"A user token, sent as `Token <token>`. Create a user in the admin panel (group App integration) and get its token from `POST /api/v1/auth/token/`. The channel API key (`D360-Api-Key`) is not supported."}}},"paths":{"/api/v1/tags/{id}/":{"delete":{"operationId":"destroyTag","description":"Delete a Tag. It is removed from every Chat and Message that has it.","parameters":[{"in":"path","name":"id","schema":{"type":"integer"},"description":"A unique integer value identifying this tag.","required":true}],"tags":["Tags"],"responses":{"204":{"description":"No response body"}}}}}}
```


---

# 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.360dialog.com/docs/inbox/inbox-api/api-ref/tags.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.
