Self-host & build › Developers › Send responses with the API
Send responses with the API
Send a response from your own server with one POST request and an API key.
Your server can send a response to Looona without a form: a crash report, a cancellation reason, a message from your app. It lands in the Inbox and goes to the destination you name, like a form's response.
You need an API key. To try requests first, use the Sandbox.
The request
https://feedback.acme.com stands for your Looona address. On looona.com, it's https://api.looona.com.
Terminal
curl https://feedback.acme.com/api/reports \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: sk_your_key' \
--data-raw '{
"report": {
"name": "Export to CSV freezes on big projects",
"content": "{\"message\":\"The tab freezes with 4,000 tasks.\",\"plan\":\"Team\"}",
"status": "NEW",
"userIdentifier": "[email protected]",
"groupIdentifier": "Fernhill Studio",
"extra": "",
"reporter": "3f1c9a52-7d4e-4b8a-9c61-2e5f0b7a1d93"
}
}'
The fields
| Field | What it is |
|---|---|
name | The title. Required. |
content | The answers, as a JSON object in a string. Each key shows under its name. Required. |
status | NEW, IN_PROGRESS or DONE. Required. |
userIdentifier | Who sent it, or null. |
groupIdentifier | Their team or company, or null. |
extra | More data kept with the response, as a JSON object in a string, or "". Not shown in the message. |
reporter | The destination's ID, from its page under Advanced. Leave it out to keep the response in Looona only. |
layout | Optional. How the destination shows it, in Markdown with each key as {{key}}. |
layoutFormat | json when layout is in the tool's own format, with each key as ${key}. See Answers in messages. |
Without layout, the message lists every key of content under its name.
The answer
201 once the response is saved:
JSON
{
"id": "b8e2f0c4-1a37-4d6e-9f52-7c0a3e9d4b61",
"externalResource": "{\"data\":{\"url\":\"https://acme.atlassian.net/browse/WEB-483\",\"label\":\"WEB-483\"}}"
}
externalResource says what the destination did: data with a link when it was sent, or a code when it wasn't. See Delivery error codes.
Errors
| Status | Why |
|---|---|
400 | A field is missing or wrong, or the layout can't be read. errors says which. |
401 | No key, or a key that doesn't work. |
403 | The key can't send to this destination. |
413 | The body is over 100 KB. |
429 | Too many requests: 10 a minute per address. Wait retryAfter seconds. |
Good to know
- Keep the key on your server. Never put it in a web page: use a form there. See Send answers from your own code.
- A key limited to some destinations can only send to those.
- Statuses from Looona 1 (
OPEN,TO_DO,REJECTED) are still accepted, and stored as the new ones.