Create Text note
PARAMETERS
The difference between rawText and text.
text (required): Text is an HTML field to display content on the editor. It helps users to identify bold, italic or any other editor functionality.
Important: If you don't have an HTML editor in your application, you can pass normal text content.
rawText (required): This helps Speak Ai to analyze text notes.
remark: If you want to pass any remarks from the user to display on Speak and also in your application.
userId: String; // optional
folderId: String, // optional
name: String, // required,
description: string, // optional
tags: [], // optional
text: "HTML content", // required
rawText: "raw text content", // required
remark: "string", // optional
Webhook Callback URL:
- If you created a webhook for text events and want to receive a callback to a specific URL for this text note, you can assign callbackUrl - string in a req.body.
- Speak will consider the callbackUrl and will skip the callbackUrl created via Webhook API.
Response
You can select from the examples attached to this API endpoint or find below:
{
"status": "success",
"data": {
"mediaId": "xxxxxxxxx",
"folderId": ""
}
}
Request rules. Nothing in the body is unconditionally required. The body is validated, and any property not listed below is rejected with a 400, so do not send extra keys.
In practice: send name, text and rawText. If you omit name, the note is titled with the creation timestamp in YYYY-MM-DD HH:mm:ss form. If rawText is missing or empty the note is saved but never analyzed, so you get no insights, sentiment, keywords or search embeddings for it.
folderId: if you omit it or send an empty string, the note goes into the first folder belonging to the note owner, and one is created for them if they have none. The folder actually used comes back in the response.
count: if you omit it, word and character counts are calculated from rawText. If you send it, your numbers are stored as given and no counting is done.
tags: only the comma separated string form is saved on this endpoint. An array passes validation and is then discarded, leaving the note with no tags.
Billing: if the workspace has no text note credit left, the request still returns HTTP 200, but the body carries a failed status with code 402 and no note is created.
Request
- Base URL: https://api.speakai.co/v1
- URL: https://api.speakai.co/v1/text/create
- Auth: API key in header x-speakai-key and API key in header x-access-token
Request body
Response
OK
Changes
No recorded changes to this operation across all 2 revisions of this API.