-
Notifications
You must be signed in to change notification settings - Fork 3
Open API doc for POST /tickets/enqueue
#232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11503,6 +11503,78 @@ paths: | |
| ticket_attributes: | ||
| _default_title_: example | ||
| _default_description_: there is a problem | ||
| "/tickets/enqueue": | ||
| post: | ||
| summary: Enqueues ticket creation and returns the enqueue status. We recommend using this endpoint if you'd like to create tickets without waiting for immediate processing. | ||
| parameters: | ||
| - name: Intercom-Version | ||
| in: header | ||
| schema: | ||
| "$ref": "#/components/schemas/intercom_version" | ||
| tags: | ||
| - Tickets | ||
| description: You can enqueue a job to create a new ticket. | ||
| operationId: enqueueCreateTicket | ||
| responses: | ||
| '200': | ||
| description: Successful response | ||
| content: | ||
| application/json: | ||
| examples: | ||
| Successful response: | ||
| value: | ||
| type: enqueue_status | ||
| status: success | ||
| job_id: 20 | ||
| job_url: https://api.intercom.io/jobs/status/20 | ||
| schema: | ||
| "$ref": "#/components/schemas/enqueue_status" | ||
| '401': | ||
| description: Unauthorized | ||
| content: | ||
| application/json: | ||
| examples: | ||
| Unauthorized: | ||
| value: | ||
| type: error.list | ||
| request_id: c7bf358f-135e-48d7-8286-a4988a8a1d9b | ||
| errors: | ||
| - code: unauthorized | ||
| message: Access Token Invalid | ||
| schema: | ||
| "$ref": "#/components/schemas/error" | ||
| '400': | ||
| description: Bad Request | ||
| content: | ||
| application/json: | ||
| examples: | ||
| Bad Request: | ||
| value: | ||
| type: error.list | ||
| request_id: c7bf358f-135e-48d7-8286-a4988a8a1456 | ||
| errors: | ||
| - code: parameter_invalid | ||
| message: "Missing required ticket }/attributes" | ||
| schema: | ||
| "$ref": "#/components/schemas/error" | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
| schema: | ||
| allOf: | ||
| - "$ref": "#/components/schemas/create_ticket_request" | ||
| properties: | ||
| skip_notifications: | ||
| type: boolean | ||
| description: Option to disable notifications when a Ticket is created. | ||
| example: true | ||
| examples: | ||
| successful_response: | ||
| summary: Successful response | ||
| value: | ||
| status: success | ||
| job_id: 20 | ||
| job_url: https://api.intercom.io/jobs/status/20 | ||
| "/tickets/{id}": | ||
| put: | ||
| summary: Update a ticket | ||
|
|
@@ -16232,11 +16304,16 @@ components: | |
| assignment: | ||
| type: object | ||
| properties: | ||
| assignee_id: | ||
| admin_assignee_id: | ||
| type: string | ||
| description: The ID of the admin to which the ticket is assigned. | ||
| If not provided, the ticket will be unassigned. | ||
| example: '123' | ||
| team_assignee_id: | ||
| type: string | ||
| description: The ID of the team to which the ticket is assigned. | ||
| If not provided, the ticket will be unassigned. | ||
| example: '8' | ||
|
Comment on lines
+16307
to
+16316
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also be included as we've updated the admin/team assignee fields for the public API. |
||
| required: | ||
| - ticket_type_id | ||
| - contacts | ||
|
|
@@ -17147,6 +17224,33 @@ components: | |
| required: | ||
| - type | ||
| - errors | ||
| enqueue_status: | ||
| title: Enqueue Status | ||
| type: enqueue_status | ||
| description: Status of the enqueued job. | ||
| properties: | ||
| type: | ||
| type: string | ||
| description: Always enqueue_status | ||
| enum: | ||
| - enqueue_status | ||
| default: enqueue_status | ||
| example: enqueue_status | ||
| status: | ||
| type: string | ||
| description: Result of the enqueue | ||
| enum: | ||
| - success | ||
| - failed | ||
| example: success | ||
| job_id: | ||
| type: string | ||
| description: Id of the job that was created. Note this is not the id of the resource being created (i.e. ticket) | ||
| example: 20 | ||
| job_url: | ||
| type: string | ||
| description: Url of the job that was created. This url should be used to fetch the status of the job. | ||
| example: https://api.intercom.io/jobs/status/20 | ||
| external_page: | ||
| title: External Page | ||
| type: object | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit but I think for missing attributes, 422 might fit this better? Wdyt
https://stackoverflow.com/questions/16133923/400-vs-422-response-to-post-of-data