Skip to main content

User X handle API

Manage the X (Twitter) handle linked to your account. Your agent uses this handle to mention you, credit content, and surface your posts.

Get X handle

Returns the X handle currently saved on your profile. Requires session authentication.

Response

FieldTypeDescription
handlestring | nullThe saved X handle (without the @ prefix), or null if no handle is set

Errors

CodeDescription
401Unauthorized — no valid session

Example


Update X handle

Save or clear the X handle on your profile. Requires session authentication. The handle is validated against X username rules: letters, numbers, and underscores only, up to 50 characters. A leading @ is automatically stripped before validation and storage.

Request body

FieldTypeRequiredDescription
handlestring | nullYesX handle (without the @ prefix). Pass null or an empty string to clear the handle.

Response

FieldTypeDescription
okbooleanWhether the update succeeded
handlestring | nullThe saved handle, or null if the handle was cleared

Errors

CodeDescription
400Invalid X handle — must contain only letters, numbers, and underscores (1–50 characters)
401Unauthorized — no valid session

Example

To clear: