Approve a host channel
const url = 'http://localhost:11044/api/v1/channels/example/adopt';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/channels/example/adopt \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'JSON fields: provider, autoStart, botCredential, expectedRevision, and appCredential for Slack. Credentials are wallet keys.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Name the channel’s approval is filed under and later routes address it by; a lower-case letter followed by up to 63 lower-case letters, digits or - (400 otherwise). A name never seen takes expectedRevision 0, a revoked one the revision of its revoked record
Responses
Section titled “Responses”OK
One built-in channel’s approval in the signed-in owner’s world, and whether it is running; holds no wallet key and no secret. Answered by GET /channels and the /channels/{name} adopt, upgrade, start, stop and revoke routes
object
Whether the channel starts by itself when the owner’s world activates
Runtime state, lowercase: running or stopped, or unavailable when nothing on this host can run a host channel
Name of the channel, as named in the route path
Messaging provider, lowercase: discord, slack or telegram
This approval’s revision; send it back as expectedRevision on start, stop, upgrade or revoke
Whether the approval has been revoked; a revoked channel can still be stopped
Id of this approval; send it back as sourceId on start, stop, upgrade or revoke

