@@ -745,28 +745,144 @@ const response = await client.events.listBy({
745745});
746746```
747747
748+ ### Messages
749+
750+ #### [ Create a message] ( https://developers.intercom.com/intercom-api-reference/reference/admin-initiated-conversation )
751+
752+ ``` typescript
753+ const response = await client .messages .create ({
754+ messageType: ' email' ,
755+ subject: ' This is our demand now' ,
756+ body: ' Destroy ponies' ,
757+ template: ' plain' ,
758+ from: {
759+ type: ' admin' ,
760+ id: ' 394051' ,
761+ },
762+ to: {
763+ type: ' user' ,
764+ id: ' 536e564f316c83104c000020' ,
765+ },
766+ });
767+ ```
768+
748769### Segments
749770
750- #### Placeholder
771+ #### [ Retrieve a segment ] ( https://developers.intercom.com/intercom-api-reference/reference/view-a-segment )
751772
752773``` typescript
774+ const response = await client .segments .find ({
775+ id: ' 123' ,
776+ includeCount: true ,
777+ });
778+ ```
779+
780+ #### [ List all segments] ( https://developers.intercom.com/intercom-api-reference/reference/list-segments )
753781
782+ ``` typescript
783+ const response = await client .segments .list ({
784+ includeCount: true ,
785+ });
754786```
755787
756788### Tags
757789
758- #### Placeholder
790+ #### [ Create or update a tag] ( https://developers.intercom.com/intercom-api-reference/reference/create-and-update-tags )
791+
792+ ##### Create
793+
794+ ``` typescript
795+ const response = await client .tags .create ({ name: ' haven' });
796+ ```
797+
798+ ##### Update
799+
800+ ``` typescript
801+ const response = await client .tags .update ({ id: ' 123' , name: ' haven' });
802+ ```
803+
804+ #### [ Delete a tag] ( https://developers.intercom.com/intercom-api-reference/reference/delete-a-tag )
805+
806+ ``` typescript
807+ const response = await client .tags .delete ({ id: ' baz' });
808+ ```
809+
810+ #### [ Attach a contact] ( https://developers.intercom.com/intercom-api-reference/reference/tag-contact )
811+
812+ ``` typescript
813+ const response = await client .tags .tagContact ({
814+ contactId: ' 123' ,
815+ tagId: ' 234' ,
816+ });
817+ ```
818+
819+ #### [ Attach a conversation] ( https://developers.intercom.com/intercom-api-reference/reference/attach-a-tag-to-a-conversation )
820+
821+ ``` typescript
822+ const response = await client .tags .tagConversation ({
823+ conversationId: ' 123' ,
824+ tagId: ' 456' ,
825+ adminId: ' 789' ,
826+ });
827+ ```
828+
829+ #### [ Tag companies] ( https://developers.intercom.com/intercom-api-reference/reference/tag-companies )
830+
831+ ``` typescript
832+ const response = await client .tags .tagCompanies ({
833+ tagName: ' gutenTag' ,
834+ companiesIds: [' 123' , ' 234' , ' 456' ],
835+ });
836+ ```
837+
838+ #### [ Untag companies] ( https://developers.intercom.com/intercom-api-reference/reference/untag-companies )
839+
840+ ``` typescript
841+ const response = await client .tags .tagCompanies ({
842+ tagName: ' gutenTag' ,
843+ companiesIds: [' 123' , ' 234' , ' 456' ],
844+ });
845+ ```
846+
847+ #### [ Untag conversation] ( https://developers.intercom.com/intercom-api-reference/reference/detach-a-tag-from-a-conversation )
759848
760849``` typescript
850+ const response = await client .tags .untagConversation ({
851+ conversationId: ' 123' ,
852+ tagId: ' 345' ,
853+ adminId: ' 678' ,
854+ });
855+ ```
856+
857+ #### [ Untag contact] ( https://developers.intercom.com/intercom-api-reference/reference/untag-contact )
858+
859+ ``` typescript
860+ const response = await client .tags .untagContact ({
861+ contactId: ' 123' ,
862+ tagId: ' 345' ,
863+ });
864+ ```
865+
866+ #### [ List all tags] ( https://developers.intercom.com/intercom-api-reference/reference/list-tags-for-an-app )
761867
868+ ``` typescript
869+ const response = await client .tags .list ();
762870```
763871
764872### Teams
765873
766- #### Placeholder
874+ #### [ Retrieve a team ] ( https://developers.intercom.com/intercom-api-reference/reference/view-a-team )
767875
768876``` typescript
877+ const response = await client .teams .find ({
878+ id: ' 123' ,
879+ });
880+ ```
769881
882+ #### [ List all teams] ( https://developers.intercom.com/intercom-api-reference/reference/list-teams )
883+
884+ ``` typescript
885+ const response = await client .teams .list ();
770886```
771887
772888## Old Version (to be removed progressively)
0 commit comments