Skip to content

Commit 9111014

Browse files
committed
fix contact_id type
1 parent f529c8b commit 9111014

File tree

3 files changed

+419
-3
lines changed

3 files changed

+419
-3
lines changed

2.11.list-attach-comp.yml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
'/contacts/{contact_id}/companies':
2+
post:
3+
summary: Attach a Contact to a Company
4+
parameters:
5+
- name: Intercom-Version
6+
in: header
7+
schema:
8+
'$ref': '#/components/schemas/intercom_version'
9+
- name: contact_id
10+
in: path
11+
required: true
12+
description: The unique identifier for the contact which is given by Intercom
13+
schema:
14+
type: string
15+
tags:
16+
- Companies
17+
- Contacts
18+
operationId: attachContactToACompany
19+
description: You can attach a company to a single contact.
20+
responses:
21+
'200':
22+
description: Successful
23+
content:
24+
application/json:
25+
examples:
26+
Successful:
27+
value:
28+
type: company
29+
company_id: '1'
30+
id: 667d608d8a68186f43bafd70
31+
app_id: this_is_an_id166_that_should_be_at_least_
32+
name: company6
33+
remote_created_at: 1719492749
34+
created_at: 1719492749
35+
updated_at: 1719492749
36+
monthly_spend: 0
37+
session_count: 0
38+
user_count: 1
39+
tags:
40+
type: tag.list
41+
tags: []
42+
segments:
43+
type: segment.list
44+
segments: []
45+
plan: {}
46+
custom_attributes: {}
47+
schema:
48+
'$ref': '#/components/schemas/company'
49+
'400':
50+
description: Bad Request
51+
content:
52+
application/json:
53+
examples:
54+
Bad Request:
55+
value:
56+
type: error.list
57+
request_id: 9297dcfc-1896-43a3-a3f9-131238422ed2
58+
errors:
59+
- code: parameter_not_found
60+
message: company not specified
61+
schema:
62+
'$ref': '#/components/schemas/error'
63+
'404':
64+
description: Company Not Found
65+
content:
66+
application/json:
67+
examples:
68+
Company Not Found:
69+
value:
70+
type: error.list
71+
request_id: 32d121d8-fcbf-4c59-9c60-204f7d602f36
72+
errors:
73+
- code: company_not_found
74+
message: Company Not Found
75+
schema:
76+
'$ref': '#/components/schemas/error'
77+
'401':
78+
description: Unauthorized
79+
content:
80+
application/json:
81+
examples:
82+
Unauthorized:
83+
value:
84+
type: error.list
85+
request_id: 99739bbd-2dbe-4ce3-ae91-af23379b5cd7
86+
errors:
87+
- code: unauthorized
88+
message: Access Token Invalid
89+
schema:
90+
'$ref': '#/components/schemas/error'
91+
requestBody:
92+
content:
93+
application/json:
94+
schema:
95+
type: object
96+
required:
97+
- id
98+
properties:
99+
id:
100+
type: string
101+
description: The unique identifier for the company which is given
102+
by Intercom
103+
example: 58a430d35458202d41b1e65b
104+
examples:
105+
successful:
106+
summary: Successful
107+
value:
108+
id: 667d608d8a68186f43bafd70
109+
bad_request:
110+
summary: Bad Request
111+
value:
112+
company_not_found:
113+
summary: Company Not Found
114+
value:
115+
id: '123'
116+
get:
117+
summary: List attached companies for contact
118+
parameters:
119+
- name: contact_id
120+
in: path
121+
description: The unique identifier for the contact which is given by Intercom
122+
example: 63a07ddf05a32042dffac965
123+
required: true
124+
schema:
125+
type: string
126+
- name: Intercom-Version
127+
in: header
128+
schema:
129+
'$ref': '#/components/schemas/intercom_version'
130+
- name: page
131+
in: query
132+
required: false
133+
description: The page of results to fetch. Defaults to first page
134+
example: 1
135+
schema:
136+
type: integer
137+
- name: per_page
138+
in: query
139+
required: false
140+
description: How many results to display per page. Defaults to 15
141+
example: 15
142+
schema:
143+
type: integer
144+
tags:
145+
- Contacts
146+
- Companies
147+
operationId: listCompaniesForAContact
148+
description: You can fetch a list of companies that are associated to a contact.
149+
responses:
150+
'200':
151+
description: successful
152+
content:
153+
application/json:
154+
examples:
155+
successful:
156+
value:
157+
type: list
158+
data:
159+
- type: company
160+
company_id: '1'
161+
id: 667d60938a68186f43bafd91
162+
app_id: this_is_an_id182_that_should_be_at_least_
163+
name: company12
164+
remote_created_at: 1719492755
165+
created_at: 1719492755
166+
updated_at: 1719492755
167+
last_request_at: 1719319955
168+
monthly_spend: 0
169+
session_count: 0
170+
user_count: 1
171+
tags:
172+
type: tag.list
173+
tags: []
174+
segments:
175+
type: segment.list
176+
segments: []
177+
plan: {}
178+
custom_attributes: {}
179+
pages:
180+
type: pages
181+
next:
182+
page: 1
183+
per_page: 50
184+
total_pages: 1
185+
total_count: 1
186+
schema:
187+
'$ref': '#/components/schemas/contact_attached_companies'
188+
'404':
189+
description: Contact not found
190+
content:
191+
application/json:
192+
examples:
193+
Contact not found:
194+
value:
195+
type: error.list
196+
request_id: b9d7374d-1780-4668-bb62-0e1ff9cdab45
197+
errors:
198+
- code: not_found
199+
message: User Not Found
200+
schema:
201+
'$ref': '#/components/schemas/error'
202+
'401':
203+
description: Unauthorized
204+
content:
205+
application/json:
206+
examples:
207+
Unauthorized:
208+
value:
209+
type: error.list
210+
request_id: d211ec8c-df9b-420c-86df-23c27ad54bc5
211+
errors:
212+
- code: unauthorized
213+
message: Access Token Invalid
214+
schema:
215+
'$ref': '#/components/schemas/error'

0 commit comments

Comments
 (0)