Skip to main content
PUT
/
webhooks
/
{webhookId}
Python
import shippo
from shippo.models import components

s = shippo.Shippo(
    api_key_header='ShippoToken <API_TOKEN>',
    shippo_api_version='2018-02-08',
)


res = s.webhooks.update_webhook(webhook_update_request=components.WebhookUpdateRequest(
    event=components.WebhookEventTypeEnum.BATCH_CREATED,
    url='https://example.com/shippo-webhook',
    active=True,
    is_test=False,
), webhook_id='<id>')

if res is not None:
    # handle response
    pass
{
  "event": "track_updated",
  "url": "https://example.com/shippo-webhook",
  "active": true,
  "is_test": false,
  "object_created": "2023-11-07T05:31:56Z",
  "object_id": "<string>",
  "object_updated": "2023-11-07T05:31:56Z",
  "object_owner": "<string>"
}

Authorizations

Authorization
string
header
default:ShippoToken shippo_test_d41a6f04796998570c521a50828eae8e3cccf0eb
required

API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123

Path Parameters

webhookId
string
required

Object ID of the webhook to retrieve

Body

application/json
event
enum<string>
required

Type of event that triggered the webhook.

Available options:
transaction_created,
transaction_updated,
track_updated,
batch_created,
batch_purchased,
all
Example:

"track_updated"

url
string
required

URL webhook events are sent to.

Example:

"https://example.com/shippo-webhook"

active
boolean

Determines whether the webhook is active or not.

Example:

true

is_test
boolean

Determines whether the webhook is a test webhook or not.

Example:

false

Response

200 - application/json

Webhook updated successfully

event
string
required

Type of event that triggers the webhook.

Example:

"track_updated"

url
string
required

URL webhook events are sent to.

Example:

"https://example.com/shippo-webhook"

active
boolean

Determines whether the webhook is active or not.

Example:

true

is_test
boolean

Determines whether the webhook is a test webhook or not.

Example:

false

object_created
string<date-time>

Timestamp of the creation of the webhook.

object_id
string

Unique identifier of the webhook. This can be used to retrieve or delete the webhook.

object_updated
string<date-time>

Timestamp of the last update of the webhook.

object_owner
string

Username of the user who created the webhook.