RequestsController_create
POST
/api/requests
const url = 'https://api.streams-ai.com/api/requests';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"kind":"invite_user","payload":{"email":"hello@example.com","role":"admin"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.streams-ai.com/api/requests \ --header 'Content-Type: application/json' \ --data '{ "kind": "invite_user", "payload": { "email": "hello@example.com", "role": "admin" } }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
One of:
object
kind
required
string
payload
required
object
email
required
string format: email
role
string
object
kind
required
string
payload
required
object
agentUserId
required
string format: uuid
streamId
required
string format: uuid
object
kind
required
string
payload
required
object
agentUserId
required
string format: uuid
streamId
required
string format: uuid
triggerMessageId
required
string format: uuid
contentSnapshot
required
object
blocks
required
Array<object>
One of:
object
type
required
string
elements
required
Array<object>
One of:
object
type
required
string
direction
string
children
required
Array<object>
One of:
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
url
required
string
children
required
Array<object>
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
object
type
required
string
triggerName
required
string
object
type
required
string
listType
required
string
start
integer
children
required
Array<object>
object
type
required
string
checked
boolean
children
required
Array<object>
One of:
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
url
required
string
children
required
Array<object>
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
object
type
required
string
triggerName
required
string
list
object
type
required
string
listType
required
string
start
integer
children
required
Array<object> recursive
object
type
required
string
language
string
code
required
string
object
type
required
string
children
required
Array<object>
object
type
required
string
children
required
Array<object>
object
type
required
string
align
string
children
required
Array<object>
One of:
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
url
required
string
children
required
Array<object>
object
type
required
string
text
required
string
style
object
bold
boolean
italic
boolean
strikethrough
boolean
code
boolean
object
type
required
string
object
type
required
string
triggerName
required
string
object
type
required
string
markdown
required
string
object
type
required
string
assetId
required
string format: uuid
fileName
required
string
contentType
required
string
object
type
required
string
component
required
string
options
required
Array<string>
promptPreview
required
string
object
kind
required
string
payload
required
object
key
additional properties
object
kind
required
string
payload
required
object
key
additional properties