Create App
client.RealtimeKit.Apps.Post(ctx, params) (*AppPostResponse, error)
POST/accounts/{account_id}/realtime/kit/apps
Create new app for your account
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Create App
package main
import (
"context"
"fmt"
"github.com/cloudflare/cloudflare-go"
"github.com/cloudflare/cloudflare-go/option"
"github.com/cloudflare/cloudflare-go/realtime_kit"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
response, err := client.RealtimeKit.Apps.Post(context.TODO(), realtime_kit.AppPostParams{
AccountID: cloudflare.F("account_id"),
Name: cloudflare.F("name"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
{
"data": {
"app": {
"created_at": "2025-01-01T08:16:40.644Z",
"id": "my-app-id",
"name": "my-new-app"
}
},
"success": true
}Returns Examples
{
"data": {
"app": {
"created_at": "2025-01-01T08:16:40.644Z",
"id": "my-app-id",
"name": "my-new-app"
}
},
"success": true
}