Skip to content
nsin docs

List your support tickets

GET
/tickets
curl --request GET \
--url https://api.nsin.ir/tickets \
--header 'Authorization: Bearer <token>'

Your support tickets, most recently updated first, without their messages. is_unread is true on an open ticket whose newest message is a reply from support you have not read yet.

Tickets.

Media type application/json
Array
object
id
integer
user_id
integer
subject
string
status
string
Allowed values: open closed
closed_at
string format: date-time
closed_by_user_id
integer
closed_reason

Why the ticket is closed: staff when a person closed it, auto when it closed itself after ticket_auto_close_days without a new message. Absent while open. Posting a message to an auto closed ticket reopens it; a staff close is final.

string
user_last_read_message_id

The newest message you have read; replies after it are unread.

integer
staff_last_read_message_id

The newest message support has read.

integer
messages

The thread. Populated when fetching a single ticket.

Array<object>
object
id
integer
ticket_id
integer
author_user_id
integer
author

The message author.

object
key
additional properties
any
body
string
is_staff

True when written by support staff.

boolean
attachments
Array<object>
object
id
integer
message_id
integer
original_name
string
content_type
string
size_bytes
integer
url

Where to download the attachment.

string
created_at
string format: date-time
edited_at

When the message was last edited. Absent on a message that has never been edited — render the “edited” marker off this field, not off updated_at.

string format: date-time
edited_by_user_id

Who made the last edit. Absent on a message that has never been edited.

integer
edit_count

How many times the message has been edited. 0 for an untouched message.

integer
created_at
string format: date-time
updated_at
string format: date-time
is_unread

There are replies you have not read.

boolean
Example
[
{
"status": "open"
}
]

Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}