Saltar al contenido principal
POST
/
2
/
webhooks
Crear webhook
curl --request POST \
  --url https://api.x.com/2/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>"
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "id": "1146654567674912769",
  "url": "<string>",
  "valid": true
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Cuerpo

application/json
url
string
requerido
Required string length: 1 - 200

Respuesta

La solicitud se completó correctamente.

Una configuración de webhook

created_at
string<date-time>
requerido
id
string
requerido

El identificador único de esta configuración de webhook.

Pattern: ^[0-9]{1,19}$
Ejemplo:

"1146654567674912769"

url
string
requerido

La URL de callback del webhook.

valid
boolean
requerido