bots.createBotInvitation
POST
/v1/bots/{botId}/invitations
const url = 'https://example.com/v1/bots/example/invitations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example","expiresAt":1,"path":"example"}'};
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://example.com/v1/bots/example/invitations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "expiresAt": 1, "path": "example" }'Invites a person by email, or makes an invitation link, to use this Bot. It needs bots.share. Only a lasting top Bot can be shared.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”botId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
string
expiresAt
number
path
string
Example generated
{ "email": "example", "expiresAt": 1, "path": "example"}Responses
Section titled “Responses”Success
Media typeapplication/json
object
invitation
required
Example
{ "invitation": { "status": "pending" }}BotInvalid | InvitationInvalid | OrganizationRequired
AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
BotNotFound | InvitationNotFound
@nmnmcc/ability/Authorizer/Pending | BotConflict
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}BotStorageUnavailable | AuthenticationUnavailable | RequestFailed