Skip to main content
This page covers ticket creation from a native app: loading the ticket form you configured in AGO, rendering its fields, and submitting the ticket. Paths are relative to https://your-workspace.api.useago.com/api/sdk/v1, and every request carries the headers described in Mobile Authentication. To configure the forms themselves, see Ticket Form Customization.

Create a Ticket

Endpoint: POST /tickets Content-Type: multipart/form-data
Send priority and typology explicitly, using the values above. Your ticketing system receives them as they are.
Response (201 Created):

Load the Ticket Form

Endpoint: GET /config AGO resolves the user’s ticket form and returns it as ticket_form in each entry of permissions. Render that form and send its id as ticket_form_id.
The response also contains agents, the home screen and other settings: see Get Config.

Form Properties

Field Properties

Option Properties

Rendering Order

The AGO widget reveals fields one at a time: subject, then typology, then priority, then each custom field in position order once the previous one is filled. Fields with always_visible appear immediately. Follow the same order so users see the form you designed.

Custom Field Values

Send one {id, value} entry per field in custom_fields, encoded as a JSON string:
  • id is the field’s external_id, or its id when external_id is empty.
  • For fields with options, value is an option’s value, not its name.
  • Checkbox values are "true" or "false".
  • Include hidden fields with their default option value.
A value that isn’t one of the field’s options is ignored and the ticket is created without it.

Ticket Form in the Conversation

When the user asks for a human, the agent can offer a ticket inside the conversation. The stream from POST /messages then contains an event like this one:
To handle it:
  1. Show your ticket form, pre-filled with ticket. The AI fills it from the conversation; the user can edit it.
  2. Create the ticket with POST /tickets, passing thread.id as conversation_id.
  3. Report the result so the agent knows the ticket exists:
If the user cancels, submit {"formData": {"success": false}}.

Kotlin (Android) Example

AgoClient is the request builder from Mobile Authentication. A Swift version is in Mobile SDK Examples.