POST
Create a ticket

Authorizations

Authorization
string
header
required

Obtain a token via POST /api/v1/oauth/token (password grant) and send it as Authorization: Bearer <token>.

Path Parameters

database
string
required

Project identifier (each project has its own database). Obtain it from GET /api/v2/data/projects.

Body

application/json
content
object
required
participants
object

Optional. An object keyed by participant role. Every participant is an object carrying a required email — never a bare email string. Each role accepts a single participant object or an array of them, so {"email": "pm@example.com"} and [{"email": "pm@example.com"}] are equivalent; the properties below show the conventional form per role.

The accepted roles are exactly those listed below. Any other key is rejected with 422, as is a participant without an email.

Addresses are stored as-is and are not validated against project membership.

plan
object
tags
string[]

Optional. Must be an array of strings.

map
string

Optional. Pin the ticket to a real drawing instead of the project geo map. Must be a map id that exists in the project; an unknown map is rejected with 422. When omitted, the ticket lands on the project geo map (created on demand).

groupId
string

Optional. The map group of the target map. If provided it must match that map's group, otherwise 422; if omitted it defaults to the target map's group. Ignored when map is omitted.

location
object

Optional placement coordinates on the target map. Ignored — and not validated — when map is omitted, because the ticket then takes the geo map's default position (52.396734, 4.848101, zoom: 18). Every coordinate must be a number, or the request is rejected with 422.

x and y are pixel coordinates in the zoom-0 tile plane of the target drawing: origin top-left, y downwards, running to renderinfo.width / 64 and renderinfo.height / 64 (read renderinfo from GET /api/v2/data/maps/{database}/{id}). They are not range-checked — a value past the edge puts the marker in the padding beside the page. See Place a ticket on a drawing for how to derive them.

Anything you omit is defaulted: x and y to 0, zoom to 18, type to IB.EdBundle.Document.Location.

Response

The created ticket document.

_id
string
_rev
string
project
string

Project (database) reference.

groupId
string

Map group reference.

map
string

Map the ticket is pinned on.

archived
string
tags
string[]
dates
object
content
object
state
object
plan
object
location
object

Position on the map. On a drawing, x/y are pixel coordinates in the zoom-0 tile plane — origin top-left, y downwards, running to renderinfo.width / 64 and renderinfo.height / 64 of the target map. latitude/longitude hold the GPS position of the phone the ticket was made on, written by the mobile apps when location services were on at that moment, and 0 otherwise — for a GIS, read these, not x/y. On the geo map the coordinates are geographic. See Place a ticket on a drawing.

participants
object
audits
object[]

Audits this ticket originated from.

comments
object[]

The ticket's comments, oldest first. Written through POST /tickets/{database}/{ticketId}/comments, and by an attachment upload.

customFields
object[]

The values filled in for the project's custom fields (Expert plan, at most three per project; defined in the project's customFields). Each entry repeats the field's definition (id, label, type and, for a choice field, richOptions) and adds the ticket's value. Absent, null or an empty array when no field was filled in; a field that was left empty has no value (or null).

Read-only through this API: POST /tickets/{database} and PATCH ignore it. See Read custom field values.