Skip to content

Commit daec7cf

Browse files
markdennis22claude
andauthored
Docs : Add notes support to Company API endpoints (#314)
* docs * Add notes field to company API endpoint responses - Updated PUT /companies/{id} endpoint to include notes in response - Updated GET /companies endpoint to include notes in response - Updated POST /companies/list endpoint to include notes in response - Updated GET /companies/scroll endpoint to include notes in response - Updated POST /contacts/{id}/companies endpoint to include notes in response All company endpoints now consistently return the notes field with the same structure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * update docs * Add company_note and company_note_list schemas for company-specific notes * Add GET /companies/{id}/notes endpoint Added new endpoint to list all notes associated with a company. This follows the same pattern as the existing /contacts/{id}/notes endpoint. - Added endpoint definition at /companies/{id}/notes - Created company_note_list schema for paginated response - Included proper error handling for company not found 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * removed redundant company_note_list * Update notes endpoint summaries for clarity - Changed "List all notes" to "List all company notes" for /companies/{id}/notes - Changed "List all notes" to "List all contact notes" for /contacts/{id}/notes This makes the API documentation more specific and clearer about what type of notes each endpoint returns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent c9c3a26 commit daec7cf

File tree

1 file changed

+202
-2
lines changed

1 file changed

+202
-2
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 202 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,6 +2677,12 @@ paths:
26772677
segments:
26782678
type: segment.list
26792679
segments: []
2680+
notes:
2681+
type: note.list
2682+
data: []
2683+
url: "/companies/6762f0761bb69f9f2193bae2/notes"
2684+
total_count: 0
2685+
has_more: false
26802686
plan: {}
26812687
custom_attributes:
26822688
creation_source: api
@@ -2817,6 +2823,12 @@ paths:
28172823
segments:
28182824
type: segment.list
28192825
segments: []
2826+
notes:
2827+
type: note.list
2828+
data: []
2829+
url: "/companies/6762f07a1bb69f9f2193baea/notes"
2830+
total_count: 0
2831+
has_more: false
28202832
plan: {}
28212833
custom_attributes: {}
28222834
pages:
@@ -2900,6 +2912,12 @@ paths:
29002912
segments:
29012913
type: segment.list
29022914
segments: []
2915+
notes:
2916+
type: note.list
2917+
data: []
2918+
url: "/companies/6762f0761bb69f9f2193bae2/notes"
2919+
total_count: 0
2920+
has_more: false
29032921
plan: {}
29042922
custom_attributes: {}
29052923
schema:
@@ -2980,6 +2998,12 @@ paths:
29802998
segments:
29812999
type: segment.list
29823000
segments: []
3001+
notes:
3002+
type: note.list
3003+
data: []
3004+
url: "/companies/6762f0841bb69f9f2193baff/notes"
3005+
total_count: 0
3006+
has_more: false
29833007
plan: {}
29843008
custom_attributes: {}
29853009
schema:
@@ -3196,6 +3220,109 @@ paths:
31963220
message: Access Token Invalid
31973221
schema:
31983222
"$ref": "#/components/schemas/error"
3223+
"/companies/{id}/notes":
3224+
get:
3225+
summary: List all company notes
3226+
parameters:
3227+
- name: id
3228+
in: path
3229+
required: true
3230+
description: The unique identifier for the company which is given by Intercom
3231+
example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3232+
schema:
3233+
type: string
3234+
- name: Intercom-Version
3235+
in: header
3236+
schema:
3237+
"$ref": "#/components/schemas/intercom_version"
3238+
tags:
3239+
- Notes
3240+
- Companies
3241+
operationId: listCompanyNotes
3242+
description: You can fetch a list of notes that are associated to a company.
3243+
responses:
3244+
'200':
3245+
description: Successful response
3246+
content:
3247+
application/json:
3248+
examples:
3249+
Successful response:
3250+
value:
3251+
type: list
3252+
data:
3253+
- type: note
3254+
id: '26'
3255+
created_at: 1733932587
3256+
company:
3257+
type: company
3258+
id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3259+
author:
3260+
type: admin
3261+
id: '991267581'
3262+
name: Ciaran122 Lee
3263+
3264+
away_mode_enabled: false
3265+
away_mode_reassign: false
3266+
away_status_reason_id: null
3267+
has_inbox_seat: true
3268+
team_ids: []
3269+
team_priority_level: {}
3270+
body: "<p>This is a note.</p>"
3271+
- type: note
3272+
id: '25'
3273+
created_at: 1733846187
3274+
company:
3275+
type: company
3276+
id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3277+
author:
3278+
type: admin
3279+
id: '991267581'
3280+
name: Ciaran122 Lee
3281+
3282+
away_mode_enabled: false
3283+
away_mode_reassign: false
3284+
body: "<p>This is a note.</p>"
3285+
- type: note
3286+
id: '24'
3287+
created_at: 1733846187
3288+
company:
3289+
type: company
3290+
id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3291+
author:
3292+
type: admin
3293+
id: '991267581'
3294+
name: Ciaran122 Lee
3295+
3296+
away_mode_enabled: false
3297+
away_mode_reassign: false
3298+
away_status_reason_id: null
3299+
has_inbox_seat: true
3300+
team_ids: []
3301+
team_priority_level: {}
3302+
body: "<p>This is a note.</p>"
3303+
total_count: 3
3304+
pages:
3305+
type: pages
3306+
next:
3307+
page: 1
3308+
per_page: 50
3309+
total_pages: 1
3310+
schema:
3311+
"$ref": "#/components/schemas/note_list"
3312+
'404':
3313+
description: Company not found
3314+
content:
3315+
application/json:
3316+
examples:
3317+
Company not found:
3318+
value:
3319+
type: error.list
3320+
request_id: 57055cde-3d0d-4c67-b5c9-b20b80340bf0
3321+
errors:
3322+
- code: company_not_found
3323+
message: Company Not Found
3324+
schema:
3325+
"$ref": "#/components/schemas/error"
31993326
"/companies/list":
32003327
post:
32013328
summary: List all companies
@@ -3266,6 +3393,12 @@ paths:
32663393
segments:
32673394
type: segment.list
32683395
segments: []
3396+
notes:
3397+
type: note.list
3398+
data: []
3399+
url: "/companies/6762f0941bb69f9f2193bb25/notes"
3400+
total_count: 0
3401+
has_more: false
32693402
plan: {}
32703403
custom_attributes: {}
32713404
pages:
@@ -3351,6 +3484,12 @@ paths:
33513484
segments:
33523485
type: segment.list
33533486
segments: []
3487+
notes:
3488+
type: note.list
3489+
data: []
3490+
url: "/companies/6762f0971bb69f9f2193bb2b/notes"
3491+
total_count: 0
3492+
has_more: false
33543493
plan: {}
33553494
custom_attributes: {}
33563495
pages:
@@ -3416,6 +3555,12 @@ paths:
34163555
segments:
34173556
type: segment.list
34183557
segments: []
3558+
notes:
3559+
type: note.list
3560+
data: []
3561+
url: "/companies/6762f09a1bb69f9f2193bb34/notes"
3562+
total_count: 0
3563+
has_more: false
34193564
plan: {}
34203565
custom_attributes: {}
34213566
schema:
@@ -3666,7 +3811,7 @@ paths:
36663811
"$ref": "#/components/schemas/error"
36673812
"/contacts/{id}/notes":
36683813
get:
3669-
summary: List all notes
3814+
summary: List all contact notes
36703815
parameters:
36713816
- name: id
36723817
in: path
@@ -16475,6 +16620,19 @@ components:
1647516620
type: array
1647616621
items:
1647716622
"$ref": "#/components/schemas/segment"
16623+
notes:
16624+
type: object
16625+
description: The list of notes associated with the company
16626+
properties:
16627+
type:
16628+
type: string
16629+
description: The type of the object
16630+
enum:
16631+
- note.list
16632+
notes:
16633+
type: array
16634+
items:
16635+
"$ref": "#/components/schemas/company_note"
1647816636
company_attached_contacts:
1647916637
title: Company Attached Contacts
1648016638
type: object
@@ -21089,7 +21247,7 @@ components:
2108921247
note_list:
2109021248
title: Paginated Response
2109121249
type: object
21092-
description: A paginated list of notes associated with a contact.
21250+
description: A paginated list of notes associated with a contact or a company.
2109321251
properties:
2109421252
type:
2109521253
type: string
@@ -21107,6 +21265,48 @@ components:
2110721265
example: 1
2110821266
pages:
2110921267
"$ref": "#/components/schemas/cursor_pages"
21268+
company_note:
21269+
title: Company Note
21270+
type: object
21271+
x-tags:
21272+
- Notes
21273+
description: Notes allow you to annotate and comment on companies.
21274+
properties:
21275+
type:
21276+
type: string
21277+
description: String representing the object's type. Always has the value
21278+
`note`.
21279+
example: note
21280+
id:
21281+
type: string
21282+
description: The id of the note.
21283+
example: '17495962'
21284+
created_at:
21285+
type: integer
21286+
format: timestamp
21287+
description: The time the note was created.
21288+
example: 1674589321
21289+
company:
21290+
type: object
21291+
description: Represents the company that the note was created about.
21292+
nullable: true
21293+
properties:
21294+
type:
21295+
type: string
21296+
description: String representing the object's type. Always has the value
21297+
`company`.
21298+
example: company
21299+
id:
21300+
type: string
21301+
description: The id of the company.
21302+
example: 6329bd9ffe4e2e91dac76188
21303+
author:
21304+
"$ref": "#/components/schemas/admin"
21305+
description: Optional. Represents the Admin that created the note.
21306+
body:
21307+
type: string
21308+
description: The body text of the note.
21309+
example: "<p>Text for the note.</p>"
2111021310
open_conversation_request:
2111121311
title: Open Conversation Request
2111221312
type: object

0 commit comments

Comments
 (0)