Create or replace the team's webhook configuration.
- Preconditions:
callbackUrlmust be an HTTPS URL of 1 to 1024 characters, with a host, no user info, no fragment and a valid port. Every address it resolves to must be publicly routable; localhost, private, link-local, CGNAT, cloud metadata, protocol-reserved, documentation and 6to4 ranges are rejected. The same check runs again when a delivery opens its connection, so a name that later resolves into a private range fails that delivery instead of reaching your network. - Effect: upserts the single configuration owned by the team in the server-side context.
teamIdis never read from the request, so a caller cannot configure another team. The Local API and Open API endpoints read and write the same record, and the response echoes what was stored. - Disabling:
enabled: falsekeeps the URL and stops new events from being created. Events already queued are cancelled one by one if the configuration is still disabled when they are next authorized, so re-enabling quickly lets them continue. - Retry: safe. The save is an upsert keyed by team, so repeating the same request converges on the same state.
- Client version: requires MoreLogin client v2.66.0 or higher, because the desktop client is what exposes this route locally. The Open API endpoint has no client dependency.
See Webhooks for the callback contract, event names and retry schedule.
Documented business errors: 41001. See Error Codes for what each code means. Any operation can additionally return the common codes.
POST
curl -i -X POST \
http://127.0.0.1:40000/api/webhook/config \
-H 'Content-Type: application/json' \
-d '{
"callbackUrl": "https://example.com/morelogin/webhook",
"enabled": true
}'Success. data is an object with the fields callbackUrl and enabled, echoing the stored configuration.
Response
{ "code": 0, "msg": "", "data": { "callbackUrl": "https://example.com/morelogin/webhook", "enabled": true }, "requestId": "" }