Skip to content

Commit 97339a6

Browse files
committed
Add POST /companies/{id}/notes endpoint to OpenAPI spec (Unstable)
### Why? The implementation in PR #470943 adds the ability to create notes on company records via the API, but requires corresponding OpenAPI documentation. ### How? Add the POST endpoint to the Unstable version of the OpenAPI spec, following the same pattern as the existing POST /contacts/{id}/notes endpoint. <sub>Generated with Claude Code</sub>
1 parent 1820ff5 commit 97339a6

1 file changed

Lines changed: 103 additions & 0 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3323,6 +3323,109 @@ paths:
33233323
message: Company Not Found
33243324
schema:
33253325
"$ref": "#/components/schemas/error"
3326+
post:
3327+
summary: Create a company note
3328+
parameters:
3329+
- name: Intercom-Version
3330+
in: header
3331+
schema:
3332+
"$ref": "#/components/schemas/intercom_version"
3333+
- name: id
3334+
in: path
3335+
required: true
3336+
description: The unique identifier for the company which is given by Intercom
3337+
example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3338+
schema:
3339+
type: string
3340+
tags:
3341+
- Notes
3342+
- Companies
3343+
operationId: createCompanyNote
3344+
description: You can add a note to a single company.
3345+
responses:
3346+
'200':
3347+
description: Successful response
3348+
content:
3349+
application/json:
3350+
examples:
3351+
Successful response:
3352+
value:
3353+
type: note
3354+
id: '31'
3355+
created_at: 1734537390
3356+
company:
3357+
type: company
3358+
id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3359+
author:
3360+
type: admin
3361+
id: '991267583'
3362+
name: Ciaran124 Lee
3363+
email: admin124@email.com
3364+
away_mode_enabled: false
3365+
away_mode_reassign: false
3366+
body: "<p>Hello</p>"
3367+
schema:
3368+
"$ref": "#/components/schemas/note"
3369+
'404':
3370+
description: Company not found
3371+
content:
3372+
application/json:
3373+
examples:
3374+
Admin not found:
3375+
value:
3376+
type: error.list
3377+
request_id: 168f1bc3-d198-4797-8422-9f93fe8af5ad
3378+
errors:
3379+
- code: not_found
3380+
message: Resource Not Found
3381+
Company not found:
3382+
value:
3383+
type: error.list
3384+
request_id: 6f372239-0259-428f-9943-91b8f7a92162
3385+
errors:
3386+
- code: company_not_found
3387+
message: Company Not Found
3388+
schema:
3389+
"$ref": "#/components/schemas/error"
3390+
requestBody:
3391+
content:
3392+
application/json:
3393+
schema:
3394+
type: object
3395+
required:
3396+
- body
3397+
properties:
3398+
body:
3399+
type: string
3400+
description: The text of the note.
3401+
example: New note
3402+
company_id:
3403+
type: string
3404+
description: The unique identifier of a given company.
3405+
example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3406+
admin_id:
3407+
type: string
3408+
description: The unique identifier of a given admin.
3409+
example: '991267583'
3410+
examples:
3411+
successful_response:
3412+
summary: Successful response
3413+
value:
3414+
company_id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3415+
admin_id: '991267583'
3416+
body: Hello
3417+
admin_not_found:
3418+
summary: Admin not found
3419+
value:
3420+
company_id: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
3421+
admin_id: '123'
3422+
body: Hello
3423+
company_not_found:
3424+
summary: Company not found
3425+
value:
3426+
company_id: '123'
3427+
admin_id: '991267583'
3428+
body: Hello
33263429
"/companies/list":
33273430
post:
33283431
summary: List all companies

0 commit comments

Comments
 (0)