zendesk_api 0.1.11 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. data/.gitignore +3 -0
  2. data/.travis.yml +1 -3
  3. data/Gemfile +24 -0
  4. data/Gemfile.lock +75 -10
  5. data/Procfile +1 -0
  6. data/Rakefile +10 -3
  7. data/Readme.md +65 -0
  8. data/bin/zendesk +26 -0
  9. data/config.ru +6 -0
  10. data/config/mongoid.yml +81 -0
  11. data/lib/zendesk_api/actions.rb +2 -2
  12. data/lib/zendesk_api/collection.rb +15 -4
  13. data/lib/zendesk_api/console/base.rb +12 -0
  14. data/lib/zendesk_api/console/console.rb +144 -0
  15. data/lib/zendesk_api/console/extensions.rb +183 -0
  16. data/lib/zendesk_api/console/options.rb +41 -0
  17. data/lib/zendesk_api/resource.rb +12 -1
  18. data/lib/zendesk_api/resources.rb +28 -8
  19. data/lib/zendesk_api/server/base.rb +119 -0
  20. data/lib/zendesk_api/server/docs/account_settings.md +145 -0
  21. data/lib/zendesk_api/server/docs/activity_stream.md +121 -0
  22. data/lib/zendesk_api/server/docs/attachments.md +73 -0
  23. data/lib/zendesk_api/server/docs/autocomplete.md +29 -0
  24. data/lib/zendesk_api/server/docs/categories.md +193 -0
  25. data/lib/zendesk_api/server/docs/custom_roles.md +88 -0
  26. data/lib/zendesk_api/server/docs/forum_subscriptions.md +139 -0
  27. data/lib/zendesk_api/server/docs/forums.md +229 -0
  28. data/lib/zendesk_api/server/docs/group_memberships.md +229 -0
  29. data/lib/zendesk_api/server/docs/groups.md +212 -0
  30. data/lib/zendesk_api/server/docs/introduction.md +159 -0
  31. data/lib/zendesk_api/server/docs/job_statuses.md +86 -0
  32. data/lib/zendesk_api/server/docs/locales.md +124 -0
  33. data/lib/zendesk_api/server/docs/macros.md +287 -0
  34. data/lib/zendesk_api/server/docs/organizations.md +253 -0
  35. data/lib/zendesk_api/server/docs/problems.md +117 -0
  36. data/lib/zendesk_api/server/docs/requests.md +256 -0
  37. data/lib/zendesk_api/server/docs/satisfaction_ratings.md +136 -0
  38. data/lib/zendesk_api/server/docs/search.md +106 -0
  39. data/lib/zendesk_api/server/docs/sharing_agreements.md +57 -0
  40. data/lib/zendesk_api/server/docs/side_loading.md +125 -0
  41. data/lib/zendesk_api/server/docs/suspended_tickets.md +182 -0
  42. data/lib/zendesk_api/server/docs/tags.md +36 -0
  43. data/lib/zendesk_api/server/docs/ticket_audits.md +657 -0
  44. data/lib/zendesk_api/server/docs/ticket_export.md +121 -0
  45. data/lib/zendesk_api/server/docs/ticket_fields.md +277 -0
  46. data/lib/zendesk_api/server/docs/ticket_import.md +65 -0
  47. data/lib/zendesk_api/server/docs/ticket_metrics.md +125 -0
  48. data/lib/zendesk_api/server/docs/tickets.md +622 -0
  49. data/lib/zendesk_api/server/docs/topic_comments.md +221 -0
  50. data/lib/zendesk_api/server/docs/topic_subscriptions.md +140 -0
  51. data/lib/zendesk_api/server/docs/topic_votes.md +154 -0
  52. data/lib/zendesk_api/server/docs/topics.md +335 -0
  53. data/lib/zendesk_api/server/docs/triggers.md +199 -0
  54. data/lib/zendesk_api/server/docs/user_identities.md +279 -0
  55. data/lib/zendesk_api/server/docs/users.md +400 -0
  56. data/lib/zendesk_api/server/docs/views.md +505 -0
  57. data/lib/zendesk_api/server/helper.rb +104 -0
  58. data/lib/zendesk_api/server/html_renderer.rb +98 -0
  59. data/lib/zendesk_api/server/models/user_request.rb +16 -0
  60. data/lib/zendesk_api/server/models/zlib_json.rb +13 -0
  61. data/lib/zendesk_api/server/public/config.rb +26 -0
  62. data/lib/zendesk_api/server/public/favicon.ico +0 -0
  63. data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
  64. data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
  65. data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
  66. data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
  67. data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
  68. data/lib/zendesk_api/server/public/javascripts/application.js +186 -0
  69. data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +90 -0
  70. data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +96 -0
  71. data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +169 -0
  72. data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +157 -0
  73. data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +100 -0
  74. data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +218 -0
  75. data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +98 -0
  76. data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +151 -0
  77. data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +135 -0
  78. data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +275 -0
  79. data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +61 -0
  80. data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +285 -0
  81. data/lib/zendesk_api/server/public/sass/screen.scss +102 -0
  82. data/lib/zendesk_api/server/public/sass/styles.scss +5 -0
  83. data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +836 -0
  84. data/lib/zendesk_api/server/public/stylesheets/screen.css +129 -0
  85. data/lib/zendesk_api/server/public/stylesheets/styles.css +6208 -0
  86. data/lib/zendesk_api/server/templates/footer.haml +13 -0
  87. data/lib/zendesk_api/server/templates/header.haml +20 -0
  88. data/lib/zendesk_api/server/templates/index.haml +68 -0
  89. data/lib/zendesk_api/server/templates/layout.haml +44 -0
  90. data/lib/zendesk_api/server/templates/param.haml +4 -0
  91. data/lib/zendesk_api/server/templates/search.haml +23 -0
  92. data/lib/zendesk_api/server/templates/sidebar.haml +7 -0
  93. data/lib/zendesk_api/version.rb +1 -1
  94. data/spec/{association_spec.rb → core/association_spec.rb} +1 -1
  95. data/spec/{client_spec.rb → core/client_spec.rb} +1 -1
  96. data/spec/{collection_spec.rb → core/collection_spec.rb} +1 -1
  97. data/spec/{configuration_spec.rb → core/configuration_spec.rb} +1 -1
  98. data/spec/{create_resource_spec.rb → core/create_resource_spec.rb} +1 -1
  99. data/spec/{data_resource_spec.rb → core/data_resource_spec.rb} +1 -1
  100. data/spec/{inflection_spec.rb → core/inflection_spec.rb} +1 -1
  101. data/spec/{lru_cache_spec.rb → core/lru_cache_spec.rb} +1 -1
  102. data/spec/{middleware → core/middleware}/request/etag_cache_spec.rb +1 -1
  103. data/spec/{middleware → core/middleware}/request/retry_spec.rb +1 -1
  104. data/spec/{middleware → core/middleware}/request/test.jpg +0 -0
  105. data/spec/{middleware → core/middleware}/request/upload_spec.rb +1 -1
  106. data/spec/{middleware → core/middleware}/response/callback_spec.rb +1 -1
  107. data/spec/{middleware → core/middleware}/response/deflate_spec.rb +1 -1
  108. data/spec/{middleware → core/middleware}/response/gzip_spec.rb +1 -1
  109. data/spec/{middleware → core/middleware}/response/parse_iso_dates_spec.rb +1 -1
  110. data/spec/{read_resource_spec.rb → core/read_resource_spec.rb} +1 -1
  111. data/spec/{rescue_spec.rb → core/rescue_spec.rb} +1 -1
  112. data/spec/{resource_spec.rb → core/resource_spec.rb} +1 -1
  113. data/spec/{search_spec.rb → core/search_spec.rb} +1 -1
  114. data/spec/{spec_helper.rb → core/spec_helper.rb} +5 -5
  115. data/spec/{trackie_spec.rb → core/trackie_spec.rb} +1 -1
  116. data/{live → spec/live}/Readme.md +0 -0
  117. data/{live → spec/live}/activity_spec.rb +1 -1
  118. data/{live → spec/live}/audit_spec.rb +1 -1
  119. data/{live → spec/live}/bookmark_spec.rb +1 -1
  120. data/{live → spec/live}/category_spec.rb +1 -1
  121. data/{live → spec/live}/collection_spec.rb +1 -1
  122. data/{live → spec/live}/crm_spec.rb +1 -1
  123. data/{live → spec/live}/custom_role_spec.rb +1 -1
  124. data/{live → spec/live}/forum_spec.rb +1 -1
  125. data/{live → spec/live}/forum_subscription_spec.rb +1 -1
  126. data/{live → spec/live}/group_membership_spec.rb +1 -1
  127. data/{live → spec/live}/group_spec.rb +1 -1
  128. data/{live → spec/live}/identity_spec.rb +1 -1
  129. data/{live → spec/live}/locale_spec.rb +1 -1
  130. data/{live → spec/live}/macro_spec.rb +1 -1
  131. data/{live → spec/live}/mobile_device_spec.rb +1 -1
  132. data/{live → spec/live}/organization_spec.rb +1 -1
  133. data/{live → spec/live}/request_spec.rb +1 -1
  134. data/{live → spec/live}/satisfaction_rating_spec.rb +1 -1
  135. data/{live → spec/live}/setting_spec.rb +1 -1
  136. data/{live → spec/live}/suspended_ticket_spec.rb +1 -1
  137. data/{live → spec/live}/ticket_field_spec.rb +1 -1
  138. data/{live → spec/live}/ticket_metrics_spec.rb +1 -1
  139. data/{live → spec/live}/ticket_spec.rb +1 -1
  140. data/spec/live/topic_comment_spec.rb +24 -0
  141. data/{live → spec/live}/topic_spec.rb +1 -1
  142. data/{live → spec/live}/topic_subscription_spec.rb +1 -1
  143. data/{live → spec/live}/topic_vote_spec.rb +1 -1
  144. data/{live → spec/live}/upload_spec.rb +1 -1
  145. data/{live → spec/live}/user_spec.rb +1 -1
  146. data/{live → spec/live}/view_spec.rb +1 -1
  147. data/spec/macros/resource_macros.rb +1 -1
  148. data/spec/server/app_spec.rb +140 -0
  149. data/spec/server/helper_spec.rb +97 -0
  150. data/spec/server/html_renderer_spec.rb +130 -0
  151. data/spec/server/spec_helper.rb +43 -0
  152. metadata +198 -77
  153. data/live/topic_comment_spec.rb +0 -13
@@ -0,0 +1,29 @@
1
+ ## Autocompletion
2
+
3
+ ### Autocomplete Tags
4
+ `POST /api/v2/autocomplete/tags.json?name={name}`
5
+
6
+ Returns an array of registered and recent tag names that start with the specified name.
7
+ The name must be at least 2 characters in length.
8
+
9
+ #### Allowed For
10
+
11
+ * Agents
12
+
13
+ #### Using curl
14
+
15
+ ```bash
16
+ curl https://{subdomain}.zendesk.com/api/v2/autocomplete/tags.json \
17
+ -X POST -d '{"name": "att"}' -H "Accept: application/json" \
18
+ -u {email_address}:{password}
19
+ ```
20
+
21
+ #### Example Response
22
+
23
+ ```http
24
+ Status: 200 OK
25
+
26
+ {
27
+ "tags": [ "attention", "attack" ]
28
+ }
29
+ ```
@@ -0,0 +1,193 @@
1
+ ## Categories
2
+
3
+ ### JSON Format
4
+ Categories are represented as simple flat JSON objects which have the following keys:
5
+
6
+ | Name | Type | Read-only | Mandatory | Comment
7
+ | --------------- | ------- | --------- | --------- | -------
8
+ | id | integer | yes | no | Automatically assigned during creation
9
+ | url | string | yes | no | The API url of this category
10
+ | name | string | no | yes | The name of the category
11
+ | description | string | no | no | The description of the category
12
+ | position | integer | no | no | The position of this category relative to other categories
13
+ | created_at | date | yes | no | The time the category was created
14
+ | updated_at | date | yes | no | The time of the last update of the category
15
+
16
+ #### Example
17
+ ```js
18
+ {
19
+ "id": 35436,
20
+ "url": "https://company.zendesk.com/api/v2/categories/35436.json",
21
+ "name": "Self Help Articles",
22
+ "description": null,
23
+ "position": 21,
24
+ "created_at": "2009-07-20T22:55:29Z",
25
+ "updated_at": "2011-05-05T10:38:52Z"
26
+ }
27
+ ```
28
+
29
+ ### List Categories
30
+ `GET /api/v2/categories.json`
31
+
32
+ #### Availability
33
+
34
+ Accounts that have forum categories
35
+
36
+ #### Allowed For:
37
+
38
+ * Admins on non-enterprise accounts
39
+ * Admins and agents will full forum access on enterprise accounts
40
+
41
+ #### Using curl
42
+
43
+ ```bash
44
+ curl https://{subdomain}.zendesk.com/api/v2/categories.json \
45
+ -v -u {email_address}:{password}
46
+ ```
47
+
48
+ #### Example Response
49
+
50
+ ```http
51
+ Status: 200 OK
52
+
53
+ {
54
+ "categories": [
55
+ {
56
+ "id": 35436,
57
+ "name": "Self Help Articles",
58
+ "description": null,
59
+ "position": 21,
60
+ "created_at": "2009-07-20T22:55:29Z",
61
+ "updated_at": "2011-05-05T10:38:52Z"
62
+ },
63
+ {
64
+ "id": 12,
65
+ "name": "News",
66
+ "description": "Announcements about routine maintenance, scheduled downtime, and new features.",
67
+ "position": 28,
68
+ "created_at": "2011-07-20T04:31:29Z",
69
+ "updated_at": "2012-02-02T10:32:59Z"
70
+ }
71
+ ]
72
+ }
73
+ ```
74
+
75
+ ### Show Category
76
+ `GET /api/v2/categories/{id}.json`
77
+
78
+ #### Allowed For
79
+
80
+ * Admins
81
+ * Anyone who can access at least one forum in the category
82
+
83
+ #### Using curl
84
+
85
+ ```bash
86
+ curl https://{subdomain}.zendesk.com/api/v2/categories/{id}.json \
87
+ -v -u {email_address}:{password}
88
+ ```
89
+
90
+ #### Example Response
91
+
92
+ ```http
93
+ Status: 200 OK
94
+
95
+ {
96
+ "category": {
97
+ "id": 12,
98
+ "name": "News",
99
+ "description": "Announcements about routine maintenance, scheduled downtime, and new features.",
100
+ "position": 28,
101
+ "created_at": "2011-07-20T04:31:29Z",
102
+ "updated_at": "2012-02-02T10:32:59Z"
103
+ }
104
+ }
105
+ ```
106
+
107
+ ### Create Category
108
+ `POST /api/v2/categories.json`
109
+
110
+ #### Allowed For
111
+
112
+ * Admins on non-enterprise accounts
113
+ * Admins and agents will full forum access on enterprise accounts
114
+
115
+ #### Using curl
116
+
117
+ ```bash
118
+ curl https://{subdomain}.zendesk.com/api/v2/categories.json \
119
+ -H "Content-Type: application/json" -d '{"category": {"name": "My Category"}}' \
120
+ -v -u {email_address}:{password} -X POST
121
+ ```
122
+
123
+ #### Example Response
124
+
125
+ ```http
126
+ Status: 201 Created
127
+ Location: https://{subdomain}.zendesk.com/api/v2/categories/{id}.json
128
+
129
+ {
130
+ "category": {
131
+ "id": 14215,
132
+ "name": "My Category",
133
+ "description": null,
134
+ "position": 9999,
135
+ "created_at": "2012-02-02T04:31:29Z",
136
+ "updated_at": "2012-02-02T04:31:29Z"
137
+ }
138
+ }
139
+ ```
140
+
141
+ ### Update Category
142
+ `PUT /api/v2/category/{id}.json`
143
+
144
+ #### Allowed For
145
+
146
+ * Admins on non-enterprise accounts
147
+ * Admins and agents will full forum access on enterprise accounts
148
+
149
+ #### Using curl
150
+
151
+ ```bash
152
+ curl https://{subdomain}.zendesk.com/api/v2/categories/{id}.json \
153
+ -H "Content-Type: application/json" -d '{"category": {"name": "The Category About Nothing"}}' \
154
+ -v -u {email_address}:{password} -X PUT
155
+ ```
156
+
157
+ #### Example Response
158
+
159
+ ```http
160
+ Status: 200 OK
161
+
162
+ {
163
+ "category": {
164
+ "id": 14215,
165
+ "name": "The Category About Nothing",
166
+ "description": null,
167
+ "position": 9999,
168
+ "created_at": "2012-02-02T04:31:29Z",
169
+ "updated_at": "2012-03-10T14:51:08Z"
170
+ }
171
+ }
172
+ ```
173
+
174
+ ### Delete Category
175
+ `DELETE /api/v2/categories/{id}.json`
176
+
177
+ #### Allowed For
178
+
179
+ * Admins on non-enterprise accounts
180
+ * Admins and agents will full forum access on enterprise accounts
181
+
182
+ #### Using curl
183
+
184
+ ```bash
185
+ curl https://{subdomain}.zendesk.com/api/v2/categories/{id} \
186
+ -v -u {email_address}:{password} -X DELETE
187
+ ```
188
+
189
+ #### Example Response
190
+
191
+ ```http
192
+ Status: 200 OK
193
+ ```
@@ -0,0 +1,88 @@
1
+ ## Custom Agent Roles
2
+
3
+ Zendesk enterprise accounts have the option of providing a more granular access to their agents. This is done using custom roles, which is a specialization of the agent role. This API provides access to list the specialized roles available on the account.
4
+
5
+ ### List Custom Roles
6
+ `GET /api/v2/custom_roles.json`
7
+
8
+ #### Availability
9
+
10
+ * Accounts on the enterprise plan
11
+
12
+ #### Allowed For:
13
+
14
+ * Agents
15
+
16
+ #### Using curl
17
+
18
+ ```bash
19
+ curl https://{subdomain}.zendesk.com/api/v2/custom_roles.json \
20
+ -v -u {email_address}:{password}
21
+ ```
22
+
23
+ #### Example Response
24
+
25
+ ```http
26
+ Status: 200 OK
27
+
28
+ {
29
+ "custom_roles": [
30
+ {
31
+ "id": 16,
32
+ "name": "Advisor",
33
+ "description": "Advisors manage the workflow and configure the help desk. They create or manage automations, macros, triggers, views, and SLA targets. They also set up channels and extensions. Advisors don't solve tickets, they can only make private comments.",
34
+ "created_at": "2012-03-12T16:32:22Z",
35
+ "updated_at": "2012-03-12T16:32:22Z",
36
+ "configuration": {
37
+ "chat_access": true,
38
+ "end_user_profile": "readonly",
39
+ "forum_access": "readonly",
40
+ "forum_access_restricted_content": false,
41
+ "macro_access": "full",
42
+ "manage_business_rules": true,
43
+ "manage_dynamic_content": false,
44
+ "manage_extensions_and_channels": true,
45
+ "manage_facebook": false,
46
+ "organization_editing": false,
47
+ "report_access": "none",
48
+ "ticket_access": "within-groups",
49
+ "ticket_comment_access": "private",
50
+ "ticket_deletion": false,
51
+ "ticket_editing": true,
52
+ "ticket_merge": false,
53
+ "ticket_tag_editing": true,
54
+ "twitter_search_access": true,
55
+ "view_access": "full"
56
+ },
57
+ },
58
+ {
59
+ "id": 6,
60
+ "name": "Staff",
61
+ "description": "A Staff agent's primary role is to solve tickets. They can edit tickets within their groups, view reports, and add or edit personal views and macros.",
62
+ "created_at": "2011-07-20T04:31:29Z",
63
+ "updated_at": "2012-02-02T10:32:59Z",
64
+ "configuration": {
65
+ "chat_access": true,
66
+ "end_user_profile": "readonly",
67
+ "forum_access": "readonly",
68
+ "forum_access_restricted_content": false,
69
+ "macro_access": "full",
70
+ "manage_business_rules": true,
71
+ "manage_dynamic_content": false,
72
+ "manage_extensions_and_channels": true,
73
+ "manage_facebook": false,
74
+ "organization_editing": false,
75
+ "report_access": "none",
76
+ "ticket_access": "within-groups",
77
+ "ticket_comment_access": "private",
78
+ "ticket_deletion": false,
79
+ "ticket_editing": true,
80
+ "ticket_merge": false,
81
+ "ticket_tag_editing": true,
82
+ "twitter_search_access": true,
83
+ "view_access": "full"
84
+ },
85
+ }
86
+ ]
87
+ }
88
+ ```
@@ -0,0 +1,139 @@
1
+ ## Forum Subscriptions
2
+
3
+ ### JSON Format
4
+ Forum subscriptions are links between users and forums they subscribe to
5
+
6
+ | Name | Type | Read-only | Mandatory | Comment
7
+ | --------------- | ------- | --------- | --------- | -------
8
+ | id | integer | yes | no | Automatically assigned upon creation
9
+ | forum_id | integer | no | yes | The forum being subscribed to
10
+ | user_id | integer | no | yes | The user subscribed to the forum
11
+ | created_at | date | yes | no | The time the subscription was created
12
+
13
+ #### Example
14
+ ```js
15
+ {
16
+ "id": 35436,
17
+ "forum_id": 32,
18
+ "user_id": 482,
19
+ "created_at": "2009-07-20T22:55:29Z"
20
+ }
21
+ ```
22
+
23
+ ### List Forum Subscriptions
24
+ `GET /api/v2/forum/{forum_id}/subscriptions.json`
25
+
26
+ `GET /api/v2/forum_subscriptions.json`
27
+
28
+ #### Allowed For:
29
+
30
+ * Agents
31
+
32
+ #### Using curl
33
+
34
+ ```bash
35
+ curl https://{subdomain}.zendesk.com/api/v2/forum_subscriptions.json \
36
+ -v -u {email_address}:{password}
37
+ ```
38
+
39
+ #### Example Response
40
+
41
+ ```http
42
+ Status: 200 OK
43
+
44
+ {
45
+ "forum_subscriptions": [
46
+ {
47
+ "id": 35436,
48
+ "forum_id": 32,
49
+ "user_id": 482,
50
+ "created_at": "2009-07-20T22:55:29Z"
51
+ },
52
+ {
53
+ "id": 43681,
54
+ "forum_id": 334,
55
+ "user_id": 9471,
56
+ "created_at": "2011-08-22T21:12:09Z"
57
+ }
58
+ ]
59
+ }
60
+ ```
61
+
62
+ ### Show Forum Subscription
63
+ `GET /api/v2/forum_subscriptions/{id}.json`
64
+
65
+ #### Allowed For:
66
+
67
+ * Agents
68
+
69
+ #### Using curl
70
+
71
+ ```bash
72
+ curl https://{subdomain}.zendesk.com/api/v2/forum_subscriptions/{id}.json \
73
+ -v -u {email_address}:{password}
74
+ ```
75
+
76
+ #### Example Response
77
+
78
+ ```http
79
+ Status: 200 OK
80
+
81
+ {
82
+ "forum_subscription": {
83
+ "id": 35436,
84
+ "forum_id": 32,
85
+ "user_id": 482,
86
+ "created_at": "2009-07-20T22:55:29Z"
87
+ }
88
+ }
89
+ ```
90
+
91
+ ### Create Forum Subscription
92
+ `POST /api/v2/forum_subscriptions.json`
93
+
94
+ #### Allowed For:
95
+
96
+ * Agents
97
+
98
+ #### Using curl
99
+
100
+ ```bash
101
+ curl https://{subdomain}.zendesk.com/api/v2/forum_subscriptions.json \
102
+ -d '{"user_id": 772, "forum_id": 881}' \
103
+ -v -u {email_address}:{password} -X POST
104
+ ```
105
+
106
+ #### Example Response
107
+
108
+ ```http
109
+ Status: 200 OK
110
+
111
+ {
112
+ "forum_subscription": {
113
+ "id": 55436,
114
+ "forum_id": 881,
115
+ "user_id": 772,
116
+ "created_at": "2012-04-20T22:55:29Z"
117
+ }
118
+ }
119
+ ```
120
+
121
+ ### Delete Forum Subscription
122
+ `DELETE /api/v2/forum_subscriptions/{id}.json`
123
+
124
+ #### Allowed For
125
+
126
+ * Agents
127
+
128
+ #### Using curl
129
+
130
+ ```bash
131
+ curl https://{subdomain}.zendesk.com/api/v2/forum_subscriptions/{id}.json \
132
+ -v -u {email_address}:{password} -X DELETE
133
+ ```
134
+
135
+ #### Example Response
136
+
137
+ ```http
138
+ Status: 200 OK
139
+ ```