API Integration

Limits

Rate limits, paging, and the size and format of files you can upload.

How much you can ask for at once, how lists are paged, and what files you can upload.

Rate limits

POST /org/competitors/suggest is limited to 5 requests per hour per organization. Over the limit, it returns 429.

Paging

Most list endpoints take limit and offset, and return a total with the rows. offset starts at 0.

bash
curl "https://apiv2.senso.ai/api/v1/org/prompts?limit=50&offset=50" \
  -H "X-API-Key: $SENSO_API_KEY"

Defaults and maximums vary by endpoint, and the API Reference states both for every operation. The response echoes the limit it applied, so read it back rather than assuming the one you sent. To page through everything, keep going until a page returns fewer rows than limit.

Many lists can also be sorted. Knowledge base lists take sort_by and sort_order; gaps, prompts and the Analytics lists take sort, and /org/analytics/prompts also takes order. The API Reference lists each one's values.

Uploads

ThingLimit
Files per upload request10
Size per file100 MB
Each file's content_type must be one of these:

Formatcontent_type
PDFapplication/pdf
Word (DOC)application/msword
Word (DOCX)application/vnd.openxmlformats-officedocument.wordprocessingml.document
Word template (DOTX)application/vnd.openxmlformats-officedocument.wordprocessingml.template
WordPerfect (WPD)application/wordperfect
Plain text (TXT)text/plain
HTMLtext/html
CSVtext/csv
Excel (XLS)application/vnd.ms-excel
Excel (XLSX)application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Excel macro-enabled (XLSM)application/vnd.ms-excel.sheet.macroEnabled.12
Excel template (XLTX)application/vnd.openxmlformats-officedocument.spreadsheetml.template
Excel macro-enabled template (XLTM)application/vnd.ms-excel.template.macroEnabled.12
Quattro Pro (QPW)application/x-quattro-pro
PowerPoint (PPT)application/vnd.ms-powerpoint
PowerPoint (PPTX)application/vnd.openxmlformats-officedocument.presentationml.presentation
PNGimage/png
APNGimage/apng
JPEGimage/jpeg
GIFimage/gif
BMPimage/bmp
TIFFimage/tiff
Photoshop (PSD)image/vnd.adobe.photoshop
ICO and CURimage/x-icon
PCXimage/x-pcx
DCXimage/x-dcx
PPMimage/x-portable-pixmap
Pixarimage/x-pixar
FTEXimage/x-ftex
Two kinds of file are refused whatever their type:

  • Markdown files, named .md or .markdown. Send their text with POST /org/kb/raw instead.
  • Word lock files, whose names start with ~$. These are temporary files Word creates, not documents.
An upload request describes each file first and returns a result for each one. A file that is too large, of a type not listed above, or refused for its name is skipped with its reason, and the others still go ahead. If no file in the request can be accepted, the response is 422.

Next steps

  • Errors — every status, and what to do about it
  • API Keys — getting a key and checking it works
  • API Reference — per-endpoint defaults, maximums and responses