Skip to main content
POST
xurl

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
handle
string
required

The bot's handle (X screen name): 5-15 characters, letters, numbers, or underscores.

Required string length: 5 - 15
Pattern: ^[A-Za-z0-9_]{5,15}$
display_name
string

The bot's display name; defaults to the handle.

Required string length: 1 - 50
org_only
boolean

Whether only members of the bot's developer account can add it to group chats. An org-only bot has no public profile and doesn't appear in public search. Everyone in its developer account should be able to message it, so leave its Direct Messages open to everyone rather than premium senders only. Defaults to false. Applies only when the request creates the bot: a handle that already names one of the project's bots keeps that bot's setting, which the response's org_only reports.

scopes
string[]

Scopes for the bot's bearer token. Broadcast moderation additionally supports broadcast.read and broadcast.write. Defaults to the XChat scope set (dm.read, dm.write, tweet.read, users.read, media.write).

Response

The request has succeeded.

data
object
errors
object[]