Register an actor endpoint
POST
/v1/actorPOST
/v1/actor
const url = 'https://api.wabe.sh/v1/actor';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"chat","endpoint":"https://chat.example.com/wabe","endpointSecret":"replace_with_a_random_base64url_secret"}'};
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.wabe.sh/v1/actor \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "chat", "endpoint": "https://chat.example.com/wabe", "endpointSecret": "replace_with_a_random_base64url_secret" }'Register your HTTPS handler. Supply an existing disk only when you also want a fixed-disk public invocation URL.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
disk
Optional default disk for the public invocation URL.
string
endpoint
required
Public HTTPS endpoint with a DNS hostname. A path is allowed. Omit credentials, query and fragment.
string format: uri
endpointSecret
required
Shared secret used to authenticate the Wabe broker to your handler.
string
Example
{ "name": "chat", "endpoint": "https://chat.example.com/wabe", "endpointSecret": "replace_with_a_random_base64url_secret"}Responses
Section titled “Responses”Actor registered.
Media typeapplication/json
object
id
required
string format: uuid
Example
779742ad-cd09-4e1c-9170-f20968b344d4name
required
string
Example
chatdisk
Optional default disk for the public invocation URL.
string
Example
chat-stateendpoint
required
string format: uri
Example
https://chat.example.com/wabefetchUrlTemplate
required
string
Example
https://api.wabe.sh/v1/actor/chat/disks/{disk}/instances/{instance}/fetchInvalid registration.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Missing, invalid or revoked project API key.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Disk not found in this project.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Registration name already exists in this project.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Actor API temporarily unavailable.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string