zendesk_api 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -133,7 +133,7 @@ Status: 200 OK
133
133
  #### Allowed For
134
134
 
135
135
  * Admins on non-enterprise accounts
136
- * Admins and agents will full forum access on enterprise accounts
136
+ * Admins and agents with full forum access on enterprise accounts
137
137
 
138
138
  #### Using curl
139
139
 
@@ -169,12 +169,12 @@ Location: https://{subdomain}.zendesk.com/api/v2/forums/{id}.json
169
169
  ```
170
170
 
171
171
  ### Update Forum
172
- `PUT /api/v2/forum/{id}.json`
172
+ `PUT /api/v2/forums/{id}.json`
173
173
 
174
174
  #### Allowed For
175
175
 
176
176
  * Admins on non-enterprise accounts
177
- * Admins and agents will full forum access on enterprise accounts
177
+ * Admins and agents with full forum access on enterprise accounts
178
178
 
179
179
  #### Using curl
180
180
 
@@ -213,7 +213,7 @@ Status: 200 OK
213
213
  #### Allowed For
214
214
 
215
215
  * Admins on non-enterprise accounts
216
- * Admins and agents will full forum access on enterprise accounts
216
+ * Admins and agents with full forum access on enterprise accounts
217
217
 
218
218
  #### Using curl
219
219
 
@@ -9,7 +9,7 @@ When documenting a resource, we use curly braces for identifiers, like `{subdoma
9
9
 
10
10
  ### Change Policy
11
11
 
12
- We reserves the right to add new attributes and resources to the API without advance notice. Breaking changes such as removing or renaming an attribute, may happen on an existing version of the API with two weeks notice. Major structural changes will only happen within the context of a version update.
12
+ We reserves the right to add new attributes and resources to the API without advance notice. Breaking changes such as removing or renaming an attribute, may happen on an existing version of the API with two weeks notice and deprecation of attributes are tracked in our [Changes Roadmap](changes_roadmap.html). Major structural changes will only happen within the context of a version update.
13
13
 
14
14
  ### Security and Authentication
15
15
 
@@ -67,6 +67,8 @@ We respond to unsuccessful requests with HTTP status codes in the 400 range. The
67
67
  }
68
68
  ```
69
69
 
70
+ If you see a response from a known endpoint that looks like plain text, you've probably made a syntax error in your REST call. This is a common response if you try to make a request to a nonexistent Zendesk instance.
71
+
70
72
  If you ever experience responses with status codes in the 500 range, Zendesk may be experiencing internal issues or having a scheduled maintenance (during which we send a `503 Service Unavailable` status code).
71
73
 
72
74
  Please check [@zendeskops](https://twitter.com/zendeskops) and our [status page](http://www.zendesk.com/support/system-status) in such cases for any known issues.
@@ -143,6 +145,7 @@ The response receieved will then include a top-level array of associated data un
143
145
  | [View Execution / Previewing](views.html#executing-views) | The following are automatically side-loaded if applicable: group, organization, users
144
146
  | [Topics](topics.html) | users, forums
145
147
  | [Topic Comments](topic_comments.html) | users
148
+ | [Requests](requests.html) | The following are automatically side-loaded: users, organizations
146
149
 
147
150
  **Warning: this is still experimental. If you encounter any issues, please contact <a href="mailto:support@zendesk.com">support@zendesk.com</a>. Please do not abuse this feature.**
148
151
 
@@ -153,6 +156,7 @@ The response receieved will then include a top-level array of associated data un
153
156
 
154
157
  ### API Clients from the Zendesk Developer Community
155
158
 
159
+ * [.NET Client Library by Eric Neifert](https://github.com/eneifert/ZendeskApi_v2)
156
160
  * [zendeskR by Basho Technologies (R)](https://github.com/tcash21/zendeskR)
157
161
  * [node-zendesk by Farrin Reid (node.js)](https://github.com/blakmatrix/node-zendesk)
158
162
 
@@ -1,7 +1,7 @@
1
1
  ## Macros
2
2
 
3
3
  ### JSON Format
4
- Macros are read-only and represented as simple flat JSON objects which have the following keys.
4
+ Macros are represented as simple flat JSON objects which have the following keys.
5
5
 
6
6
  | Name | Type | Comment
7
7
  | --------------- | ---------------------------| -------------------
@@ -175,6 +175,25 @@ Location: https://{subdomain}.zendesk.com/api/v2/organizations/{id}.json
175
175
  }
176
176
  ```
177
177
 
178
+ ### Create Many Organizations
179
+ `POST /api/v2/organizations/create_many.json`
180
+
181
+ #### Allowed For
182
+
183
+ * Admins
184
+
185
+ #### Using curl
186
+
187
+ ```bash
188
+ curl https://{subdomain}.zendesk.com/api/v2/organizations/create_many.json \
189
+ -H "Content-Type: application/json" -X POST -d "{\"organizations\":[{\"name\":\"My Org 1\"}, {\"name\":\"My Org 2\"}]}"
190
+ -v -u {email_address}:{password}
191
+ ```
192
+
193
+ #### Example Response
194
+
195
+ See [Job Status](job_statuses.md#show-job-status)
196
+
178
197
  ### Updating Organizations
179
198
  `PUT /api/v2/organizations/{id}.json`
180
199
 
@@ -9,11 +9,12 @@ Requests are represented as JSON objects which have the following keys:
9
9
  | ---------------- | ---------------------------------------- | --------- | --------- | -------
10
10
  | id | integer | yes | no | Automatically assigned when creating requests
11
11
  | url | string | yes | no | The API url of this request
12
- | subject | string | no | no | The value of the subject field for this request
13
- | description | string | yes | no | The first comment on the request
12
+ | subject | string | no | yes | The value of the subject field for this request
13
+ | description | string | yes | yes | The first comment on the request
14
14
  | status | string | no | no | The state of the request, "new", "open", "pending", "hold", "solved", "closed"
15
15
  | custom_fields | Array | no | no | The fields and entries for this request
16
16
  | organization_id | integer | yes | no | The organization of the requester
17
+ | requester_id | integer | yes | no | The id of the requester
17
18
  | via | [Via](ticket_audits.html#the-via-object) | yes | no | This object explains how the request was created
18
19
  | created_at | date | yes | no | When this record was created
19
20
  | updated_at | date | yes | no | When this record last got updated
@@ -29,6 +30,7 @@ Requests are represented as JSON objects which have the following keys:
29
30
  "description": "The fire is very colorful.",
30
31
  "status": "open",
31
32
  "organization_id": 509974,
33
+ "requester_id": 1462,
32
34
  "via": {
33
35
  "channel": "web"
34
36
  }
@@ -44,14 +46,16 @@ Ticket comments have the following keys:
44
46
  | --------------- | ------- | --------- | -------
45
47
  | id | integer | yes | Automatically assigned when creating events
46
48
  | body | string | yes | The actual comment made by the author
49
+ | author_id | integer | yes | The id of the author
47
50
  | attachments | array | yes | The attachments on this comment as [Attachment](attachments.md) objects
48
51
  | created_at | date | yes | When this comment was created
49
52
 
50
53
  #### Example
51
54
  ```js
52
55
  {
53
- "id": 1274,
54
- "body": "Thanks for your help!",
56
+ "id": 1274,
57
+ "body": "Thanks for your help!",
58
+ "author_id": 1,
55
59
  "attachments": [
56
60
  {
57
61
  "id": 498483,
@@ -9,7 +9,8 @@
9
9
  | subject | string | yes | no | The value of the subject field for this ticket
10
10
  | content | string | yes | no | The content that was flagged
11
11
  | cause | string | yes | no | Why the ticket was suspended
12
- | message_id | string | yes | no | The id of the email, if available
12
+ | message_id | string | yes | no | The ID of the email, if available
13
+ | ticket_id | integer | yes | no | The ticket ID this suspended email is associated with, if available
13
14
  | created_at | date | yes | no | When this record was created
14
15
  | updated_at | date | yes | no | When this record last got updated
15
16
  | via | [Via](#the-via-object) | yes | no | This object explains how the ticket was created
@@ -23,6 +24,7 @@
23
24
  "subject": "Help, my printer is on fire!",
24
25
  "content": "Out Of Office Reply",
25
26
  "cause": "Detected as spam",
27
+ "ticket_id": 67321,
26
28
  "created_at": "2009-07-20T22:55:29Z",
27
29
  "updated_at": "2011-05-05T10:38:52Z",
28
30
  "via": {
@@ -34,3 +34,112 @@ Status: 200 OK
34
34
  ]
35
35
  }
36
36
  ```
37
+
38
+ ### Show Tags
39
+ `GET /api/v2/tickets/{id}/tags.json`
40
+
41
+ #### Allowed For:
42
+
43
+ * Agents
44
+
45
+ #### Using curl
46
+
47
+ ```bash
48
+ curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
49
+ -v -u {email_address}:{password}
50
+ ```
51
+
52
+ #### Example Response
53
+
54
+ ```http
55
+ Status: 200 OK
56
+
57
+ {
58
+ "tags": [
59
+ "important",
60
+ "customer"
61
+ ]
62
+ }
63
+ ```
64
+
65
+ ### Set Tags
66
+ `POST /api/v2/tickets/{id}/tags.json`
67
+
68
+ #### Allowed For:
69
+
70
+ * Agents
71
+
72
+ #### Using curl
73
+
74
+ ```bash
75
+ curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
76
+ -v -u {email_address}:{password} -X POST \
77
+ -d '{ "tags": ["important"] }'
78
+ ```
79
+
80
+ #### Example Response
81
+
82
+ ```http
83
+ Status: 200 OK
84
+
85
+ {
86
+ "tags": [
87
+ "important"
88
+ ]
89
+ }
90
+ ```
91
+
92
+ ### Add Tags
93
+ `PUT /api/v2/tickets/{id}/tags.json`
94
+
95
+ #### Allowed For:
96
+
97
+ * Agents
98
+
99
+ #### Using curl
100
+
101
+ ```bash
102
+ curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
103
+ -v -u {email_address}:{password} -X PUT \
104
+ -d '{ "tags": ["customer"] }'
105
+ ```
106
+
107
+ #### Example Response
108
+
109
+ ```http
110
+ Status: 200 OK
111
+
112
+ {
113
+ "tags": [
114
+ "important",
115
+ "customer"
116
+ ]
117
+ }
118
+ ```
119
+
120
+ ### Remove Tags
121
+ `DELETE /api/v2/tickets/{id}/tags.json`
122
+
123
+ #### Allowed For:
124
+
125
+ * Agents
126
+
127
+ #### Using curl
128
+
129
+ ```bash
130
+ curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
131
+ -v -u {email_address}:{password} -X DELETE \
132
+ -d '{ "tags": ["customer"] }'
133
+ ```
134
+
135
+ #### Example Response
136
+
137
+ ```http
138
+ Status: 200 OK
139
+
140
+ {
141
+ "tags": [
142
+ "important"
143
+ ]
144
+ }
145
+ ```
@@ -314,6 +314,8 @@ Voice Comments have the following keys:
314
314
  | type | string | yes | Has the value `VoiceComment`
315
315
  | data | string | yes | A hash of properties about the call
316
316
  | public | boolean | yes | If true, the ticket requester can see this comment
317
+ | formatted_from | string | yes | A formatted version of the phone number which dialed the call
318
+ | formatted_to | string | yes | A formatted version of the phone number which answered the call
317
319
 
318
320
  #### Example
319
321
  ```js
@@ -321,9 +323,24 @@ Voice Comments have the following keys:
321
323
  "id": 1274,
322
324
  "type": "VoiceComment"
323
325
  "body": "Thanks for your help!",
324
- "data": TODO
325
- "formatted_from": TODO
326
- "transcription_visible": TODO
326
+ "data": {
327
+ "from": "+14156973270",
328
+ "to": "+14129996294",
329
+ "recording_url": "http//api.twilio.com/2010-04-01/Accounts/accountsid/Recordings/recording_sid",
330
+ "recording_duration": "7",
331
+ "call_duration": 60,
332
+ "call_id": 171,
333
+ "answered_by_id": 6, # not present for voicemails
334
+ "transcription_text": "Hello", # only present for voicemails with transcription enabled
335
+ "transcription_status": "completed", # only present for voicemails with transcription enabled
336
+ "started_at": 2012-11-16 223622 UTC,
337
+ "location": "San Francisco, California, United States",
338
+ "voice_transcription": true,
339
+ "outbound": false
340
+ },
341
+ "formatted_from": "+1 (123) 654-7890",
342
+ "formatted_to": "+1 (123) 325-7890",
343
+ "transcription_visible": true,
327
344
  "public": true,
328
345
  "attachments": []
329
346
  }
@@ -115,8 +115,6 @@ Tickets are ordered chronologically by created date, from oldest to newest.
115
115
 
116
116
  `GET /api/v2/organizations/{organization_id}/tickets.json`
117
117
 
118
- `GET /api/v2/views/{view_id}/tickets.json`
119
-
120
118
  `GET /api/v2/users/{user_id}/tickets/requested.json`
121
119
 
122
120
  `GET /api/v2/users/{user_id}/tickets/ccd.json`
@@ -307,6 +305,26 @@ curl https://{subdomain}.zendesk.com/api/v2/tickets/update_many.json?ids=1,2,3 \
307
305
 
308
306
  See [Job Status](job_statuses.md#show-job-status)
309
307
 
308
+ ### Mark a ticket as spam and suspend the requester
309
+ `PUT /api/v2/tickets/{id}/mark_as_spam.json`
310
+
311
+ #### Allowed For
312
+
313
+ * Agents
314
+
315
+ #### Using curl
316
+
317
+ ```bash
318
+ curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/mark_as_spam.json\
319
+ -v -u {email_address}:{password} -X PUT
320
+ ```
321
+
322
+ #### Example Response
323
+
324
+ ```http
325
+ Status: 200 OK
326
+ ```
327
+
310
328
  ### Setting Collaborators
311
329
 
312
330
  You can set collaborators on tickets by passing in an array identifying the collaboratos you wish to
@@ -47,7 +47,7 @@ TopicComments are represented as simple flat JSON objects which have the followi
47
47
  #### Allowed For:
48
48
 
49
49
  * Admins on non-enterprise accounts
50
- * Admins and agents will full forum access on enterprise accounts
50
+ * Admins and agents with full forum access on enterprise accounts
51
51
  * Users in general as permitted by the forum the topic is in
52
52
 
53
53
  #### Using curl
@@ -96,7 +96,7 @@ Status: 200 OK
96
96
  #### Allowed For
97
97
 
98
98
  * Admins on non-enterprise accounts
99
- * Admins and agents will full forum access on enterprise accounts
99
+ * Admins and agents with full forum access on enterprise accounts
100
100
  * Users in general as permitted by the forum the topic is in
101
101
 
102
102
  #### Using curl
@@ -168,7 +168,7 @@ Location: https://{subdomain}.zendesk.com/api/v2/topics/{topic_id}/comments/{id}
168
168
  These are subject to the current permission settings on the enclosing account
169
169
 
170
170
  * Admins on non-enterprise accounts
171
- * Admins and agents will full forum access on enterprise accounts
171
+ * Admins and agents with full forum access on enterprise accounts
172
172
  * The user who created the original comment
173
173
 
174
174
  #### Using curl
@@ -204,7 +204,7 @@ Status: 200 OK
204
204
  #### Allowed For
205
205
 
206
206
  * Admins on non-enterprise accounts
207
- * Admins and agents will full forum access on enterprise accounts
207
+ * Admins and agents with full forum access on enterprise accounts
208
208
  * The user who created the original comment
209
209
 
210
210
  #### Using curl
@@ -54,7 +54,7 @@ Topics are represented in JSON with the below attributes
54
54
  #### Allowed For:
55
55
 
56
56
  * Admins on non-enterprise accounts
57
- * Admins and agents will full forum access on enterprise accounts
57
+ * Admins and agents with full forum access on enterprise accounts
58
58
 
59
59
  #### Using curl
60
60
 
@@ -1,7 +1,7 @@
1
1
  ## Triggers
2
2
 
3
3
  ### JSON Format
4
- Triggers are read-only and represented as simple flat JSON objects which have the following keys.
4
+ Triggers are represented as simple flat JSON objects which have the following keys.
5
5
 
6
6
  | Name | Type | Comment
7
7
  | --------------- | ---------------------------| -------------------
@@ -196,4 +196,62 @@ Status: 200 OK
196
196
  "previous_page": null,
197
197
  "next_page": null
198
198
  }
199
+ ```
200
+
201
+ ### Create Trigger
202
+ `POST /api/v2/triggers.json`
203
+
204
+ #### Allowed For
205
+
206
+ * Agents
207
+
208
+ #### Using curl
209
+
210
+ ```bash
211
+ curl -v -u {email_address}:{password} https://{subdomain}.zendesk.com/api/v2/triggers.json \
212
+ -H "Content-Type: application/json" -X POST -d \
213
+ '{"trigger":{"title":"Roger Wilco", "all": [{ "field": "status", "operator": "is", "value": "open" }], "actions": [{ "field": "status", "value": "closed" }]}}'
214
+ ```
215
+
216
+ #### Example Response
217
+
218
+ ```http
219
+ Status: 201 Created
220
+ Location: /api/v2/trigger/{new-trigger-id}.json
221
+
222
+ {
223
+ "trigger": {
224
+ "id": 9873843,
225
+ "title": "Roger Wilco",
226
+ ...
227
+ }
228
+ }
229
+ ```
230
+
231
+ ### Update Trigger
232
+ `PUT /api/v2/triggers/{id}.json`
233
+
234
+ #### Allowed For
235
+
236
+ * Agents
237
+
238
+ #### Using curl
239
+
240
+ ```bash
241
+ curl -v -u {email_address}:{password} https://{subdomain}.zendesk.com/triggers/{id}.json \
242
+ -H "Content-Type: application/json" -X PUT -d '{"trigger":{"title":"Roger Wilco II"}}'
243
+ ```
244
+
245
+ #### Example Response
246
+
247
+ ```http
248
+ Status: 200 OK
249
+
250
+ {
251
+ "trigger": {
252
+ "id": 9873843,
253
+ "title": "Roger Wilco II",
254
+ ...
255
+ }
256
+ }
199
257
  ```