Passer au contenu principal
POST
/
2
/
webhooks
Créer un 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
}

Autorisations

Authorization
string
header
requis

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

Corps

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

Réponse

La requête a réussi.

Configuration de webhook

created_at
string<date-time>
requis
id
string
requis

L’identifiant unique de cette configuration de webhook.

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

"1146654567674912769"

url
string
requis

L’URL de rappel du webhook.

valid
boolean
requis