API: Support

Tickets, replies, attachments, the public contact form and service status.

Ticket categories are technical, finance, sales and abuse_security. Attachments are uploaded first and referenced by the returned URL.

Send a contact message

POST /contact

Public endpoint behind the website's Contact form. Limited to a few requests per minute per address.

Authentication: None, this endpoint is public.

Request body (application/json)

Field Type Required Values
name string Yes
email string Yes
category string Yes general, sales, technical, billing
subject string Yes
message string Yes

Responses

  • 200 OK. Returns: message (string).
  • 422 Validation error, or not allowed in the current state
  • 429 Too many requests

Example

curl -X POST https://veneshcloud.ir/api/contact \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"my-name","email":"you@example.com","category":"general","subject":"Short summary","message":"Describe the request."}'

List your tickets

GET /tickets

Returns your tickets, optionally filtered by status.

Authentication: Send your API key or token as a bearer token.

Query parameters

Field Type Values
per_page integer
page integer
status string

Responses

  • 200 OK

Example

curl -X GET https://veneshcloud.ir/api/tickets \
  -H "Authorization: Bearer $VENESH_API_KEY" \
  -H "Accept: application/json"

Open a ticket

POST /tickets

Creates a ticket in a category with a first message.

Authentication: Send your API key or token as a bearer token.

Request body (application/json)

Field Type Required Values
category string Yes technical, finance, sales, abuse_security
sub_category string No
subject string Yes
message string Yes
attachments list of string No

Responses

  • 200 OK. Returns Ticket.

Example

curl -X POST https://veneshcloud.ir/api/tickets \
  -H "Authorization: Bearer $VENESH_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"category":"technical","subject":"Short summary","message":"Describe the request."}'

Upload an attachment

POST /tickets/attachments

Uploads an image or PDF up to 10 MB as multipart/form-data and returns a url to pass in attachments.

Authentication: Send your API key or token as a bearer token.

Request body (multipart/form-data)

Field Type Required Values
file file Yes

Responses

  • 200 OK. Returns: id (string), ref (string), url (string).

Example

curl -X POST https://veneshcloud.ir/api/tickets/attachments \
  -H "Authorization: Bearer $VENESH_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@screenshot.png"

Download a ticket attachment

GET /tickets/attachments/{attachment}

Returns the file of an attachment on one of your tickets. Only the ticket owner can download it.

Authentication: None, this endpoint is public.

Path parameters

Field Type
attachment string

Query parameters

Field Type Values
expires integer
signature string

Responses

  • 200 OK
  • 404 Not found

Example

curl -X GET https://veneshcloud.ir/api/tickets/attachments/ATTACHMENT_ID \
  -H "Accept: application/json"

Get a ticket

GET /tickets/{ticket}

Returns the ticket thread. Internal staff notes are never included.

Authentication: Send your API key or token as a bearer token.

Path parameters

Field Type
ticket integer

Responses

  • 200 OK. Returns Ticket.

Example

curl -X GET https://veneshcloud.ir/api/tickets/TICKET_ID \
  -H "Authorization: Bearer $VENESH_API_KEY" \
  -H "Accept: application/json"

Reply to a ticket

POST /tickets/{ticket}/messages

Adds a message to the thread.

Authentication: Send your API key or token as a bearer token.

Path parameters

Field Type
ticket integer

Request body (application/json)

Field Type Required Values
body string Yes
attachments list of string No

Responses

  • 200 OK

Example

curl -X POST https://veneshcloud.ir/api/tickets/TICKET_ID/messages \
  -H "Authorization: Bearer $VENESH_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"body":"Your reply."}'

Get service status

GET /status

Public endpoint behind the Service status page: overall status, each service with 90 days of daily uptime, and active, scheduled and past incidents. Cached for about 30 seconds and limited per address.

Authentication: None, this endpoint is public.

Responses

  • 200 OK. Returns StatusPage.
  • 429 Too many requests

Example

curl -X GET https://veneshcloud.ir/api/status \
  -H "Accept: application/json"

Objects

Field lists for the objects returned above.

LocalizedText

Field Type Values
en string
fa string

StatusIncident

Field Type Values
id integer
kind string incident, maintenance
impact string none, minor, major, critical
status string investigating, identified, monitoring, resolved, scheduled, in_progress, completed
title LocalizedText
body object
components list of string
scheduled_start_at string
scheduled_end_at string
started_at string
resolved_at string
created_at string
updates list of object

StatusPage

Field Type Values
status string operational, maintenance, degraded, partial_outage, major_outage
generated_at string
history_days integer
groups list of object
active_incidents list of StatusIncident
scheduled_maintenance list of StatusIncident
past_incidents list of StatusIncident

Ticket

Field Type Values
id integer
category string technical, finance, sales, abuse_security
sub_category string
subject string
status string open, pending_customer, pending_staff, resolved, closed
sla_due_at string
resolved_at string
created_at string
messages list of object