Internal API
Assistant internal
11 endpoints.
/api/v1/internal/agent-modelsThe agents' models, what each sends and how it is rated, and the defaults (internal)
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_id | query | string (uuid) | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_AgentModelsInternalData_| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | AgentModelsInternalData | AgentModelsInternalData fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fields
|
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/attachmentsA message's photos and documents, as the model is shown them (internal)
Every file must be the business's own (422 otherwise, as the editor's send is). A photo is shown by its public URL; a video by the public address it plays at (the model reads no video: it places one by that address); a document by its words (the same decoding the website's documents get).
Authentication
X-Internal-Api-Key header.
Request bodyrequired
application/jsonAssistantAttachmentsBody| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
business_idrequired | string (uuid) | ||||||||||
attachmentsrequired | AssistantAttachmentRef[] | min items 1 · max items 10AssistantAttachmentRef[] fields
|
Responses
200Successful Responseapplication/jsonSuccessResponse_AssistantAttachmentsData_| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||
success | true | default true | ||||||
datarequired | AssistantAttachmentsData | AssistantAttachmentsData fields
| ||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/attachments/contentOne file's bytes, for the assistant's sandbox (internal)
The file as the business has it: a photo's bytes from the library, a document as it was put in (one a site change attached reads even once removed from Files); 404 for another business's.
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | query | string (uuid) | |
kindrequired | query | enum | |
idrequired | query | string |
Responses
200Successful Response400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/attachments/standingHow each of a message's files stands for the business, file by file (internal)
Every file asked about answers on its own, in order: whether it is the business's and where, and why a message may not carry it (``unavailable``). A gone file does not refuse the others; only a request naming a file no attachment could be is 422. Reads no file's contents.
Authentication
X-Internal-Api-Key header.
Request bodyrequired
application/jsonAssistantAttachmentsBodyAssistantAttachmentsBody, expanded above.
Responses
200Successful Responseapplication/jsonSuccessResponse_AssistantAttachmentStandingData_| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||
success | true | default true | ||||||
datarequired | AssistantAttachmentStandingData | AssistantAttachmentStandingData fields
| ||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/businesses/{business_id}/people/{user_id}A business as sor knows it, and one person's membership and role on it (internal)
Always 200: ``found`` false for a business sor doesn't know, never a 404.
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
user_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_AssistantBusinessPersonData_| Field | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||
datarequired | AssistantBusinessPersonData | AssistantBusinessPersonData fields
| |||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | |||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/callsBind a live call to its business, with what it starts from (internal)
Authentication
X-Internal-Api-Key header.
Request bodyrequired
application/jsonAssistantCallBody| Field | Type | Description |
|---|---|---|
call_idrequired | string | min length 1 · max length 128 |
from_number | string | null | |
to_numberrequired | string | min length 1 · max length 32 |
Responses
200Successful Responseapplication/jsonSuccessResponse_AssistantCallData_| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||
success | true | default true | |||||||||
datarequired | AssistantCallData | AssistantCallData fields
| |||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | |||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/filesA file the assistant made, kept as the business's (internal)
A picture goes into the photo library (checked and re-encoded as an upload is); anything else into Library › Files (converted as an attached document is, so the agents can read it later), downloaded through the admin API. A file SOR cannot keep answers as an upload would (413, 415, 422).
Authentication
X-Internal-Api-Key header.
Request bodyrequired
multipart/form-dataBody_internal_save_file_api_v1_internal_assistant_files_post| Field | Type | Description |
|---|---|---|
business_idrequired | string (uuid) | |
filerequired | string |
Responses
201Successful Responseapplication/jsonSuccessResponse_AssistantSavedFile_| Field | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||||||||||||||
success | true | default true | ||||||||||||||||||||||||
datarequired | AssistantSavedFile | AssistantSavedFile fields
| ||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/filesA file the assistant made and then made again: the earlier copy goes (internal)
The earlier draft leaves as the owner's Remove would take it: a photo a record took up meanwhile stays (409 PHOTO_IN_USE); one already gone is 404.
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | query | string (uuid) | |
kindrequired | query | enum | |
idrequired | query | string |
Responses
204Successful Response400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/mention-emailsEmail the people an Ask Keystone reply mentioned (internal)
Sent by the rules every notification keeps (``services/notifications``): only the business's own people, each person's settings, the daily cap, and once per thread and reply.
Authentication
X-Internal-Api-Key header.
Request bodyrequired
application/jsonAssistantMentionEmailsBody| Field | Type | Description |
|---|---|---|
business_idrequired | string (uuid) | |
thread_idrequired | string | min length 1 · max length 200 |
member_idsrequired | string (uuid)[] | min items 1 · max items 20string (uuid)[] fields |
asked_by | string | default "" · max length 120 |
thread_title | string | default "" · max length 120 |
excerpt | string | default "" · max length 600 |
Responses
200Successful Responseapplication/jsonSuccessResponse_AssistantMentionEmailsData_| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||
success | true | default true | |||||||||
datarequired | AssistantMentionEmailsData | AssistantMentionEmailsData fields
| |||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | |||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/site-screenshots/{shot_id}A screenshot a site workspace tool took, for the assistant's model (internal)
The JPEG ``site_check`` or ``site_look`` named by id; 404 once it expired (an hour) or for another business's.
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shot_idrequired | path | string | |
business_idrequired | query | string (uuid) |
Responses
200Successful Response400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/internal/assistant/site-screenshots/{shot_id}/keepA site screenshot the chat's questions show stays while they may be read (internal)
The screenshot stays a week from now, and the console may load it for the business (``GET /admin/businesses/{business_id}/website/screenshots/{shot_id}``); 404 once it expired or for another business's.
Authentication
X-Internal-Api-Key header.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shot_idrequired | path | string | |
business_idrequired | query | string (uuid) |
Responses
204Successful Response400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.