nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Support

List your support tickets

gethttps://api.nsin.ir/tickets

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

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.

Responses

200Tickets.

Content type: application/json

  • idinteger
  • user_idinteger
  • subjectstring
  • statusstring
    One of: "open" "closed"
  • closed_atstring (date-time)
  • closed_by_user_idinteger
  • closed_reasonstring

    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.

  • user_last_read_message_idinteger

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

  • staff_last_read_message_idinteger

    The newest message support has read.

  • messagesarray of TicketMessage

    The thread. Populated when fetching a single ticket.

    Item fields
    • idinteger
    • ticket_idinteger
    • author_user_idinteger
    • authorobject

      The message author.

    • bodystring
    • is_staffboolean

      True when written by support staff.

    • attachmentsarray of TicketAttachment
      Item fields
      • idinteger
      • message_idinteger
      • original_namestring
      • content_typestring
      • size_bytesinteger
      • urlstring

        Where to download the attachment.

    • created_atstring (date-time)
    • edited_atstring (date-time)

      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.

    • edited_by_user_idinteger

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

    • edit_countinteger

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

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • is_unreadboolean

    There are replies you have not read.

json
[
  {
    "id": 0,
    "user_id": 0,
    "subject": "string",
    "status": "open",
    "closed_at": "2026-01-01T00:00:00Z",
    "closed_by_user_id": 0,
    "closed_reason": "string",
    "user_last_read_message_id": 0,
    "staff_last_read_message_id": 0,
    "messages": [
      {
        "id": 0,
        "ticket_id": 0,
        "author_user_id": 0,
        "author": {},
        "body": "string",
        "is_staff": true,
        "attachments": [
          {
            "id": null,
            "message_id": null,
            "original_name": null,
            "content_type": null,
            "size_bytes": null,
            "url": null
          }
        ],
        "created_at": "2026-01-01T00:00:00Z",
        "edited_at": "2026-01-01T00:00:00Z",
        "edited_by_user_id": 0,
        "edit_count": 0
      }
    ],
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-01-01T00:00:00Z",
    "is_unread": true
  }
]
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/tickets" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc