REST API · JSON

uBugtrack API

Read, create and update your tickets and your releases from your scripts, your CI or your own tools. Every request of this page can be sent for real with your API key, and gives you its code in cURL, PHP, Node.js and Python.

https://www2.ubugtrack.com/api/{api_key}/
Log in to create your API key and try the requests live Using an AI agent? Connect it with MCP instead ›

Quick start

  1. Create your API key just below. It replaces your login and password in the URL of every request.
  2. Find the id of your project with List projects.
  3. Call the API from any language. For example, the Open tickets of a project:
curl "https://www2.ubugtrack.com/api/YOUR_API_KEY/project/12/tickets/?filter_status=open"
Every endpoint below has a Try it console: choose the values, send the request with your key, look at the answer, and copy the code in your language.

Your API key

The API key identifies you: a request made with your key acts as you, on all your projects, with your rights in each project. It is unique for your account.

You must be logged in to see or create your API key.
Log in or create a free account
Keep it secret. Anyone who has your key can read and change your tickets. Use it on a server, in a script or in your CI (as a secret variable), never in the JavaScript of a web page: the API doesn't accept the requests of other web sites (no CORS) anyway. If it leaks, regenerate it: the old key stops working at once.

Requests & responses

The URL says what is done. .../tickets/ lists the tickets, .../newticket/ creates one, .../ticket/42/update updates ticket #42. The HTTP method (GET, POST...) changes nothing: there is no action hidden in it. Each endpoint of this page is marked with what it does:

Readchanges nothing Createadds tickets or a release Updatechanges a ticket

Nothing can be deleted with the API.

  • URL: https://www2.ubugtrack.com/api/{api_key}/..., in HTTPS. The ids (project, ticket, release version) are in the URL, URL encoded: version 1.2 RC1 → 1.2%20RC1.
  • Options of a read (filter_status, result_limit...): in the URL (?filter_status=open) or in the body, as JSON or form fields.
  • Data of a create or an update (title, status...): a JSON object in the body (UTF-8), with the header Content-Type: application/json. Most tools can only send a body with POST: the code samples use it.
  • Every response is a JSON object with success (true or false) and message ("Success" or the error). The HTTP status is always 200: check success.
  • Values: ids, numbers and dates are returned as strings ("id": "42"), except markdown (boolean), labels (array) and total (number). In the requests, numbers can be sent as numbers or strings.
  • Dates: date_created is YYYYMMDD ("20261105"), time_updated a Unix timestamp in seconds.

The ticket object

Returned by List tickets, Get a ticket and Update a ticket.

FieldTypeDescription
idstringNumber of the ticket in the project (#42).
date_createdstringCreation date, YYYYMMDD.
time_updatedstringLast change, Unix timestamp.
titlestringTitle.
descriptionstringDescription. < > come as &lt; &gt;.
markdownbooleanThe description is Markdown.
statusstring"0" to "6", see statuses.
prioritystring"0" to "4", see priorities.
labelsarrayNames of the labels (3 max).
label1..3string | nullIds of the labels.
external_idstringId in another tool.
assigned_displaynamestring | nullName of the assignee, null if nobody.
release_idstringId of its release, "0" if none.
{
  "id": "42",
  "date_created": "20261105",
  "time_updated": "1793923200",
  "title": "Crash when I click on Login",
  "description": "Steps to reproduce: ...",
  "markdown": true,
  "status": "1",
  "priority": "2",
  "label1": "3",
  "label2": null,
  "label3": null,
  "labels": ["Bug"],
  "external_id": "JIRA-1234",
  "assigned_displayname": "Alice",
  "release_id": "0"
}

Statuses & priorities

In the requests, give the number or the name. The responses always give the number.

Status

ValueStatusName in requests
0Waitingwaiting
1Openopen
2In progressin_progress
3Fixed/Donefixed
4Ready for Testingready_for_testing
5Closedclosed
6Won't Dowont_do

Priority

ValuePriorityName in requests
0  Lowlow
1  Normalnormal
2  Highhigh
3  Urgenturgent
4  Emergencyemergency
The workflow: a ticket is created Waiting, the team makes it Open, a developer takes it In progress then Fixed/Done, it is Ready for Testing in a release, then Closed (or Won't Do). See S.A.M.

Permissions

The API applies your role in each project, exactly like the website.

RoleRead ticketsCreate ticketsUpdate ticketsCreate releases
AdminAllYesAllYes
DeveloperAllYesAllYes
ReporterAllYesThe ones he createdNo
ViewerAllNoNoNo
External ReporterThe ones he createdYesThe ones he createdNo
Not a member (public project)AllNoNoNo

Errors

An error answers "success": false and explains the problem in message:

{
  "success": false,
  "message": "Invalid API Key"
}
MessageWhy
Missing project API KeyNo API key in the URL.
Invalid API KeyThe key doesn't exist, or it was regenerated or revoked.
Invalid requestUnknown URL: check the path.
Empty project ID, Invalid project IDThe project doesn't exist, or it is private and you are not a member.
Empty ticket ID, Invalid ticket IDThe ticket doesn't exist in this project (or, for an External Reporter, it is not his).
Invalid action ...Unknown action after the ticket id: only update exists.
Invalid Json ContentThe body is missing or is not a JSON object.
Invalid filter_status, Invalid status: ..., Invalid priority: ...A status or a priority that doesn't exist.
Nothing to update: ...The body of an update has none of the fields that can change.
You are not allowed to update this ticketYour role doesn't allow it (see permissions).
No ticket created: ...No title nor description, or your role doesn't allow it.
Ticket not created: ...The projects of its owner reached the tickets limit of their plan (500 for all their projects together on Free). When some tickets of the request were created first, they are returned with this text in warning.
Missing version and include_mode, Invalid version, Invalid include modeWrong body for a new release.
Only the Admins and Developers of the project can create a releaseYour role doesn't allow it.
Unknown release ...No release with this version name or id in the project.
Read

List projects

/api/{api_key}/projects/

The projects you are a member of: the ones you own, and the ones you were invited to, directly or through a group. Their id is used in all the other requests.

Parameters

No parameter.

Who can call it

Every user.

Response

{
  "success": true,
  "message": "Success",
  "projects": [
    {
      "id": "12",
      "name": "My App",
      "user_owner_id": "345"
    }
  ]
}
FieldTypeDescription
projects[].idstringId of the project.
projects[].namestringName of the project.
projects[].user_owner_idstringId of the user who owns the project.
Read

Get a project

/api/{api_key}/project/{project_id}

One project: a project you are a member of, or a public project.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.

Who can call it

The members of the project. Anyone for a public project.

Response

{
  "success": true,
  "message": "Success",
  "project": {
    "id": "12",
    "name": "My App",
    "user_owner_id": "345"
  }
}
FieldTypeDescription
projectobjectSame fields as in List projects.

Errors: Invalid project ID

Read

List tickets

/api/{api_key}/project/{project_id}/tickets/

The tickets of a project, by pages of 50 (up to 100). By default the tickets that are not Closed or Won't Do, sorted by status, then priority (highest first), then the newest first.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
filter_statusoption: URL or bodystring
optionaldefault: not closed
Empty: every ticket that is not Closed or Won't Do. all: every ticket. A status (number or name, e.g. 1 or open). 100: Open and In progress. 101: every status but In progress. 102: the tickets in a release.
filter_releaseoption: URL or bodystring
optional
Version name of a release: its tickets, whatever their status (1000 max). filter_status, result_start, result_limit and order are then ignored.
result_startoption: URL or bodyinteger
optionaldefault: 0
Position of the first ticket returned (offset), to get the next pages.
result_limitoption: URL or bodyinteger
optionaldefault: 50
Number of tickets returned, 100 max.
orderoption: URL or bodyinteger
optionaldefault: status
1 newest first, 2 oldest first, 3 last updated first, 4 last updated last, 5 highest priority first, 6 lowest priority first. Default: status, then priority, then newest (last updated first with filter_status=5).

Who can call it

The members of the project, anyone for a public project. An External Reporter only gets the tickets he created.

Response

{
  "success": true,
  "message": "Success",
  "total": 128,
  "tickets": [
    {
      "id": "42",
      "date_created": "20261105",
      "time_updated": "1793923200",
      "title": "Crash when I click on Login",
      "description": "Steps to reproduce: ...",
      "markdown": true,
      "status": "1",
      "priority": "2",
      "label1": "3",
      "label2": null,
      "label3": null,
      "labels": ["Bug"],
      "external_id": "JIRA-1234",
      "assigned_displayname": "Alice",
      "release_id": "0"
    }
  ]
}
FieldTypeDescription
totalnumberNumber of tickets that match the filter, all pages together. Next page while result_start + result_limit < total.
tickets[]arrayThe tickets of the page.

Errors: Invalid project ID, Invalid filter_status

The options can also be sent in the body, as JSON ({"filter_status": "open", "result_limit": 20}) or as form fields, instead of the URL.
Read

Get a ticket

/api/{api_key}/project/{project_id}/ticket/{ticket_id}

One ticket of a project.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
ticket_idin the URLinteger
required
Number of the ticket in the project: #42 → 42.

Who can call it

The members of the project, anyone for a public project. An External Reporter only gets the tickets he created.

Response

{
  "success": true,
  "message": "Success",
  "ticket": {
    "id": "42",
    "date_created": "20261105",
    "time_updated": "1793923200",
    "title": "Crash when I click on Login",
    "description": "Steps to reproduce: ...",
    "markdown": true,
    "status": "1",
    "priority": "2",
    "label1": "3",
    "label2": null,
    "label3": null,
    "labels": ["Bug"],
    "external_id": "JIRA-1234",
    "assigned_displayname": "Alice",
    "release_id": "0"
  }
}
FieldTypeDescription
ticketobjectThe ticket.

Errors: Invalid project ID, Invalid ticket ID

Update

Update a ticket

/api/{api_key}/project/{project_id}/ticket/{ticket_id}/update

Change some fields of a ticket. Only the fields given in the JSON body change, the others keep their value.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
ticket_idin the URLinteger
required
Number of the ticket in the project: #42 → 42.
titleJSON bodystring
optional
New title. HTML tags and double quotes are removed.
descriptionJSON bodystring
optional
New description: replaces the whole description.
markdownJSON bodyboolean
optional
true: the description is displayed as Markdown.
statusJSON bodyinteger | string
optional
A status: number (2) or name (in_progress).
priorityJSON bodyinteger | string
optional
A priority: number (3) or name (urgent).
external_idJSON bodystring
optional
Id of the ticket in another tool, 32 characters max.

Body example

{
  "status": "fixed",
  "priority": 2,
  "external_id": "JIRA-1234"
}

Who can call it

Admin and Developer: every ticket. Reporter and External Reporter: the tickets they created. Not a Viewer.

Response

{
  "success": true,
  "message": "Success",
  "ticket": { ...the ticket after the update... }
}
FieldTypeDescription
ticketobjectThe ticket after the update.

Errors: Invalid ticket ID, Invalid Json Content, You are not allowed to update this ticket, Invalid status: ..., Invalid priority: ..., Nothing to update: ...

The labels, the assignee and the release of a ticket can not be changed with this API.
Create

Create tickets

/api/{api_key}/project/{project_id}/newticket/

Create a ticket, or several at once. You are the creator of the ticket and you receive its notifications. The integrations of the project (Slack...) are notified like for a ticket created on the website.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
titleJSON bodystring
optional
Title. A title or a description is required. HTML tags and double quotes are removed.
descriptionJSON bodystring
optional
Description. < and > are kept as text (returned as &lt; &gt;).
markdownJSON bodyboolean
optionaldefault: false
true: the description is displayed as Markdown.
statusJSON bodyinteger | string
optionaldefault: 0 (Waiting)
A status: number or name. The words of other tools are understood too (to do, in review, done...): handy for an import. Not understood: Waiting.
priorityJSON bodyinteger | string
optionaldefault: 1 (Normal)
A priority: number or name (medium and critical are understood too). Not understood: Normal.
external_idJSON bodystring
optional
Id of the ticket in another tool, 32 characters max.
fixed_in_releaseJSON bodystring
optional
Version name of the release that contains the ticket. The release is created if it doesn't exist. Admin and Developer only, ignored for the other roles.
open_in_releaseJSON bodystring
optional
Version in which the bug was found (free text).

Body example

{
  "title": "Crash when I click on Login",
  "description": "Steps to reproduce: ...",
  "markdown": true,
  "status": "open",
  "priority": "high",
  "external_id": "JIRA-1234"
}

Several tickets in one request: put them in a tickets array.

{
  "tickets": [
    { "title": "First ticket", "priority": 2 },
    { "title": "Second ticket", "status": "open" }
  ]
}

Who can call it

Admin, Developer, Reporter and External Reporter. Not a Viewer.

Response

{
  "success": true,
  "message": "Success",
  "ticket_id": "43",
  "ticket_ids": ["43", "44"]
}
FieldTypeDescription
ticket_idstringNumber of the (first) ticket created.
ticket_idsarrayNumbers of all the tickets created. A ticket without title nor description is skipped.

Errors: Invalid Json Content, No ticket created: ..., Ticket not created: ...

Create

Create a release

/api/{api_key}/project/{project_id}/newrelease/

Create a release and put the tickets that are done in it, e.g. at the end of your build. Only the tickets that are not in a release yet are included. If the version already exists, it is reused and the tickets are added to it. The integrations of the project (Slack...) are notified when tickets are included.

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
versionJSON bodystring
required
Version name of the release.
include_modeJSON bodyinteger
optionaldefault: 0
Tickets put in the release: 0 none, 1 the Closed tickets, 2 the Fixed/Done, Ready for Testing and Closed tickets.

Body example

{
  "version": "1.2.4",
  "include_mode": 2
}

Who can call it

Admin and Developer.

Response

{
  "success": true,
  "message": "Success",
  "release_id": "87"
}
FieldTypeDescription
release_idstringId of the release (new or existing).

Errors: Missing version and include_mode, Invalid version, Invalid include mode, Only the Admins and Developers of the project can create a release

Read

Get a release note

/api/{api_key}/project/{project_id}/{format}/{version}

The tickets of a release, one per line: #42 Closed Crash when I click on Login, sorted by status. Without version: the tickets Fixed/Done, Ready for Testing or Closed that are not in a release yet (what the next release will contain).

Parameters

ParameterTypeDescription
project_idin the URLinteger
required
Id of the project, given by List projects.
formatin the URLstring
required
releasenote: JSON. releasenotetext: plain text, only the lines (handy in a build script).
versionin the URLstring
optional
Version name of the release (1.2.4) or its id. Empty: the tickets done that are not in a release yet.

Who can call it

The members of the project, anyone for a public project.

Response

{
  "success": true,
  "message": "Success",
  "release": { "id": "87", "version": "1.2.4" },
  "releasenote": "#42 Closed Crash when I click on Login\n#45 Fixed/Done Export to CSV\n"
}
FieldTypeDescription
releaseobject | nullThe release: id and version. null without version.
releasenotestringThe lines of the release note.

Errors: Invalid project ID, Unknown release ...